The PTVS gang (from microsoft) would like to hear from python-list users!

2014-04-25 Thread Shahrokh Mortazavi
? Hi - we're a few engineers (not marketers!) that work on Python Tools for Visual Studio (http://pytools.codeplex.com). It's a free OSS plug-in that turns VS into a decent Python IDE. It has some nice features like mixed-mode Python/C++ debugging, debugging on Linux from Visual Studio and

Executing pl/sql script File in python without sqlclient

2014-04-25 Thread Code
Is there a way to execute pl/sql Script files through Python without sqlclient. i have checked cx_oracle and i guess it requires oracle client, so is there a way to execute without oracle client. -- https://mail.python.org/mailman/listinfo/python-list

soap library for python-3.x

2014-04-25 Thread Deepika Nagpal
Hi, We have to start a project of developing a soap server in python-3.x for which I am looking for a soap server side library. Please let me know what are the options available and which of these libraries are actively maintained. Thanks. Regards, Deepika Nagpal

RE: Executing pl/sql script File in python without sqlclient

2014-04-25 Thread Joseph L. Casale
Is there a way to execute pl/sql Script files through Python without sqlclient. https://code.google.com/p/pypyodbc/ might work for you... i have checked cx_oracle and i guess it requires oracle client, so is there a way to execute without oracle client. Right, as the name implies it uses

how to split this kind of text into sections

2014-04-25 Thread oyster
I have a long text, which should be splitted into some sections, where all sections have a pattern like following with different KEY. And the /n/r can not be used to split I don't know whether this can be done easily, for example by using RE module [demo text starts] a line we do not need I am

Re: how to split this kind of text into sections

2014-04-25 Thread Roy Smith
In article mailman.9492.1398431281.18130.python-l...@python.org, oyster lepto.pyt...@gmail.com wrote: I have a long text, which should be splitted into some sections, where all sections have a pattern like following with different KEY. And the /n/r can not be used to split I don't know

Re: how to split this kind of text into sections

2014-04-25 Thread Chris Angelico
On Fri, Apr 25, 2014 at 11:07 PM, oyster lepto.pyt...@gmail.com wrote: the above text should be splitted as a LIST with 3 items, and I also need to know the KEY for LIST is ['I am section', 'let's continue', 'I am using']: It's not perfectly clear, but I think I have some idea of what you're

MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-25 Thread Matthew Pounsett
I've run into a threading error in some code when I run it on MacOS that works flawlessly on a *BSD system running the same version of python. I'm running the python 2.7.6 for MacOS distribution from python.org's downloads page. I have tried to reproduce the error with a simple example, but

Re: soap library for python-3.x

2014-04-25 Thread Ben Finney
Deepika Nagpal deep...@cdot.in writes: We have to start a project of developing a soap server in python-3.x for which I am looking for a soap server side library. Please let me know what are the options available and which of these libraries are actively maintained. Thanks. You can start

Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-25 Thread Chris Angelico
On Fri, Apr 25, 2014 at 11:43 PM, Matthew Pounsett matt.pouns...@gmail.com wrote: If I insert that object into the test code and run it instead of MyThread(), I get the error. I can't see anything in there that should cause problems for the threading module though... especially since this

len() of unsized object - ks test

2014-04-25 Thread Jamie Mitchell
Hello all, I am trying to perform a Kolmogorov-Smirnov test in Python but I'm having a few difficulties. # My files are netCDF so I import them as follows: control=netCDF4.Dataset('/data/cr1/jmitchel/Q0/swh/controlperiod/south_west/swhcontrol_swest_concatannavg_1D.nc','r') # The string is

Re: how to split this kind of text into sections

2014-04-25 Thread Tim Chase
On 2014-04-25 23:31, Chris Angelico wrote: On Fri, Apr 25, 2014 at 11:07 PM, oyster lepto.pyt...@gmail.com wrote: the above text should be splitted as a LIST with 3 items, and I also need to know the KEY for LIST is ['I am section', 'let's continue', 'I am using']: It's not perfectly

Re: len() of unsized object - ks test

2014-04-25 Thread MRAB
On 2014-04-25 15:07, Jamie Mitchell wrote: Hello all, I am trying to perform a Kolmogorov-Smirnov test in Python but I'm having a few difficulties. # My files are netCDF so I import them as follows:

Re: how to split this kind of text into sections

2014-04-25 Thread Jussi Piitulainen
oyster writes: I have a long text, which should be splitted into some sections, where all sections have a pattern like following with different KEY. itertools.groupby, if you know how to extract a key from a given line. And the /n/r can not be used to split Yet you seem to want to have each

Re: how to split this kind of text into sections

2014-04-25 Thread Steven D'Aprano
On Fri, 25 Apr 2014 21:07:53 +0800, oyster wrote: I have a long text, which should be splitted into some sections, where all sections have a pattern like following with different KEY. And the /n/r can not be used to split I don't know whether this can be done easily, for example by using RE

Re: len() of unsized object - ks test

2014-04-25 Thread Steven D'Aprano
On Fri, 25 Apr 2014 07:07:54 -0700, Jamie Mitchell wrote: Hello all, I am trying to perform a Kolmogorov-Smirnov test in Python but I'm having a few difficulties. # My files are netCDF so I import them as follows: control=netCDF4.Dataset('/data/cr1/jmitchel/Q0/swh/controlperiod/

Re: how to split this kind of text into sections

2014-04-25 Thread Steven D'Aprano
On Fri, 25 Apr 2014 09:18:22 -0400, Roy Smith wrote: In article mailman.9492.1398431281.18130.python-l...@python.org, oyster lepto.pyt...@gmail.com wrote: [demo text starts] a line we do not need I am section axax I am section bbb, we can find that the first 2 lines of this section all

Re: len() of unsized object - ks test

2014-04-25 Thread Jamie Mitchell
On Friday, April 25, 2014 3:07:54 PM UTC+1, Jamie Mitchell wrote: Hello all, I am trying to perform a Kolmogorov-Smirnov test in Python but I'm having a few difficulties. # My files are netCDF so I import them as follows:

possible bug in re expression?

2014-04-25 Thread Robin Becker
Whilst translating some javascript code I find that this A=re.compile('.{1,+3}').findall(p) doesn't give any error, but doesn't manage to find the strings in p that I want len(A)==0, the correct translation should have been A=re.compile('.{1,3}').findall(p) which works fine. should

Re: possible bug in re expression?

2014-04-25 Thread Chris Angelico
On Sat, Apr 26, 2014 at 2:30 AM, Robin Becker ro...@reportlab.com wrote: Whilst translating some javascript code I find that this A=re.compile('.{1,+3}').findall(p) doesn't give any error, but doesn't manage to find the strings in p that I want len(A)==0, the correct translation should have

Re: Moving to an OOP model from an classically imperitive one

2014-04-25 Thread Amirouche Boubekki
Héllo, I have no definitive answer regarding the OOP/functional mismatch. 2014-04-24 18:53 GMT+02:00 tim.thel...@gmail.com: A reasonable compromise might be to keep the *data* assocated with a SubuserProgram in a class, maybe together with a few methods that are tightly coupled to it,

Re: retrieve source code from code object as returned by compile()

2014-04-25 Thread Amirouche Boubekki
in python3, I do inspect.getsource(object) [dochttps://docs.python.org/3/library/inspect.html#inspect.getsource], I don't know the limitations. On Python 2, there is meta https://pypi.python.org/pypi/meta. My interest is different, I use to retrieve the definition of function to submit it to a

Re: how to split this kind of text into sections

2014-04-25 Thread Terry Reedy
On 4/25/2014 9:07 AM, oyster wrote: I have a long text, which should be splitted into some sections, where all sections have a pattern like following with different KEY. Computers are worse at reading your mind than humans. If you can write rules that another person could follow, THEN we

Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Charles Hixson
What is the proper way to delete selected items during iteration of a map? What I want to do is: for (k, v) in m.items(): if f(k): # do some processing of v and save result elsewhere del m[k] But this gives (as should be expected): RuntimeError: dictionary changed size

Re: possible bug in re expression?

2014-04-25 Thread MRAB
On 2014-04-25 17:55, Chris Angelico wrote: On Sat, Apr 26, 2014 at 2:30 AM, Robin Becker ro...@reportlab.com wrote: Whilst translating some javascript code I find that this A=re.compile('.{1,+3}').findall(p) doesn't give any error, but doesn't manage to find the strings in p that I want

Re: Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Chris Angelico
On Sat, Apr 26, 2014 at 3:53 AM, Charles Hixson charleshi...@earthlink.net wrote: What is the proper way to delete selected items during iteration of a map? What I want to do is: for (k, v) in m.items(): if f(k): # do some processing of v and save result elsewhere del m[k]

Re: Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Matthew Barnett
On 2014-04-25 18:53, Charles Hixson wrote: What is the proper way to delete selected items during iteration of a map? What I want to do is: for (k, v) in m.items(): if f(k): # do some processing of v and save result elsewhere del m[k] But this gives (as should be

Re: possible bug in re expression?

2014-04-25 Thread Terry Reedy
On 4/25/2014 12:30 PM, Robin Becker wrote: Whilst translating some javascript code I find that this A=re.compile('.{1,+3}').findall(p) doesn't give any error, but doesn't manage to find the strings in p that I want len(A)==0, the correct translation should have been

Re: xlutils 1.7.1 released!

2014-04-25 Thread Chris Withers
*sigh* subject line fail... On 25/04/2014 19:48, Chris Withers wrote: Hi All, I'm pleased to announce the release of xlutils 1.7.1: http://pypi.python.org/pypi/xlutils/1.7.1 This release has a couple of small changes: - Add support for time cells in when using View classes. - Add support

Re: Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Terry Reedy
On 4/25/2014 2:04 PM, Matthew Barnett wrote: On 2014-04-25 18:53, Charles Hixson wrote: What is the proper way to delete selected items during iteration of a map? What I want to do is: for (k, v) in m.items(): if f(k): # do some processing of v and save result elsewhere

xlutils 1.7.0 released!

2014-04-25 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlutils 1.7.1: http://pypi.python.org/pypi/xlutils/1.7.1 This release has a couple of small changes: - Add support for time cells in when using View classes. - Add support for ``.xlsx`` files when using View classes, at the expense of

Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-25 Thread Ned Deily
In article captjjmpxuj9n3cdqch0ojavksfvrqjwhh1gst3fafkcgyw5...@mail.gmail.com, Chris Angelico ros...@gmail.com wrote: On Fri, Apr 25, 2014 at 11:43 PM, Matthew Pounsett matt.pouns...@gmail.com wrote: If I insert that object into the test code and run it instead of MyThread(), I get the

Re: Proper deletion of selected items during map iteration in for loop

2014-04-25 Thread Tim Chase
On 2014-04-25 14:50, Terry Reedy wrote: If you expect to delete more than half the keys *and* if there are no other references to the dict, such that you need the particular object mutated, this might be better. If that's your precondition, then it might be better to do something like keep

Re: Installing PyGame?

2014-04-25 Thread Gregory Ewing
Ned Deily wrote: I disagree that installing a bunch of disparate software from various sources via binary installers and/or source is to be preferred to a modern third-party package manager on OS X like MacPorts or Homebrew. That's just setting yourself up for a long-term maintenance

Re: Installing PyGame?

2014-04-25 Thread Gregory Ewing
Ryan Hiebert wrote: I've chosen to use MacPorts because it keeps things separate, because when things get hosed using the system libraries, I don't have to erase my whole system to get back to a vanilla OS X install. I don't know what you're doing to hose your system that badly. I've never

Re: retrieve source code from code object as returned by compile()

2014-04-25 Thread Gregory Ewing
Amirouche Boubekki wrote: in python3, I do inspect.getsource(object) [doc https://docs.python.org/3/library/inspect.html#inspect.getsource], I don't know the limitations. The limitation relevant here is that it requires the original source file to be present. :-) -- Greg --

feedparser error

2014-04-25 Thread tad na
python 2.7.2 The following code has an error and I can not figure out why: import feedparser d = feedparser.parse('http://bl.ocks.org/mbostock.rss') numb = len(d['entries']) for post in d.entries: print post.pubDate+\n --- the error is : print

Using Python to get push notifications from an RSS feed?

2014-04-25 Thread John Salerno
As a little project for myself (and to help get immediate player notes for my fantasy baseball team), I'm wondering what modules I might need to do this. Basically, I'd like to get immediate notification when a new player note has been added to an RSS feed. Since it will only be for specified

Play back and record sound *at the same time* for n seconds

2014-04-25 Thread tfischer . ncku
Hello, to program an art project that involves sound feedback I need a way to get a python script to to play back and to record sound *at the same time* for n seconds. Which strategy/sound module would you recommend, and could you post dummy code that shows how to get it to play and record

[issue21340] Possible concurrency bug in asyncio, AttributeError in tasks.py

2014-04-25 Thread Guido van Rossum
Guido van Rossum added the comment: Oh wait, it looks like the assert failed because KeyboardInterrupt hit right at that point. I ran the program a few times and when I hit ^C I get a traceback at a different point in the code each time. This is as expected. You must have hit the rare case

[issue17552] socket.sendfile()

2014-04-25 Thread akira
akira added the comment: I'm confused. Why is blocksize necessary at all? My guess, it may be used to implement socket.send()-based fallback. Its meaning could be the same as *length* parameter in shutil.copyfileobj The fallback is useful if os.sendfile doesn't exists or it doesn't accept

[issue21348] File C:\Python27\lib\distutils\msvc9compiler.py, line 295, in query_vcvarsal l raise ValueError(str(list(result.keys()))) ValueError: [u'path']

2014-04-25 Thread Stefan Krah
Stefan Krah added the comment: This looks like a duplicate of #7511. -- nosy: +skrah resolution: - duplicate stage: - resolved status: open - closed superseder: - msvc9compiler.py: ValueError when trying to compile with VC Express ___ Python

[issue20434] Fix error handler of _PyString_Resize() on allocation failure

2014-04-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f79c3827adc by Kristján Valur Jónsson in branch '2.7': Issue #20434 Correct error handlin of _PyString_Resize and _PyBytes_Resize http://hg.python.org/cpython/rev/4f79c3827adc -- nosy: +python-dev ___

[issue21349] crash in winreg SetValueEx with memoryview

2014-04-25 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___ ___ Python-bugs-list

[issue21225] io.py: Improve docstrings for classes

2014-04-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset e33a036fd784 by Andrew Kuchling in branch '3.4': #21225: copy docstrings from base classes http://hg.python.org/cpython/rev/e33a036fd784 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue21336] ntpath.splitdrive fails on None argument

2014-04-25 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this as not a bug. Feel free to reopen it if there's use case for passing in None. -- resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue1465646] test_grp test_pwd fail

2014-04-25 Thread yaccz
yaccz added the comment: Also fails on group + which is afaik a thing for ldap. tested with python 2.6.9 on suse linux enterprise -- nosy: +yaccz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1465646

[issue21350] bug in file.writelines accepting buffers

2014-04-25 Thread Brian Kearns
New submission from Brian Kearns: In file.writelines, the conditions in this if statement are bogus. If f-f_binary and AsReadBuffer succeeds (returns 0), AsCharBuf is still tried. So, for example, passing an array('c') to a file('wb').writelines fails, when it seems the intention of the

[issue21350] bug in file.writelines accepting buffers

2014-04-25 Thread Brian Kearns
Changes by Brian Kearns bdkea...@gmail.com: Removed file: http://bugs.python.org/file35036/fix_file_writelines-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21350 ___

[issue21350] bug in file.writelines accepting buffers

2014-04-25 Thread Brian Kearns
Changes by Brian Kearns bdkea...@gmail.com: Added file: http://bugs.python.org/file35037/fix_file_writelines-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21350 ___

[issue21305] PEP 466: update os.urandom

2014-04-25 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21305 ___ ___

[issue21349] crash in winreg SetValueEx with memoryview

2014-04-25 Thread Zachary Ware
New submission from Zachary Ware: The new test fails with the patch applied: == ERROR: test_setvalueex_with_memoryview (__main__.LocalWinregTests) -- Traceback

[issue21349] crash in winreg SetValueEx with memoryview

2014-04-25 Thread Brian Kearns
Brian Kearns added the comment: Oops, updated test. -- Added file: http://bugs.python.org/file35038/fix_winreg_setvalueex-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___

[issue21349] crash in winreg SetValueEx with memoryview

2014-04-25 Thread Brian Kearns
Changes by Brian Kearns bdkea...@gmail.com: Removed file: http://bugs.python.org/file35031/fix_winreg_setvalueex-py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21349 ___

[issue17552] socket.sendfile()

2014-04-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Given the opinions expressed so far I: - got rid of the blocksize parameter - got rid of the use_fallback parameter - added a count parameter - used os.fstat() to figure out the total file size and passed it directly to sendfile() I'm attaching

[issue21344] save scores or ratios in difflib get_close_matches

2014-04-25 Thread Russell Ballestrini
Russell Ballestrini added the comment: Adding patch to update tests to use Tim Peters suggestion of assertListEqual over assertEqual for list compares. -- Added file: http://bugs.python.org/file35040/diff-lib-tim-peters-assert-list-equals.patch ___

[issue21347] Don't use a list argument together with shell=True in subprocess' docs

2014-04-25 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo versions: +Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21347 ___

[issue21338] Silent mode for compileall

2014-04-25 Thread Éric Araujo
Éric Araujo added the comment: Patch looks to me comprehensive and backward-compatible. Thanks Thomas! -- nosy: +eric.araujo stage: needs patch - commit review type: - enhancement ___ Python tracker rep...@bugs.python.org

[issue21351] refcounts not respected at process exit

2014-04-25 Thread Min RK
New submission from Min RK: Reference counts appear to be ignored at process cleanup, which allows inter-dependent `__del__` methods to hang on exit. The problem does not seem to occur for garbage collection of any other context (functions, etc.). I have a case where one object must be

[issue21351] refcounts not respected at process exit

2014-04-25 Thread Nathan Stocks
Nathan Stocks added the comment: This affects me as well. I have to manually clean up objects in the correct order in script I am working on under 3.4.0. I have this problem under both OS X 10.9.2 Mavericks and under CentOS 6.5 -- nosy: +nathan.stocks

[issue21352] improve indexing

2014-04-25 Thread bob gailer
New submission from bob gailer: Inconsistencies / confusion with documentation Index Tab. Example (line numbers added for comments that follow): 1 max 2 built-in function 3 max (datetime.date attribute) 4 (datetime.datetime attribute) 5 (datetime.time attribute) 6 max() built-in

[issue21352] improve indexing

2014-04-25 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21352 ___

[issue21344] save scores or ratios in difflib get_close_matches

2014-04-25 Thread Tim Peters
Tim Peters added the comment: Russell, I'm still looking for a sufficiently compelling use case here: something tangible and useful that can be done with the new function that can't be easily done now. I plan to write a web API that accepts a word, 'doge' and returns a list of possible

[issue21351] refcounts not respected at process exit

2014-04-25 Thread Tim Peters
Tim Peters added the comment: Just noting that, for me, the problem goes away if del c, c2 is added as the last line of the test. This suggests the problem is due to changes in end-of-life module cleanup. Without that line, I see 3 kinds of output: 1. del child del child del parent parent

[issue16104] Compileall script: add option to use multiple cores

2014-04-25 Thread Jim Jewett
Jim Jewett added the comment: ProcessPoolExecutor already defaults to using cpu_count if max_workers is None. Consistency with that might be useful too. (and a default of 1 to mean nothing in parallel is sensible...) -- nosy: +Jim.Jewett ___

[issue21351] refcounts not respected at process exit

2014-04-25 Thread Tim Peters
Changes by Tim Peters t...@python.org: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21351 ___ ___ Python-bugs-list mailing list

[issue21344] save scores or ratios in difflib get_close_matches

2014-04-25 Thread Russell Ballestrini
Russell Ballestrini added the comment: Tim, You bring up some great points and insight I was missing. To me the scores just aren't interesting beyond which words' scores exceed a cutoff, and the ordering of words based on their similarity scores - but `get_close_matches()` already captures

[issue20050] distutils should check PyPI certs when connecting to it

2014-04-25 Thread William Tisäter
Changes by William Tisäter will...@defunct.cc: -- nosy: +tiwilliam ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20050 ___ ___ Python-bugs-list

[issue21314] Document '/' in signatures

2014-04-25 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- status: open - title: Bizarre help - Document '/' in signatures ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21314 ___

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-25 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.5 -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21321 ___

[issue21325] Missing Generic EXIF library for images in the standard library

2014-04-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Generic ideas like this, without specific patch or patch prospect, should be first posted on python-ideas. You can reopen this if there is a concrete proposal with some support. However, I agree with Brett about an Exif module. We do not even have an image

[issue21337] Add tests for Tix

2014-04-25 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21337 ___ ___

[issue21341] Configuring 'font' with ttk.Style for 'TEntry' does not change displayed font

2014-04-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: This appears to be a tcl/tk(ttk) issue. You rediscovered what is documented here: http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/ttk-Entry.html Table 40. ttk.Entry options fontUse this option to specify the font of the text that will appear in the

[issue8387] use universal newline mode in csv module examples

2014-04-25 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8387 ___ ___

[issue21351] refcounts not respected at process exit

2014-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: (the 3 kinds of output are probably due to hash randomization) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21351 ___

[issue21351] refcounts not respected at process exit

2014-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looking into it, it's normal for refcounts to be ignored: those objects belong to reference cycles: tstgc.__dict__ - p (or c, or c2) - p.__class__ (i.e. Parent, or Child respectivel)) - Parent.__dict__ - Parent.__del__ (or Parent.__init__, or Parent.child) -

[issue21351] refcounts not respected at process exit

2014-04-25 Thread Tim Peters
Tim Peters added the comment: I think Antoine is right on all counts. The most surprising bit may be that p, c, and c2 are in reference cycles, but - surprising or not - that's always been true. The reason it worked before 3.4 is that CPython happened to break the cycles via the nasty hack

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Haven't reviewed the patch, but you should definitely add a unit test for the bugfix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21321 ___

[issue21349] crash in winreg SetValueEx with memoryview

2014-04-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Brian, it's not obvious (to me) what the original issue is (crash?) and why the new test expects a TypeError. Also, is it a 2.7-only issue or does it also affect Python 3? -- nosy: +pitrou, stutzbach ___ Python

[issue21349] crash in winreg SetValueEx with memoryview

2014-04-25 Thread Brian Kearns
Brian Kearns added the comment: Are you aware of the old/new buffer interfaces and their usages? Did you actually try the code? crash would be obvious. Objects that support only the new buffer interface define tp_as_buffer with fields representing the old buffer interface as null. So,

[issue21353] document Popen.args attribute

2014-04-25 Thread akira
New submission from akira: It is convenient to have Popen.args available. Especially when dealing with multiple processes e.g., to log failures mentioning the command that was used to spawn the child process. subprocess module itself uses it while raising CalledProcessError or TimeoutExpired