Skip to content

bpo-34533: Remove all static state from _csv module - #16078

Closed
eduardo-elizondo wants to merge 3 commits into
python:masterfrom
eduardo-elizondo:csv-384
Closed

eduardo-elizondo wants to merge 3 commits into
python:masterfrom
eduardo-elizondo:csv-384

Conversation

@eduardo-elizondo

@eduardo-elizondo eduardo-elizondo commented Sep 13, 2019 •

Copy link
Copy Markdown
Contributor

Add all the changes needed to make _csv compatible with PEP384 as well as removing all static state from it

https://bugs.python.org/issue34533

@eduardo-elizondo

Copy link
Copy Markdown
Contributor Author

Also, #8977 was trying to address this first but I couldn't manage to get a branch back from that so I just created a new PR

@encukou

encukou commented Sep 13, 2019

Copy link
Copy Markdown
Member

The PoC/WIP implementation of PEP 573 should do this plus also remove reliance PyState_FindModule.
I'll concentrate on that PEP rather than on reviewing this.

@eduardo-elizondo

Copy link
Copy Markdown
Contributor Author

Yup! PEP573 should be the long term solution for getting the module state in C Extensions. We can always go back and update this module once the PEP is finalized. On that note, I have a couple of comments/questions that I've been meaning to post in capi-sig about PEP573. I should prioritize that as well :-)

For now though, this should be ready to be merged as is (pending any in-line comments reviewers might have).

@eduardo-elizondo eduardo-elizondo changed the title bpo-34533: Make _csv compatible with PEP384 Sep 23, 2019
@ericsnowcurrently

Copy link
Copy Markdown
Member

Sorry, for the delay, @eduardo-elizondo. I plan on taking a look next Friday.

encukou added a commit to encukou/cpython that referenced this pull request May 19, 2020
See: python#16078
This is slightly nicer.

Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jun 4, 2020
See: python#16078
This is slightly nicer.

Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
encukou added a commit to encukou/cpython that referenced this pull request Oct 20, 2020
Uses code from: python#16078

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
Co-authored-by: Hai Shi <shihai1992@gmail.com>
@encukou

encukou commented Oct 20, 2020

Copy link
Copy Markdown
Member

Here is my attempt: #22838

encukou added a commit to encukou/cpython that referenced this pull request Nov 10, 2020
Uses code from: python#16078

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
Co-authored-by: Hai Shi <shihai1992@gmail.com>
encukou added a commit that referenced this pull request Dec 15, 2020
Uses code from: #16078

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
Co-authored-by: Hai Shi <shihai1992@gmail.com>
@encukou

encukou commented Dec 15, 2020

Copy link
Copy Markdown
Member

#23224, which includes this code, is now merged. Thank you for working on this!

@encukou encukou closed this Dec 15, 2020
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Uses code from: python#16078

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
Co-authored-by: Hai Shi <shihai1992@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

5 participants