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.yaml
in 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.yaml
first. -
Added missing dependancies:
lxml
bs4
(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.args
rather thansys.argv
- Add dot-notation support to zconfig.get
- Move to using nox based testing framework
- Update module loader in
izaber/__init__.py
to use importlib (current) vs imp (deprecated) - Improve Dockerfile
- Add Python 3.11 to tests
- Explicitly test magic submodule loading
- Fix issues when
import a_b
andimport a.b
were being used
- Fix issues when
import a_b
is called beforeimport a.b
-
For some reason the noxfile tests were not breaking when doing an
import izaber
on 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 aModuleNotFoundError
that 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.
PyYAML
v6.0 requiresyaml.load
to have a second argument. Switched to usingsafe_load
to fix the argument issue as well as a potential security issue.
- Made it so that logging module does not automatically create a
log.log
file- Providing a path to
env.logging.filename
will log to that file - If
env.logging
is present but nofilename
key, it will opt to send the data to stdout - If no
env.logging
structure is present, it will simply not create the izaber log handler - If
env.logging.disable_internal
is 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-xdist
should 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.yaml
which may be useful in Docker deployments
- Setting the
IZABER_YAML
ENV value to the same value as a normalizaber.yaml
, it will be used instead if the file doesn't exist - Setting the
IZABER_ENVIRONMENT
ENV value will be used if no explicit environment has been defined forinitialize
(usinginitialize
'senvironment
argument will take precedence overIZABER_ENVIRONMENT
)