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 — Remove cross-version binary compatibility · Issue #76569 · python/cpython

Remove cross-version binary compatibility #76569

New issue
Copy link
New issue
Copy link
Closed
Closed
Remove cross-version binary compatibility#76569
Copy link
Labels
3.8 (EOL)end of lifeend of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@pitrou
pitrou
opened on Dec 20, 2017
Issue body actions
BPO 32388
Nosy @warsaw, @pfmoore, @ncoghlan, @pitrou, @scoder, @vstinner, @tjguk, @ned-deily, @njsmith, @zware, @serhiy-storchaka, @zooba
PRs
  • bpo-32388: Remove cross-version binary compatibility requirement in tp_flags #4944
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-05-29.20:13:09.708>
    created_at = <Date 2017-12-20.17:27:58.959>
    labels = ['interpreter-core', 'type-bug', '3.8']
    title = 'Remove cross-version binary compatibility'
    updated_at = <Date 2019-06-12.13:11:44.251>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2019-06-12.13:11:44.251>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-05-29.20:13:09.708>
    closer = 'pitrou'
    components = ['Interpreter Core']
    creation = <Date 2017-12-20.17:27:58.959>
    creator = 'pitrou'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32388
    keywords = ['patch']
    message_count = 12.0
    messages = ['308753', '308881', '308882', '308884', '313182', '313351', '319944', '319947', '341560', '343918', '343919', '345339']
    nosy_count = 12.0
    nosy_names = ['barry', 'paul.moore', 'ncoghlan', 'pitrou', 'scoder', 'vstinner', 'tim.golden', 'ned.deily', 'njs', 'zach.ware', 'serhiy.storchaka', 'steve.dower']
    pr_nums = ['4944']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue32388'
    versions = ['Python 3.8']

    Activity

    1. pitrou commented on Dec 20, 2017

      @pitrou
      pitrou
      on Dec 20, 2017
      MemberAuthor
      More actions

      See original discussion on python-dev:
      https://mail.python.org/pipermail/python-dev/2017-December/151328.html

      Summary: binary compatibility for C extensions which don't use the stable ABI is currently "best effort" and uses distinguished flags in the tp_flags field of type objects to indicate whether a field is physically present or not. Unfortunately, tp_flags is 32 bits and therefore a scarce resource. Also, binary compatibility is 1) not guaranteed anyway 2) of less use nowadays.

      So we propose to remove the binary compatibility requirement when creating static type objects (i.e. not using the stable ABI).

    2. pitrou
      added
      3.7 (EOL)end of lifeend of life
      interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      on Dec 20, 2017
    3. zooba commented on Dec 21, 2017

      @zooba
      zooba
      on Dec 21, 2017
      Member
      More actions

      Totally okay with this in theory, but wanted to clarify that the linked PR is really just taking advantage of removing the guarantee?

      That is, the change isn't necessary to remove the requirement.

    4. pitrou commented on Dec 21, 2017

      @pitrou
      pitrou
      on Dec 21, 2017
      MemberAuthor
      More actions

      That's basically exact. Actually, there is no ABI guarantee at all (when not using the stable ABI), just a best effort for advanced users who know what they're doing.

      Actually, this PR stems from Nathaniel's message here:
      https://mail.python.org/pipermail/python-dev/2017-December/151345.html

    5. zooba commented on Dec 21, 2017

      @zooba
      zooba
      on Dec 21, 2017
      Member
      More actions

      Good to know. As I said on the other issue, Windows won't load extension modules built for a different version anyway unless they use the stable ABI, so there's no real reason these flags need to be binary compatible between 3.x versions.

    6. scoder commented on Mar 3, 2018

      @scoder
      scoder
      on Mar 3, 2018
      Contributor
      More actions

      I'm ok with "removing" this "guarantee" (although it seems too late to apply this specific change to 3.7 now).

      While Cython users do ask for a way to build cross-version binaries from time to time, it's neither supported nor planned, and the underlying problem is IMHO solved better via tooling like the manylinux wheel build.

      I also generally consider it good to let user code take advantage of new features in new CPython releases, even if it means that they need to retranslate their Cython code from time to time. The 1.5 years release cycle of CPython should exceed that of most "still in maintenance" extension modules out there, and it's long enough to not impose a real burden on their maintainers.

    7. pitrou commented on Mar 6, 2018

      @pitrou
      pitrou
      on Mar 6, 2018
      MemberAuthor
      More actions

      Yes, let's retarget to 3.8.

    8. pitrou
      added
      3.8 (EOL)end of lifeend of life
      and removed
      3.7 (EOL)end of lifeend of life
      on Mar 6, 2018
    9. vstinner commented on Jun 19, 2018

      @vstinner
      vstinner
      on Jun 19, 2018
      Member
      More actions

      In which version of Python tp_finalize slot has been added? Does it mean that Python 3.8 wil crash on loading C extensions compiled on Python older than this version?

    10. pitrou commented on Jun 19, 2018

      @pitrou
      pitrou
      on Jun 19, 2018
      MemberAuthor
      More actions

      Does it mean that Python 3.8 wil crash on loading C extensions compiled on Python older than this version?

      What makes you think that it would be otherwise be able to load and execute such C extensions without any bugs?

      There is no ABI except the stable ABI, and tp_flags isn't part of the stable ABI.

      PS : tp_finalize is in Python 3.4, but that doesn't really matter.

    11. pitrou commented on May 6, 2019

      @pitrou
      pitrou
      on May 6, 2019
      MemberAuthor
      More actions

      I updated the PR (sorry to let this sleep).

    12. pitrou commented on May 29, 2019

      @pitrou
      pitrou
      on May 29, 2019
      MemberAuthor
      More actions

      New changeset ada319b by Antoine Pitrou in branch 'master':
      bpo-32388: Remove cross-version binary compatibility requirement in tp_flags (GH-4944)
      ada319b

    13. pitrou commented on May 29, 2019

      @pitrou
      pitrou
      on May 29, 2019
      MemberAuthor
      More actions

      PR is merged now!

    14. pitrou
      closed this as completedon May 29, 2019
    15. vstinner commented on Jun 12, 2019

      @vstinner
      vstinner
      on Jun 12, 2019
      Member
      More actions

      About ABI "foward compatibility", Python 3.8 introduced another backward incompatible change: bpo-37250 "C files generated by Cython set tp_print to NULL: PyTypeObject.tp_print removed, replaced with tp_vectorcall_offset".

    16. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)end of lifeend of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        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.