GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python: fix compatibility with Python 3.13 by yselkowitz · Pull Request #15088 · vim/vim

Conversation

@yselkowitz

@yselkowitz yselkowitz commented Jun 23, 2024

Copy link
Copy Markdown
Contributor

_PyObject_CallFunction_SizeT was dropped in Python 3.13:

python/cpython#105051

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@yselkowitz
runtime(python): fix compatibility with Python 3.13
18839a1
_PyObject_CallFunction_SizeT was dropped in Python 3.13:

python/cpython#105051

Signed-off-by: Yaakov Selkowitz <[email protected]>
@github-actions github-actions Bot added the if_python label Jun 23, 2024
@k-takata k-takata changed the title runtime(python): fix compatibility with Python 3.13 python: fix compatibility with Python 3.13 Jun 23, 2024
@k-takata

k-takata commented Jun 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Does this affect when the limited API is used?
(When Vim is compiled with the limited API, it should work both with Python 3.13 and Python 3.12 or earlier.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@yselkowitz

yselkowitz commented Jun 23, 2024

Copy link
Copy Markdown
Contributor Author

PyObject_CallFunction is listed as part of the Limited API according to https://docs.python.org/3/c-api/stable.html#contents-of-limited-api but perhaps I didn't understand your question.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@yselkowitz yselkowitz mentioned this pull request Jun 24, 2024
TASK: recover from Perl 5.40 and Python 3.13 mass rebuild fedora-eln/eln#189
Closed
38 tasks done
@zdohnal

zdohnal commented Jun 27, 2024

Copy link
Copy Markdown
Contributor

Hi @k-takata ,

what do you mean by "VIm compiled with limited API" - do you mean "dynamic" configure option value for --enable-python3interp? If you do, I would say the patch preserves using the old API for older Pythons and uses the new one for 3.13.
Please let us know how we could change the patch - VIm is currently not building in Fedora Rawhide, because new Python 3.13 came into the compose, so we would like to help with the fix.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@k-takata

k-takata commented Jun 27, 2024

Copy link
Copy Markdown
Member

@zdohnal I meant the --with-python3-stable-abi option. (Limited API == Stable ABI)
Ideally, if Vim is compiled with --enable-python3interp=dynamic --with-python3-stable-abi=3.8, it should work with any version of Python between 3.8 and 3.13.
This is mostly useful for Windows users, so we can include this PR for now, and can check the compatibility later (if it is difficult to check).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zdohnal

zdohnal commented Jun 27, 2024

Copy link
Copy Markdown
Contributor

@k-takata the current Fedora releases have Python 3.12 and Centos Stream 9 has 3.9 - I've successfully built the current Vim on all mentioned platforms with the options you mentioned. Tried ':py3 print('hello')' in c9s and it worked. In Fedora, public tests which run Vim project test suite passed with the patch, so it looks good.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrisbra

chrisbra commented Jul 4, 2024

Copy link
Copy Markdown
Member

Thanks all.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrisbra chrisbra closed this in 4179f19 Jul 4, 2024
RestorerZ pushed a commit to RestorerZ/fork_vim-orig that referenced this pull request Jul 9, 2024
@yselkowitz @RestorerZ
patch 9.1.0521: if_py: _PyObject_CallFunction_SizeT is dropped in Pyt…
53b2e52
…hon 3.13

Problem:  if_py: _PyObject_CallFunction_SizeT is dropped in Python 3.13
Solution: define PyObject_CallFunction for Python >= 3.13
          (Yaakov Selkowitz)

references: python/cpython#105051

closes: vim#15088

Signed-off-by: Yaakov Selkowitz <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

if_python

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@yselkowitz @k-takata @zdohnal @chrisbra
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.