Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Metadata-Version: 2.2
Name: zombie-imp
Version: 0.0.2
Version: 0.0.3
Summary: A copy of the `imp` module that was removed in Python 3.12
Maintainer-email: Petr Viktorin <[email protected]>
Project-URL: Homepage, https://github.com/encukou/zombie-imp
Expand All @@ -14,7 +14,7 @@ License-File: LICENSE

# zombie-imp

~~A particularly mischevious act of necromancy. That is,~~
~~A particularly mischievous act of necromancy. That is,~~
A copy of the `imp` module that was removed in Python 3.12.

Don't use this, it'll probably trick and bite you.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# zombie-imp

~~A particularly mischevious act of necromancy. That is,~~
~~A particularly mischievous act of necromancy. That is,~~
A copy of the `imp` module that was removed in Python 3.12.

Don't use this, it'll probably trick and bite you.
Expand Down
16 changes: 16 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
python-zombie-imp (0.0.3-1) unstable; urgency=medium

* New upstream release.
* Update copyright years
* Update watch file (Closes: #1101042)
* Drop upstream patch

-- Gianfranco Costamagna <[email protected]> Sun, 23 Mar 2025 18:59:17 +0100

python-zombie-imp (0.0.2-3) unstable; urgency=medium

* Add python3-setuptools B-D (Closes: #1080780)
* Bump std-version to 4.7.0

-- Gianfranco Costamagna <[email protected]> Fri, 14 Mar 2025 11:23:16 +0100

python-zombie-imp (0.0.2-2) unstable; urgency=medium

* No change reupload for testing migration
Expand Down
6 changes: 3 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Section: python
Priority: optional
Maintainer: Gianfranco Costamagna <[email protected]>
Build-Depends: debhelper-compat (= 13), dh-python,
python3-all, pybuild-plugin-pyproject
Standards-Version: 4.6.2
python3-all, pybuild-plugin-pyproject, python3-setuptools
Standards-Version: 4.7.0

Package: python3-zombie-imp
Architecture: all
Expand All @@ -14,7 +14,7 @@ Suggests: ${python3:Suggests}
Description: copy of the `imp` module that was removed in Python 3.12
# zombie-imp
.
~~A particularly mischevious act of necromancy. That is,~~
~~A particularly mischievous act of necromancy. That is,~~
A copy of the `imp` module that was removed in Python 3.12.
.
Don't use this, it'll probably trick and bite you.
Expand Down
2 changes: 1 addition & 1 deletion debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Copyright: (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam
License: Python-license

Files: debian/*
Copyright: 2023 Gianfranco Costamagna <[email protected]>
Copyright: 2023-2025 Gianfranco Costamagna <[email protected]>
License: Python-license

License: Python-license
Expand Down
99 changes: 0 additions & 99 deletions debian/patches/d45295faf4.patch

This file was deleted.

1 change: 0 additions & 1 deletion debian/patches/series

This file was deleted.

2 changes: 1 addition & 1 deletion debian/watch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# try also https://pypi.debian.net/zombie-imp/watch
version=4
opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
https://pypi.debian.net/zombie-imp/zombie-imp-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
https://pypi.debian.net/zombie-imp/zombie_imp-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
2 changes: 1 addition & 1 deletion imp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
from zombie_imp.imp_3_11 import _frozen_module_names
except ImportError:
pass
from zombie_imp.imp_3_11 import _ERR_MSG, _exec, _load, _builtin_from_name
from zombie_imp.imp_3_11 import _ERR_MSG_PREFIX, _exec, _load, _builtin_from_name
from zombie_imp.imp_3_11 import _HackedGetData, _LoadSourceCompatibility, _LoadCompiledCompatibility
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "zombie-imp"
version = "0.0.2"
version = "0.0.3"
maintainers = [
{ name="Petr Viktorin", email="[email protected]" },
]
Expand Down
1 change: 1 addition & 0 deletions test_zombie_imp/badsyntax_pep3120.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("böse")
8 changes: 3 additions & 5 deletions test_zombie_imp/test_imp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
import imp #!! this should be the only difference between test_imp and test_zombie_imp!
import _imp

orig__file__ = os.path.join(test.__path__[0], os.path.split(__file__)[-1])


OS_PATH_NAME = os.path.__name__

Expand Down Expand Up @@ -86,7 +84,7 @@ def test_find_module_encoding(self):
with imp.find_module('module_' + mod, self.test_path)[0] as fd:
self.assertEqual(fd.encoding, encoding)

path = [os.path.dirname(orig__file__)]
path = [os.path.dirname(__file__)]
with self.assertRaises(SyntaxError):
imp.find_module('badsyntax_pep3120', path)

Expand Down Expand Up @@ -211,7 +209,7 @@ def test_issue5604(self):
os_helper.rmtree('__pycache__')

def test_issue9319(self):
path = os.path.dirname(orig__file__)
path = os.path.dirname(__file__)
self.assertRaises(SyntaxError,
imp.find_module, "badsyntax_pep3120", [path])

Expand Down Expand Up @@ -333,7 +331,7 @@ def test_load_source(self):
mod = type(sys.modules[__name__])(modname)
with support.swap_item(sys.modules, modname, mod):
with self.assertRaisesRegex(ValueError, 'embedded null'):
imp.load_source(modname, orig__file__ + "\0")
imp.load_source(modname, __file__ + "\0")

@support.cpython_only
def test_issue31315(self):
Expand Down
8 changes: 3 additions & 5 deletions test_zombie_imp/test_zombie_imp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
import zombie_imp as imp #!! this should be the only difference between test_imp and test_zombie_imp
import _imp

orig__file__ = os.path.join(test.__path__[0], os.path.split(__file__)[-1])


OS_PATH_NAME = os.path.__name__

Expand Down Expand Up @@ -86,7 +84,7 @@ def test_find_module_encoding(self):
with imp.find_module('module_' + mod, self.test_path)[0] as fd:
self.assertEqual(fd.encoding, encoding)

path = [os.path.dirname(orig__file__)]
path = [os.path.dirname(__file__)]
with self.assertRaises(SyntaxError):
imp.find_module('badsyntax_pep3120', path)

Expand Down Expand Up @@ -211,7 +209,7 @@ def test_issue5604(self):
os_helper.rmtree('__pycache__')

def test_issue9319(self):
path = os.path.dirname(orig__file__)
path = os.path.dirname(__file__)
self.assertRaises(SyntaxError,
imp.find_module, "badsyntax_pep3120", [path])

Expand Down Expand Up @@ -333,7 +331,7 @@ def test_load_source(self):
mod = type(sys.modules[__name__])(modname)
with support.swap_item(sys.modules, modname, mod):
with self.assertRaisesRegex(ValueError, 'embedded null'):
imp.load_source(modname, orig__file__ + "\0")
imp.load_source(modname, __file__ + "\0")

@support.cpython_only
def test_issue31315(self):
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ env_list =
py310
py311
py312
py313
py314

[testenv]
commands = python -m unittest discover -v test_zombie_imp/
6 changes: 3 additions & 3 deletions zombie_imp.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Metadata-Version: 2.2
Name: zombie-imp
Version: 0.0.2
Version: 0.0.3
Summary: A copy of the `imp` module that was removed in Python 3.12
Maintainer-email: Petr Viktorin <[email protected]>
Project-URL: Homepage, https://github.com/encukou/zombie-imp
Expand All @@ -14,7 +14,7 @@ License-File: LICENSE

# zombie-imp

~~A particularly mischevious act of necromancy. That is,~~
~~A particularly mischievous act of necromancy. That is,~~
A copy of the `imp` module that was removed in Python 3.12.

Don't use this, it'll probably trick and bite you.
Expand Down
1 change: 1 addition & 0 deletions zombie_imp.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ README.md
imp.py
pyproject.toml
tox.ini
test_zombie_imp/badsyntax_pep3120.py
test_zombie_imp/test_imp.py
test_zombie_imp/test_pkgutil_reanimations.py
test_zombie_imp/test_same_files.py
Expand Down
2 changes: 1 addition & 1 deletion zombie_imp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
from .imp_3_11 import _frozen_module_names
except ImportError:
pass
from .imp_3_11 import _ERR_MSG, _exec, _load, _builtin_from_name
from .imp_3_11 import _ERR_MSG_PREFIX, _exec, _load, _builtin_from_name
from .imp_3_11 import _HackedGetData, _LoadSourceCompatibility, _LoadCompiledCompatibility
4 changes: 2 additions & 2 deletions zombie_imp/imp_3_11.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Platform doesn't support dynamic loading.
create_dynamic = None

from importlib._bootstrap import _ERR_MSG, _exec, _load, _builtin_from_name
from importlib._bootstrap import _ERR_MSG_PREFIX, _exec, _load, _builtin_from_name
from importlib._bootstrap_external import SourcelessFileLoader

from importlib import machinery
Expand Down Expand Up @@ -297,7 +297,7 @@ def find_module(name, path=None):
continue
break # Break out of outer loop when breaking out of inner loop.
else:
raise ImportError(_ERR_MSG.format(name), name=name)
raise ImportError(_ERR_MSG_PREFIX + repr(name), name=name)

encoding = None
if 'b' not in mode:
Expand Down
Loading