-
-
Notifications
You must be signed in to change notification settings - Fork 449
Drop Python 3.8, add Python 3.12 testing #6738
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
Conversation
The union typing using |
In runtime, yes. Fixed now. |
with mock.patch( | ||
'napari._qt.qt_viewer.QFileDialog' | ||
) as mock_file, mock.patch( | ||
'napari._qt.qt_viewer.QtViewer._qt_open' | ||
) as mock_read: | ||
with ( | ||
mock.patch('napari._qt.qt_viewer.QFileDialog') as mock_file, | ||
mock.patch('napari._qt.qt_viewer.QtViewer._qt_open') as mock_read, | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that you spot one of your favorite python 3.9+ feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hahaha indeed. Actually I was wondering why these are changed — is it because the file is newly reformatted? Or is the parens around with() actually a new syntax feature??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. I know that I have already read about this in the past, when we talked about ugly formatting, but cannot find now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it sounds like this was a Python 3.10 feature??? python/cpython#56991 is linked from https://docs.python.org/3/whatsnew/3.10.html. However I notice that it says "officially" allowed, so maybe it was unofficially working in 3.9 and we are now depending on that?
Anyway I think that we should drop 3.9 soon also anyway. (SPEC-0/NEP-29 already support this.)
@@ -323,7 +323,7 @@ def get_layers_data(gui: CategoricalWidget) -> List[Tuple[str, Any]]: | |||
return choices | |||
|
|||
|
|||
@lru_cache(maxsize=None) | 8000|||
@cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also cool!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6738 +/- ##
==========================================
+ Coverage 92.37% 92.43% +0.06%
==========================================
Files 613 613
Lines 54712 54727 +15
==========================================
+ Hits 50540 50587 +47
+ Misses 4172 4140 -32 ☔ View full report in Codecov by Sentry. |
Something is broken. I have pushed fixes, but I do not see them here (but they are visible on pull to another machine). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh just saw your comment. Hmmm. Yeah dunno, GH can be so bad with big changesets... |
Yes. At this moment, I put only empyt files for constraints. Once CI run again (I added upper pin for PySide6), I could download constraints and add non-empty version to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To summarize, the main changes are:
- worfklows updated with new versions (as well as pyproject and tox.ini)
- a couple of parenthesized context managers
- a couple of "if version < 3.9" checks removed
- everything else is a million changes from
Tuple
andList
totuple
andlist
and so on. - one
lru_cache
tocache
xD
did I miss something @Czaki ?
@@ -107,46 +107,51 @@ jobs: | |||
fail-fast: false | |||
matrix: | |||
platform: [ ubuntu-latest ] | |||
python: [ "3.9", "3.10" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this 3.9
unchanged on purpose? I'm just scrolling through and notice this is the only one no bumped ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I try to have working CI. And there is a PySide6/PySide2 problem
3.9: py39 | ||
3.9.0: py390 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this removal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we do not have any py390 job in tox
If you miss, I also miss such change introduced by ruff. |
@Czaki The pyside 6.3.1 issue is a real "bug" in app-model related to the enum handling before 6.4 changes. |
Yes. Please add such PR with description and link to this PR. |
Done: pyapp-kit/app-model#179 |
@napari-bot dependency update |
description updated |
Description
Drop python 3.8 start testing on python 3.12
Also, automatically by pre-commit
collections
instead oftyping
for a bunch of types (likeSequence
)typing
instead oftyping_extension
(likeAnnotated
).