Complete dropping Python 3.7#2975
Complete dropping Python 3.7#2975EnricoMi merged 4 commits intoPyGithub:mainfrom khneal:feat/support_Python_3.12
Conversation
tests/WorkflowJob.py
Outdated
| completed_at = datetime(2023, 2, 17, 16, 4, 52, tzinfo=timezone.utc) | ||
| self.assertEqual(self.job.completed_at, completed_at) | ||
| self.assertEqual(self.job.name, "test (Python 3.7)") | ||
| self.assertEqual(self.job.name, "test (Python 3.8)") |
There was a problem hiding this comment.
This change breaks a unit test, so I will revert.
EnricoMi
left a comment
There was a problem hiding this comment.
Fine with me, please consider the proposed change.
| @staticmethod | ||
| # replace with str.removesuffix once support for Python 3.7 is dropped | ||
| # replace with str.removesuffix once support for Python 3.8 is dropped | ||
| def remove_suffix(string: str, suffix: str) -> str: |
There was a problem hiding this comment.
Can you replace the usage of remove_suffix with str.removesuffix and remove this method?
There was a problem hiding this comment.
It would break in Python 3.8. The comment in the code was wrong, but it's fixed now.
str.removesuffix was added in 3.9, not 3.8.
See PEP 616 as well as Python Docs:
New in version 3.9.
There was a problem hiding this comment.
No worries, and thank you!
raboof
left a comment
There was a problem hiding this comment.
can confirm that 3.12 seems to work fine, so making that 'official' seems reasonable
|
Fixed in #3008, but there seem to be some bits missing. |
Python 3.12 has been GA for 6 months. Python 3.7 is EOL.
Based on #2434 and #2332