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
[MRG] Add CI builds for Python 3.11 #1659
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1659 +/- ##
==========================================
+ Coverage 97.58% 97.60% +0.01%
==========================================
Files 66 66
Lines 10737 10737
==========================================
+ Hits 10478 10480 +2
+ Misses 259 257 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
| 2.3 | March 2022 | 3.6, 3.7, 3.8, 3.9, 3.10 | | ||
+-----------------+------------------+---------------------------+ | ||
| 2.4 | ~September 2022 | 3.7, 3.8, 3.9, 3.10, 3.11 | | ||
+-----------------+------------------+---------------------------+ |
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 removed 3.6 here as it is EOL since last year, but I'm not sure if this is correct - did we have some plan here?
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 recall if we had a plan, but it makes sense to drop it.
- change regex to be compatible with Python 3.11 - fixes pydicom#1658
30bc662
to
d310978
Compare
.github/workflows/merge-pytest.yml
Outdated
@@ -12,7 +12,7 @@ jobs: | |||
fail-fast: false | |||
matrix: | |||
os: [ubuntu-latest, windows-latest, macos-latest] | |||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] | |||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11-dev'] |
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.
Shouldn't we also remove 3.6 here (and for typing)?
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.
True, will do this tonight. I had just waited for feedback...
|
I think this is ready to merge. |
I see that a couple of 3.11 parts did not pass on the master merge action. |
Right, I missed this! These are the tests that are not run for the PR, correct? |
Yes, that seems very reasonable. Interesting that CharPyLS does not install in Windows either when you look into the full log, but that section of the github actions does not show as an error; it just skips it without complaint. |
I actually didn't notice this, I just saw that the test seemed to succeed - in this case I will disable it for all systems. |
pylibjpeg-openjpeg pylibjpeg-libjpeg also don't build with Python 3.11... at least it works with Pillow and gdcm. |
r"((?P<s>([0-5][0-9]|60))" | ||
r"(\.(?P<ms>([0-9]{1,6})?))?)?)?$" |
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.
@mrbean-bremen I'm sorry to bring this up but could you please elaborate why this pattern works?
Looking at it I think that it's not the same as it used to be, e.g. I think that in some cases it allows for <ms>
group to be matched even if the <s>
one did not match. Previously this <ms>
group matching was dependent on the success of matching <s>
group (via the ?(7)...
syntax), whereas now it's not.
Also, I wonder whether this isn't a bug in Python re
module? The previous regex is correctly recognized by some other regexp implementation, e.g. https://regex101.com/
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 think that in some cases it allows for group to be matched even if the
<s>
one did not match
I don't see this - as far as I understand, the group is an optional part of the expression above, while the <s>
group is mandatory (in that scope, it is optional in the scope of the <m>
group). Not sure if that was clear :) Anyway, if you can show me an example that would now incorrectly match, I stand corrected, of course.
Also, I wonder whether this isn't a bug in Python re module?
Yes, it is - but I think you filed it yourself? Anywhere, it will eventually be fixed, but it is not fixed in Python 3.11.0, so we cannot remove the fix yet. In case the fix (in pydicom) is incorrect, we have to change it of course, otherwise we can just leave it as is.
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 think that in some cases it allows for group to be matched even if the
<s>
one did not matchI don't see this - as far as I understand, the group is an optional part of the expression above, while the
<s>
group is mandatory (in that scope, it is optional in the scope of the<m>
group). Not sure if that was clear :) Anyway, if you can show me an example that would now incorrectly match, I stand corrected, of course.
Ah you're right! Somehow I didn't notice the removal of the ?
on the <s>
group...
Also, I wonder whether this isn't a bug in Python re module?
Yes, it is - but I think you filed it yourself? Anywhere, it will eventually be fixed, but it is not fixed in Python 3.11.0, so we cannot remove the fix yet. In case the fix (in pydicom) is incorrect, we have to change it of course, otherwise we can just leave it as is.
Yes, I have filled in a bug report once I've confirmed that there is a problem with Python's re
module, but that was after posting the question here. Sorry for making it look so confusing 😅
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.
Yes, I have filled in a bug report once I've confirmed that there is a problem with Python's re module
Thanks for that, by the way, should have done this myself!
Sorry for making it look so confusing
It got me to re-check the fix, which is always a good thing. Anyway, I understand that leaving the fix in is ok, regardless of the Python re
fix, so all is well.
Describe the changes
For some reason, Python 3.11 did not like the second condition in the regex (the check for group 7 matching).
I replaced the matches with more optional groups.
Tasks
doc/_build/html/index.html
)