enable warnings as errors when testing and migrate away from deprecated import methods #130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It turns out that my import failure noted over in jaraco/keyring#683 is triggered by the fact we (not keyring) run our tests (using keyring and thus pywin32-ctypes) with warnings reported as errors. This results in pywin32-ctypes failing to be imported due to some import related warnings.
These are taken from a PR in my fork where CI is running (without approval).
https://github.com/altendky/pywin32-ctypes/actions/runs/9375227229/job/25812921472?pr=1#step:5:163
I'll keep this updated as I understand this better.
Looks like the fallback that is happening is to
BackendLoader.load_module()
.pywin32-ctypes/win32ctypes/core/__init__.py
Lines 29 to 32 in 83be1e3
https://docs.python.org/3.12/library/importlib.html#importlib.abc.Loader.load_module
There is a warning about datetime utc tz aware etc etc that haas addressed in scalative/haas@59809b1 but is not yet released.
https://github.com/altendky/pywin32-ctypes/actions/runs/9376291633/job/25815980893?pr=1#step:5:96