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

Upgrade to Python 3.13 #11588

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Upgrade to Python 3.13 #11588

merged 1 commit into from
Sep 30, 2024

Conversation

cclauss
Copy link
Member

@cclauss cclauss commented Sep 30, 2024

Describe your change:

Python 3.13 is scheduled to be released in one week. https://peps.python.org/pep-0719

Disable TensorFlow because it is not yet compatible with the current version of CPython.

  • Upgrade Python?
  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Add or change doctests? -- Note: Please avoid changing both code and tests in a single pull request.
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the description above includes the issue number(s) with a closing keyword: "Fixes #ISSUE-NUMBER".

@cclauss cclauss marked this pull request as ready for review September 30, 2024 11:58
@algorithms-keeper algorithms-keeper bot added awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files labels Sep 30, 2024
@cclauss cclauss changed the title DRAFT: Upgrade to Python 3.13 Upgrade to Python 3.13 Sep 30, 2024
@cclauss
Copy link
Member Author

cclauss commented Sep 30, 2024

@TheAlgorithms/python_maintainers You reviews, please.

Copy link
Contributor

Choose a reason for hiding this comment

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

My understanding is that tweepy will stop working on 3.13 because imghdr will have been removed. Do we know if there are any plans or maintenance efforts to fix tweepy for 3.13+? If not, is it even worth keeping this file in the repo since it'll be unusable?

Copy link
Member Author

@cclauss cclauss Sep 30, 2024

Choose a reason for hiding this comment

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

I wrote python/cpython#120871

https://docs.python.org/3.13/whatsnew/3.13.html#removed-modules-and-apis

imghdr: The filetype, puremagic, or python-magic libraries should be used as replacements. For example, the puremagic.what() function can be used to replace the imghdr.what() function for all file formats that were supported by imghdr.

https://github.com/cdgriffith/puremagic#imghdr-replacement

@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Sep 30, 2024
@algorithms-keeper algorithms-keeper bot removed the tests are failing Do not merge until tests pass label Sep 30, 2024
@cclauss cclauss merged commit 0177ae1 into TheAlgorithms:master Sep 30, 2024
3 checks passed
@algorithms-keeper algorithms-keeper bot removed the awaiting reviews This PR is ready to be reviewed label Sep 30, 2024
@cclauss cclauss deleted the Python3.13 branch September 30, 2024 21:01
@cclauss cclauss mentioned this pull request Oct 1, 2024
@isidroas isidroas mentioned this pull request Jan 25, 2025
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This PR modified some existing files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants