Skip to content

Commit

Permalink
Remove builtins, pickle, StringIO compatibility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovsky committed Jan 23, 2022
1 parent 1fb4cc8 commit 42a4046
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 16 deletions.
4 changes: 2 additions & 2 deletions pony/orm/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import absolute_import, print_function, division
from pony.py23compat import cmp, unicode, buffer, int_types, builtins
from pony.py23compat import cmp, unicode, buffer, int_types

import json, re, sys, types, datetime, logging, itertools, warnings, inspect, ast
import builtins, json, re, sys, types, datetime, logging, itertools, warnings, inspect, ast
from operator import attrgetter, itemgetter
from itertools import chain, starmap, repeat
from time import time
Expand Down
4 changes: 2 additions & 2 deletions pony/orm/tests/test_core_multiset.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import, print_function, division
from pony.py23compat import pickle
import unittest

import pickle, unittest


from pony.orm.core import *
Expand Down
3 changes: 2 additions & 1 deletion pony/orm/tests/test_deduplication.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pony.py23compat import StringIO
from io import StringIO

from pony.orm import *
from pony.orm.tests import setup_database, teardown_database

Expand Down
4 changes: 1 addition & 3 deletions pony/orm/tests/test_json.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from pony.py23compat import pickle

import unittest
import pickle, unittest

from pony.orm import *
from pony.orm.tests.testutils import raises_exception, raises_if
Expand Down
3 changes: 1 addition & 2 deletions pony/orm/tests/test_query.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import absolute_import, print_function, division
from pony.py23compat import pickle

import unittest
import pickle, unittest
from datetime import date
from decimal import Decimal

Expand Down
2 changes: 0 additions & 2 deletions pony/orm/tests/test_show.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from pony.py23compat import StringIO

import io, sys, unittest
import contextlib
from decimal import Decimal
Expand Down
2 changes: 0 additions & 2 deletions pony/py23compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
PY39 = sys.version_info[:2] >= (3, 9)
PY310 = sys.version_info[:2] >= (3, 10)

import builtins, pickle
from io import StringIO
unicode = str
buffer = bytes
int_types = (int,)
Expand Down
3 changes: 1 addition & 2 deletions pony/utils/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import absolute_import, print_function
from pony.py23compat import pickle

import ast, io, re, os.path, sys, inspect, types, warnings
import ast, io, re, os.path, sys, inspect, types, warnings, pickle

from datetime import datetime
from itertools import count as _count
Expand Down

0 comments on commit 42a4046

Please sign in to comment.