Skip to content

Fix tests with Python 3.13 #104

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

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Fix tests with Python 3.13 #104

merged 1 commit into from
Jul 12, 2024

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Jun 28, 2024

EDIT: Fixes #102

Python 3.13 dedents all docstrings, while older versions only stripped initial whitespace (from the first line). To achieve consistent matches across all Python versions, use a regular expression to dedent all lines in both cases.

Furthermore, the docstring of functools.partial() has changed. Rather than hardcoding one, just match against functools.partial.__doc__.

Python 3.13 dedents all docstrings, while older versions only stripped
initial whitespace (from the first line).  To achieve consistent matches
across all Python versions, use a regular expression to dedent all lines
in both cases.

Furthermore, the docstring of `functools.partial()` has changed.  Rather
than hardcoding one, just match against `functools.partial.__doc__`.

Fixes smarie#102
@smarie
Copy link
Owner

smarie commented Jul 10, 2024

Thanks @mgorny . Since python 3.13 is not in the CI today, you also need to add it to the noxfile.py, so that the issue that you are describing actually happens. I would advise to

  • first temporarily stash your changes locally
  • modify noxfile by adding 3.13
  • modify the setup.cfg to add python 3.13 as officially supported https://github.com/smarie/python-makefun/blob/main/setup.cfg#L32
  • confirm that the issue actually happens
  • put back your changes (unstash)
  • modify the changelog to declare in the "in progress" new section, that support for python 3.13 has been added
  • push and check that nox sessions run fine

@mgorny
Copy link
Contributor Author

mgorny commented Jul 10, 2024

Thanks but I'm not interested in performing the maintenance tasks for this package.

@smarie
Copy link
Owner

smarie commented Jul 12, 2024

No worries @mgorny , I understand

@smarie smarie merged commit 76d31cd into smarie:main Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests fail with python3.13b2
2 participants