Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kickstart support drop for Python < 3.7 #499

Merged
merged 16 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions dill/__diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@
Module to show if an object has changed since it was memorised
"""

import builtins
import os
import sys
import types
try:
import numpy
HAS_NUMPY = True
except:
HAS_NUMPY = False
try:
import builtins
except ImportError:
import __builtin__ as builtins
HAS_NUMPY = False

# pypy doesn't use reference counting
getrefcount = getattr(sys, 'getrefcount', lambda x:0)
Expand All @@ -44,10 +41,7 @@ def get_attrs(obj):
if type(obj) in builtins_types \
or type(obj) is type and obj in builtins_types:
return
try:
return obj.__dict__
except:
return
return getattr(obj, '__dict__', None)


def get_seq(obj, cache={str: False, frozenset: False, list: True, set: True,
Expand Down
21 changes: 3 additions & 18 deletions dill/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,23 +296,9 @@
# make sure "trace" is turned off
detect.trace(False)

try:
from importlib import reload
except ImportError:
try:
from imp import reload
except ImportError:
pass

# put the objects in order, if possible
try:
from collections import OrderedDict as odict
except ImportError:
try:
from ordereddict import OrderedDict as odict
except ImportError:
odict = dict
objects = odict()
from importlib import reload

objects = {}
# local import of dill._objects
#from . import _objects
#objects.update(_objects.succeeds)
Expand Down Expand Up @@ -373,7 +359,6 @@ def extend(use_dill=True):
return

extend()
del odict


def license():
Expand Down
Loading