Skip to content

posixmodule: convert statically allocated types (DirEntryType & ScandirIteratorType) to heap-allocated types #79562

Closed

Description

@eduardo-elizondo
BPO 35381
Nosy @vstinner, @encukou, @ericsnowcurrently, @jdemeyer, @miss-islington, @eduardo-elizondo
PRs
  • bpo-35381 Make all posixmodule types heap-allocated #10854
  • bpo-35381 Remove all static state from posixmodule #15892
  • 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-11-06.14:20:44.509>
    created_at = <Date 2018-12-03.06:33:59.295>
    labels = ['3.8', 'library']
    title = 'posixmodule: convert statically allocated types (DirEntryType & ScandirIteratorType) to heap-allocated  types'
    updated_at = <Date 2020-01-20.12:19:25.650>
    user = 'https://github.com/eduardo-elizondo'

    bugs.python.org fields:

    activity = <Date 2020-01-20.12:19:25.650>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-11-06.14:20:44.509>
    closer = 'petr.viktorin'
    components = ['Library (Lib)']
    creation = <Date 2018-12-03.06:33:59.295>
    creator = 'eelizondo'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35381
    keywords = ['patch']
    message_count = 9.0
    messages = ['330906', '339745', '351895', '356043', '356133', '356634', '356700', '357427', '360311']
    nosy_count = 6.0
    nosy_names = ['vstinner', 'petr.viktorin', 'eric.snow', 'jdemeyer', 'miss-islington', 'eelizondo']
    pr_nums = ['10854', '15892']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue35381'
    versions = ['Python 3.8']

    Activity

    1. eduardo-elizondo commented on Dec 3, 2018

      eduardo-elizondomannequin
      MannequinAuthor

      After bpo-34784, there are still two more cases of statically allocated types (DirEntryType & ScandirIteratorType). These should also be heap allocated to make posixmodule fully compatible with PEP-384.

    2. changed the title [-]Heap-allocated Posixmodule[/-] [+]Heap-allocated Posixmodule types[/+] on Dec 3, 2018
    3. changed the title [-]Heap-allocated Posixmodule types[/-] [+]Heap-allocated posixmodule types[/+] on Dec 3, 2018
    4. changed the title [-]Heap-allocated posixmodule types[/-] [+]posixmodule: convert statically allocated types (DirEntryType & ScandirIteratorType) to heap-allocated types[/+] on Jan 7, 2019
    5. jdemeyer commented on Apr 9, 2019

      @jdemeyer
      Contributor

      Just curious... how is PEP-384 relevant to modules insides CPython itself? I thought that this only mattered for external packages. Do you expect people to use a 3.7-compiled posixmodule.c on Python 3.8?

    6. ericsnowcurrently commented on Sep 11, 2019

      @ericsnowcurrently
      Member

      @jeroen, see Dino's expalantion in https://bugs.python.org/issue38075#msg351627 (relative to the "random" module).

    7. miss-islington commented on Nov 5, 2019

      @miss-islington
      Contributor

      New changeset b396663 by Miss Islington (bot) (Eddie Elizondo) in branch 'master':
      bpo-35381 Remove all static state from posixmodule (GH-15892)
      b396663

    8. encukou commented on Nov 6, 2019

      @encukou
      Member

      The module still uses tp_new directly, so it's not limited to only stable ABI, but that's for another issue.

      Thanks for the contribution!

    9. vstinner commented on Nov 14, 2019

      @vstinner
      Member

      This change introduced a reference leak: bpo-38803 "test_wait3 and test_wait4 leaked references on x86 Gentoo Refleaks 3.x".

    10. eduardo-elizondo commented on Nov 15, 2019

      eduardo-elizondomannequin
      MannequinAuthor

      Woops! I'll get to it before the end of the weekend!

    11. eduardo-elizondo commented on Nov 25, 2019

      eduardo-elizondomannequin
      MannequinAuthor

      PR with fix is out.

    12. vstinner commented on Jan 20, 2020

      @vstinner
      Member

      This issue introduced a regression: bpo-39395 "The os module should unset() environment variable at exit".

    13. 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 lifestdlibStandard Library Python modules in the Lib/ directory

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions