Skip to content

Commit 2f905fa

Browse files
authored
Merge pull request #468 from gpshead/patch-1
Make future.moves.copyreg just _be_ copyreg on PY3
2 parents b0ac9d5 + ede6f09 commit 2f905fa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/future/moves/copyreg.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
from future.utils import PY3
33

44
if PY3:
5-
from copyreg import *
5+
import copyreg, sys
6+
# A "*" import uses Python 3's copyreg.__all__ which does not include
7+
# all public names in the API surface for copyreg, this avoids that
8+
# problem by just making our module _be_ a reference to the actual module.
9+
sys.modules['future.moves.copyreg'] = copyreg
610
else:
711
__future_module__ = True
812
from copy_reg import *

0 commit comments

Comments
 (0)