Python Module Naming & Namespacing Harmonization #1119
Merged
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.
Description:
Related issue (if applicable): cpython/117860
The short of it is:The Python language has a lot of ambiguity when the name you give your Python file aligns with a class, function or variable within it.
Apprise for years was built on structuring it's files as:
/notify/ClassName.py
with aclass ClassName()
inside of it.Up until Python v3.11 this wasn't an issue. However due to underlining changes to
unittest
, testing from 3rd party applications no longer worked and there was no backwards compatibility.The cpython/117860 ticket revealed that not only is there ambiguity with the
unittest
, but it extends inimport
calls as well which Apprise was subject to bizarre issues as well, but they were just never brought forth over the past 4 years because the documentation didn't identify/illustrate it and no one appeared to have any issues. None that were reported here anyway.This is a major change with likely breaking side-effects. It's still a WIP, but the goal is to find ways of cleaning up the (Python) file namespacing to work around this limitation of Python.
Testing
Anyone can help test this source code as follows: