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 — Fix `_PyObject_FastCall` for Python 3.13 by cdce8p · Pull Request #17502 · python/mypy

Conversation

@cdce8p

@cdce8p cdce8p commented Jul 7, 2024

Copy link
Copy Markdown
Collaborator

_PyObject_FastCall will be removed in 3.13. It can safely replaced by PyObject_Vectorcall (available since 3.9) / _PyObject_Vectorcall (available since 3.8). python/cpython#106023 (comment)

https://peps.python.org/pep-0590/

Fixes

  /home/runner/work/mypy/mypy/mypyc/lib-rt/pythonsupport.h: In function ‘update_bases’: (diff)
  /home/runner/work/mypy/mypy/mypyc/lib-rt/pythonsupport.h:62:20: error: implicit declaration of function ‘_PyObject_FastCall’; did you mean ‘PyObject_Call’? [-Werror=implicit-function-declaration] (diff)
     62 |         new_base = _PyObject_FastCall(meth, stack, 1); (diff)
  /home/runner/work/mypy/mypy/mypyc/lib-rt/pythonsupport.h:62:18: error: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion] (diff)
     62 |         new_base = _PyObject_FastCall(meth, stack, 1); (diff)
        |                  ^ (diff)
  /home/runner/work/mypy/mypy/mypyc/lib-rt/pythonsupport.h: In function ‘init_subclass’: (diff)
  /home/runner/work/mypy/mypy/mypyc/lib-rt/pythonsupport.h:111:11: error: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion] (diff)
    111 |     super = _PyObject_FastCall((PyObject *)&PySuper_Type, args, 2); (diff)
        |           ^ (diff)

Sorry, something went wrong.

Uh oh!

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

All reactions
@cdce8p
Fix _PyObject_FastCall for Python 3.13
d3fa254
@cdce8p cdce8p added the topic-mypyc mypyc bugs label Jul 7, 2024
@cdce8p cdce8p mentioned this pull request Jul 7, 2024
Support Python 3.13 mypyc/mypyc#1056
Closed
hauntsaninja
hauntsaninja approved these changes Jul 7, 2024
View reviewed changes
@hauntsaninja
hauntsaninja merged commit 4c54801 into python:master Jul 7, 2024
@cdce8p
cdce8p deleted the fix-3.13-fast-call branch July 7, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hauntsaninja hauntsaninja hauntsaninja approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

topic-mypyc mypyc bugs

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.

2 participants

@cdce8p @hauntsaninja
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 01402503 — 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.