Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Migrate to use "implicit namespace packages" (PEP 420). Dependencies: Use crate>=1.0.0.dev2 for validation purposes. CI: Use Python 3.11, up from 3.8. #326

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

amotl
Copy link
Member

@amotl amotl commented Nov 4, 2024

About

This change is part of the modernization process to migrate to modern Python namespace packages according to PEP 420. In order to continue supporting code that has been slotted into crate.qa, a little update was also needed here.

Problem

ModuleNotFoundError: No module named 'crate.client'

References

/cc @surister, @simonprickett, @kneth

@cla-bot cla-bot bot added the cla-signed label Nov 4, 2024
@amotl amotl changed the title Dependencies: Use crate>=1.0.0.dev2 for validation purposes Python: Migrate to use "implicit namespace packages" (PEP 420). Dependencies: Use crate>=1.0.0.dev2 for validation purposes. Nov 5, 2024
@amotl
Copy link
Member Author

amotl commented Nov 5, 2024

Problem

Happens on Python 3.8. Does not happen on Python 3.9.

ImportError: Failed to import test module: test_cli
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/var/lib/jenkins/workspace/CrateDB/qa/crate_qa_on_pr/tests/startup/test_cli.py", line 6, in <module>
    from crate.qa.tests import NodeProvider
ModuleNotFoundError: No module named 'crate.qa'

Solution

671dc3a adds an update to use Python 3.11 on CI.

@amotl amotl marked this pull request as ready for review November 5, 2024 00:49
@amotl amotl changed the title Python: Migrate to use "implicit namespace packages" (PEP 420). Dependencies: Use crate>=1.0.0.dev2 for validation purposes. Python: Migrate to use "implicit namespace packages" (PEP 420). Dependencies: Use crate>=1.0.0.dev2 for validation purposes. CI: Use Python 3.11, up from 3.8. Nov 5, 2024
@amotl amotl merged commit 5e46019 into master Nov 5, 2024
2 checks passed
@amotl amotl deleted the crate-1.0.0 branch November 5, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants