Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue14732] PEP 3121 Refactoring applied to _csv module

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

May 5, 2012, 12:47 PM

Post #1 of 14 (164 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module

New submission from Robin Schreiber <robin.schreiber [at] me>:

This patch presents my first try to apply the proposed Refactoring of PEP3121 to the csv module. I have identified three mutable global variables inside the module, two of which are references to PyObjects. I have wrapped all of them inside a dedicated struct, which is traversed by the gc after "freeing" the module. I also defined some macros, to hide functions calls that are now needed because of the newly introduced indirections.

----------
components: Extension Modules
files: csv_pep3121.patch
keywords: patch
messages: 160032
nosy: Robin.Schreiber
priority: normal
severity: normal
status: open
title: PEP 3121 Refactoring applied to _csv module
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file25473/csv_pep3121.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 5, 2012, 12:49 PM

Post #2 of 14 (161 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Robin Schreiber <robin.schreiber [at] me> added the comment:

The following script should fail before you have applied the bespoken patch: It basically checks wether one of the global PyObjects inside the csv module is being deleted after freeing the csv module.

----------
Added file: http://bugs.python.org/file25474/refactoring_test.py

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 5, 2012, 1:21 PM

Post #3 of 14 (160 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Changes by Martin v. Löwis <martin [at] v>:


----------
nosy: +loewis

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 7, 2012, 8:08 PM

Post #4 of 14 (155 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Changes by Éric Araujo <merwok [at] netwok>:


----------
nosy: +skip.montanaro

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 8, 2012, 3:13 AM

Post #5 of 14 (153 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Changes by Skip Montanaro <skip [at] pobox>:


----------
nosy: -skip.montanaro

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 8, 2012, 3:14 AM

Post #6 of 14 (154 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Skip Montanaro <skip [at] pobox> added the comment:

> Changes by Éric Araujo <merwok [at] netwok>:
>
>
> ----------
> nosy: +skip.montanaro

Thanks, but I'm out of the Python development business, except as it
pertains to my day job...

Skip

----------
nosy: +skip.montanaro

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 8, 2012, 5:33 AM

Post #7 of 14 (157 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

PyModule_AddObject steals the value's reference, so you need to INCREF it before. Besides that, I don't see any obvious bug, but perhaps Martin wants to take a look.

----------
nosy: +pitrou
priority: normal -> low
stage: -> patch review

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 11, 2012, 9:55 AM

Post #8 of 14 (148 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Éric Araujo <merwok [at] netwok> added the comment:

Skip: I used the nosy field autocomplete which is based on the experts file in the devguide; I can mark you "retired" in that file so that your name does not show up in autocomplete (but humans will still know that you might be contacted when all else fails, unless you prefer your name to be fully removed).

----------
nosy: +eric.araujo

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 11, 2012, 10:03 AM

Post #9 of 14 (148 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Skip Montanaro <skip [at] pobox> added the comment:

> Skip: I used the nosy field autocomplete which is based on the experts file in the devguide; I can mark you "retired" in that file so that your name does not show up in autocomplete (but humans will still know that you might be contacted when all else fails, unless you prefer your name to be fully removed).

Thanks. That would be great. I don't mind the occasional question,
but don't want people thinking I am going to jump in feet first any
time I'm made nosy on a ticket.

S

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 13, 2012, 3:11 AM

Post #10 of 14 (136 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Changes by Robin Schreiber <robin.schreiber [at] me>:


Added file: http://bugs.python.org/file25559/csv_pep3121_fix1.patch

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 13, 2012, 5:29 AM

Post #11 of 14 (135 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset 90cf321615e5 by Antoine Pitrou in branch 'default':
Remove Skip from the csv experts (see issue #14732).
http://hg.python.org/devguide/rev/90cf321615e5

----------
nosy: +python-dev

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 16, 2012, 2:35 AM

Post #12 of 14 (133 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset 2496602a56e5 by Antoine Pitrou in branch 'default':
Issue #14732: The _csv module now uses PEP 3121 module initialization.
http://hg.python.org/cpython/rev/2496602a56e5

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 16, 2012, 2:36 AM

Post #13 of 14 (135 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

Thanks for the updated patch, Robin. I have now committed it to the default branch.

----------
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 16, 2012, 3:04 AM

Post #14 of 14 (133 views)
Permalink
[issue14732] PEP 3121 Refactoring applied to _csv module [In reply to]

Antoine Pitrou <pitrou [at] free> added the comment:

Robin, I forgot: could you please sign and send the contrib form at http://www.python.org/psf/contrib/ ?
It is not a copyright assignment, just a piece of paper that formally allows us to license your contribution for distribution with Python.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.