Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix PathFinder.find_module AttributeError for Python 3.12#1176

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
diraol merged 1 commit intopython-mode:developfromwookayin:py312-find-module
Sep 23, 2023

Conversation

wookayin
Copy link
Contributor

PathFinder.find_module() has been deprecated since Python 3.4 in favor of find_spec(), and it's finally removed in Python 3.12. This line will throw an AttributeError which makes pymode completely unusable with python 3.12.

It was a hacky workaround introduced in#1028. Maybe we can completely remove this workaround because it's 4 years ago and the minimum supported python version is now 3.6+.

I'm not sure if we can completely remove this monkey-patching at this point because I cannot guess wherevim.find_module is ever used, but I'll leave it as the most compatible fallback.

Ref:

bckim92 reacted with thumbs up emoji
PathFinder.find_module() has been deprecated since Python 3.4 in favor offind_spec(), and it's finally removed in Python 3.12. This line willthrow an AttributeError which makes pymode completely unusable withpython 3.12.It was a hacky workaround introduced inpython-mode#1028. Maybe we can completelyremove this workaround because it's 4 years ago and the minimumsupported python version is now 3.6+.
Copy link
Contributor

@diraoldiraol left a comment

Choose a reason for hiding this comment

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

The problem here is that we are not talking about the python version related to the code that is being edited and sometimes not even the python version from the current environment. It is the python version that was used during vim build time.

Just to be in the safe zone here I think we can leave this "monkey patch", but with your suggestion.

@diraoldiraol merged commite01c27e intopython-mode:developSep 23, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@diraoldiraoldiraol approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@wookayin@diraol

[8]ページ先頭

©2009-2025 Movatter.jp