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

Require importlib_resources for testing on Python < 3.10 #7016

Merged
merged 5 commits into from
Aug 23, 2023

Conversation

bnavigator
Copy link
Contributor

Closes #7014

importlib.resources is only used in the tests. Version 5.0 is included in python 3.10+

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch bnavigator/notebook/importlib-resources-3.9

@bnavigator bnavigator changed the title Importlib resources 3.9 Require importlib_resources for testing on Python < 3.10 Aug 21, 2023
@bnavigator
Copy link
Contributor Author

Now that it is testing on different Python versions, 3.12 fails on a deprecation warning which is out of the scope of this PR:

ERROR tests/test_app.py::test_notebook_handler - DeprecationWarning: datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.now(datetime.UTC).

@jtpio jtpio added the bug label Aug 22, 2023
fail-fast: false
matrix:
# used by the jupyterlab/maintainer-tools base-setup action
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we test on all Python versions? Or maybe the lowest and highest versions (and 3.12) would be enough, like here?

python: ['3.8', '3.11', '3.12']

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mostly to help reduce the number of CI jobs if they are not strictly necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's up to you, but #7014 would not have been caught by your proposed set of pythons:

There was

importlib-resources>=5.0;python_version<\"3.9\"",

and the failure was only with Python 3.9. For 3.8 we already have the backport and for python 3.10 the included stdlib is okay.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok then we can keep all versions and see how it goes with CI over time.

@jtpio jtpio added this to the 7.0.x milestone Aug 22, 2023
Copy link
Member

@jtpio jtpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jtpio jtpio merged commit e2eb8f2 into jupyter:main Aug 23, 2023
29 of 30 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.9 importlib.resources fails in tests
2 participants