Changelog
1.7.6 (2022-02-23)
| Type | Description | PR | Issues | Author |
|---|---|---|---|---|
| Improvement | add full type hints to source code | @NiklasRosenstein |
1.7.4 (2022-02-23)
| Type | Description | PR | Issues | Author |
|---|---|---|---|---|
| Refactor | modernize codebase, require Python 3.6 or newer | @NiklasRosenstein |
1.7.3
.pthfiles are now evaluated when thelocalimport()constructor is called. Import statements in these files will still only be evaluated inside the context manager.
1.7.2
localimport.discover()now usespkgutil.iter_modules()rather thanpkgutil.walk_packages(): We only need to know the top-level package/module names andwalk_packages()will cause actual packages to be imported in order to find submodules.
1.7.1
- Fix
localimport.autodisable()for Python 2 (wherepkgutil.walk_packages()yields tuples instead of namedtuples).
1.7.0
- Add
localimport(do_autodisable)parameter which defaults toTrue(Note: different semantics apply) - Add
localimport.discover() - Add
localimport.autodisable()
1.6.1
- Update setup.py to adjust README.rst for PyPI
v1.6.0
- fix #19 -- read
README.rstas UTF-8 in setup.py - fix issue when the current working directory is used as one of the localimport paths
- move non-member functions to global scope, out of the localimport class
- add
__author__and version` to global scope
v1.5.2
- fix #17 where
sys.moduleschanged size during iteration inlocalimport.__enter__()(Python 3)
v1.5.1
- add Python 3 compatibility
v1.5
- add
setup.py - add
make_minandmake_b64commands tosetup.py - fix possible error when
localimport(parent_dir)parameter is not specified and the__file__of the Python module that uses localimport is in the current working directory
v1.4.16
- fix possible
KeyErrorwhen restoring namespace module paths - renamed
_localimportclass tolocalimport localimport(parent_dir)parameter is now determined dynamically usingsys._getframe()- support for [py-require][require]
v1.4.14
- Mockup
pkg_resources.declare_namespace(), making it callpkgutil.extend_path()afterwards to ensure we find all available namespace paths
v1.4.13
- fixed possible KeyError and AttributeError when using
the
_localimport.disable()method
v1.4.12
- Removed auto discovering of modules importable from the local site
- Add
_localimport.disable()method
v1.4.11
- Fixed a bug where re-using the
_localimportcontext added local modules back tosys.modulesbut removed them immediately (#15)
v1.4.10
- Fix #13,
_extend_path()now keeps order of the paths - Updat class docstrings
- Add
do_eggsanddo_pthparameters to the constructor - Fix #12, add
_discover()method and automatic disabling of modules that could conflict with modules from the_localimportsite
v1.4.9
- Fix #11, remove
None-entries of namespace packages insys.modules _localimport._extend_path()is is now less tolerant about extending the namespace path and only does so when a__init__.{py,pyc,pyo}file exists in the parsed directory
v1.4.8
- Now checks any path for being a zipfile rather than just .egg files