Update pyproject.toml to be a bit more strict about what python versions are being used:
python: 2.7, then 3.6 and uppyYAML: >5.4pytz: >2021.1Jinja2: >2.11.3
-
Instead of searching for
izaber.yamlin the following order:appdirs.user_data_dir(_app_name, _app_author)os.path.expanduser('~')'.'
Reverse the order:
'.'os.path.expanduser('~')appdirs.user_data_dir(_app_name, _app_author)
In other words, search the local directory for the
izaber.yamlfirst. -
Added missing dependancies:
lxmlbs4(Beautiful Soup used by theizaber.email)
-
Migrated to using poetry for releases
-
Created Docker based container for testing
- Removed python 2.7 support
- No longer require argument to
initialize(). This does mean at some point overlays will be required (no one used them anyways so it will not be missed)
- Version of PyYAML set was unnecessarily high
- Sigh. Was using
sys.argsrather thansys.argv
- Add dot-notation support to zconfig.get
- Move to using nox based testing framework
- Update module loader in
izaber/__init__.pyto use importlib (current) vs imp (deprecated) - Improve Dockerfile
- Add Python 3.11 to tests
- Explicitly test magic submodule loading
- Fix issues when
import a_bandimport a.bwere being used
- Fix issues when
import a_bis called beforeimport a.b
-
For some reason the noxfile tests were not breaking when doing an
import izaberon Python 3.11. When invoked manually we see:Python 3.11.0rc1 (main, Aug 8 2022, 18:31:54) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import izaber Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/src/izaber/__init__.py", line 40, in <module> class IZaberFinderImportlib(importlib.abc.MetaPathFinder): ^^^^^^^^^^^^^ AttributeError: module 'importlib' has no attribute 'abc'. Did you mean: '_abc'?
Tweaked to fix.
-
When an
izaber.*module was being imported, if the module did not exist, the error was vague and non-useful. Amend to to throw aModuleNotFoundErrorthat would allow the developer/user to identify what the issue might be(izaber-py3.8) root@7ed4086c1bd9:/src/tests# python 300_import_test.py Traceback (most recent call last): File "300_import_test.py", line 43, in <module> test_submodule() File "300_import_test.py", line 36, in test_submodule import izaber.nonexistant File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 655, in _load_unlocked File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible File "/src/izaber/__init__.py", line 28, in load_module if self.spec.name in sys.modules: AttributeError: 'NoneType' object has no attribute 'name'
- Noted by @chead in Bug 11.
PyYAMLv6.0 requiresyaml.loadto have a second argument. Switched to usingsafe_loadto fix the argument issue as well as a potential security issue.
- Made it so that logging module does not automatically create a
log.logfile- Providing a path to
env.logging.filenamewill log to that file - If
env.loggingis present but nofilenamekey, it will opt to send the data to stdout - If no
env.loggingstructure is present, it will simply not create the izaber log handler - If
env.logging.disable_internalis a true value, it will also simply not create the izaber log handler
- Providing a path to
- Added support for python 3.12 by tweaking the izaber module loader
- Cleanup docker image to not use root and ubuntu user instead
python-xdistshould not be in dependancies (it is only for dev) as noted by @Hawk777
- We don't anticipate any issues with PyYAML so let's loosen things up till the next major release
- Added ENV support for
izaber.yamlwhich may be useful in Docker deployments
- Setting the
IZABER_YAMLENV value to the same value as a normalizaber.yaml, it will be used instead if the file doesn't exist - Setting the
IZABER_ENVIRONMENTENV value will be used if no explicit environment has been defined forinitialize(usinginitialize'senvironmentargument will take precedence overIZABER_ENVIRONMENT)
- Added support for keyword argument
log_usage_to_filein initialize function which will log system and config information to file