[issue15022] types.SimpleNamespace needs to be picklable

2012-06-07 Thread Eric Snow
Eric Snow added the comment: I've attached a patch that gives types.SimpleNamespace pickle support. To do it I had to change the name of the type from "namespace" to "types.SimpleNamespace". That's fine. I also added __eq__/__ne__ support so I could use it during tests. -- keywords

[issue15003] make PyNamespace_New() public

2012-06-07 Thread Eric Snow
Changes by Eric Snow : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue15004] add weakref support to types.SimpleNamespace

2012-06-07 Thread Eric Snow
Changes by Eric Snow : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue15024] Split enhanced assertion support out as a unittest.TestCase base class

2012-06-07 Thread Nick Coghlan
New submission from Nick Coghlan : The unittest module has some lovely enhanced comparison operations, but they're currently hard to access outside a test run. It would be rather convenient if they were split out into a separate base class so they could be used directly without needing to crea

[issue3754] cross-compilation support for python build

2012-06-07 Thread Ray Donnelly
Ray Donnelly added the comment: Re Android Ah of course. In that case, there's always the NDK built by Dmitry (his latest is v7 AFAIK): http://www.crystax.net/en/android/ndk -- ___ Python tracker ___

[issue3871] cross and native build of python for mingw32 with packaging

2012-06-07 Thread Ray Donnelly
Ray Donnelly added the comment: Thanks for the details. I've got more fixes but I want to get the whole thing building (at least) before I post them. -- ___ Python tracker ___ _

[issue15020] Poor default value for progname

2012-06-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue15024] Split enhanced assertion support out as a unittest.TestCase base class

2012-06-07 Thread Michael Foord
Michael Foord added the comment: Why not just instantiate a TestCase instance and use that? >>> from unittest import TestCase >>> t = TestCase() >>> t.assertEqual('foo', 'bar') Traceback (most recent call last): File "", line 1, in File "/compile/py3k-cpython/Lib/unittest/case.py", line 64

[issue10037] multiprocessing.pool processes started by worker handler stops working

2012-06-07 Thread Ask Solem
Ask Solem added the comment: Well, I still don't know exactly why restarting the socket read made it work, but the patch solved an issue where newly started pool processes would be stuck in socket read forever (happening to maybe 1/500 new processes) This and a dozen other pool related fixes

[issue11618] Locks broken wrt timeouts on Windows

2012-06-07 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Possibly the patch had a mixup I'm going to rework it a bit and post as a separate issue. -- status: open -> closed ___ Python tracker

[issue15024] Split enhanced assertion support out as a unittest.TestCase base class

2012-06-07 Thread Nick Coghlan
Nick Coghlan added the comment: Because that doesn't work in 2.x (it fails with a ValueError due to "runTest" being missing) and I forgot you had already changed that behaviour to make it more convenient in 3.x :) -- resolution: -> out of date status: open -> closed

[issue15025] httplib and http.client are missing response messages for defined WEBDAV responses, e.g., UNPROCESSABLE_ENTITY (422)

2012-06-07 Thread Craig Loftus
New submission from Craig Loftus : Calling httplib.responses[httplib.UNPROCESSABLE_ENTITY] in 2.7, or http.client.responses[http.client.UNPROCESSABLE_ENTITY] raises "KeyError: 422". The expected behaviour would be to return "Unprocessable Entity". This is the specific issue that I have hit, bu

[issue9256] plistlib should create non-naïve datetime objects

2012-06-07 Thread R. David Murray
R. David Murray added the comment: An alternative is to do what the email package in 3.3 does, and treat naive datetimes as exactly "UTC referenced but with no information as to what local timezone they originated in". Either way, a program using the plistlib is going to have to know about t

[issue8084] pep-0370 on osx duplicates existing functionality

2012-06-07 Thread Daniel Holth
Daniel Holth added the comment: Please mention Apple's OS X Python behavior in the PEP. The Python that comes with OS X Lion doesn't seem to follow the PEP regarding ~/.local ; this deserves a mention. -- nosy: +dholth ___ Python tracker

[issue15026] Faster UTF-16 encoding

2012-06-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : In pair to issue14624 here is a patch than speed up UTF-16 encoding in several times. In addition, it fixes an unsafe check of an integer overflow. Here are the results of benchmarking. See benchmark tools in https://bitbucket.org/storchaka/cpython-stuff

[issue15027] Faster UTF-32 encoding

2012-06-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : In pair to issue14625 here is a patch than speed up UTF-32 encoding in several times. In addition, it fixes an unsafe check of an integer overflow. Here are the results of benchmarking. See benchmark tools in https://bitbucket.org/storchaka/cpython-stuff

[issue11354] argparse: nargs could accept range of options count

2012-06-07 Thread Alex Frase
Alex Frase added the comment: I'm new here so I apologize if this is considered poor etiquette, but I'm just commenting to 'bump' this issue. My search for a way to accomplish exactly this functionality led me here, and it seems a patch was offered but no action has been taken on it for over

[issue14185] Failure to build _dbm with ndbm on Arch Linux

2012-06-07 Thread su
su added the comment: Same thing happens with pyhton-3.2.3 on fedora 17 *** WARNING: renaming "_dbm" since importing it failed: build/lib.linux-x86_64-3.2/_dbm.cpython-32m.so: undefined symbol: dbm_nextkey Failed to build these modules: _dbm -- nosy: +su715 _

[issue15023] listextend (and therefore list.extend and list.__init__) peek at len before iter

2012-06-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: It's an optimization. No one says we can't call __len__(). -- nosy: +benjamin.peterson ___ Python tracker ___ __

[issue4442] document immutable type subclassing via __new__

2012-06-07 Thread Mateusz Loskot
Changes by Mateusz Loskot : -- nosy: +mloskot ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue15028] PySys_SetArgv escapes quotes in argv[]

2012-06-07 Thread R.M.Bianchi
New submission from R.M.Bianchi : Embedding Python in C++ I saw that if I pass this string below to the PySys_SetArgv, as one of the command-line arguments passed to an embedded script: "--net-label-name='("DC1","eth1")'" PySys_Argv transforms it escaping the single quotes, and in the Python

[issue4442] document immutable type subclassing via __new__

2012-06-07 Thread Mateusz Loskot
Mateusz Loskot added the comment: Is this report about documenting of the concept of immutable types in Python in general or regarding existing built-in types, like datetime.datetime? Generally, the concept of immutable type with relation to tp_new is mentioned (sneaked) here: 1) http://docs

[issue15029] Update Defining New Types chapter according to PEP 253

2012-06-07 Thread Mateusz Loskot
New submission from Mateusz Loskot : The chapter '2. Defining New Types" in the Python 3.2 documentation [1] does not cover all important elements, especially in the subsection 2.1.4. Subclassing other types. The accepted PEP 253 [2] provides much more detailed and thorough explanation for Py

[issue15029] Update Defining New Types chapter according to PEP 253

2012-06-07 Thread Mateusz Loskot
Mateusz Loskot added the comment: Similar request has been rejected in response to the Issue 621526 [1], but I'm not proposing to include PEP into docs, but to update and improve docs with material discussed in accepted PEPs. [1] http://bugs.python.org/issue621526 -- ___

[issue621526] docs do not include spec info from PEPs

2012-06-07 Thread Mateusz Loskot
Mateusz Loskot added the comment: I reported issue 15029 [1] which may be related to this one. [1] http://bugs.python.org/issue15029 -- nosy: +mloskot ___ Python tracker ___ _

[issue14908] datetime.datetime should have a timestamp() method

2012-06-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Updated patch adds a few more tests and improves error handling in C implementation. -- nosy: +haypo Added file: http://bugs.python.org/file25858/issue14908.diff ___ Python tracker

[issue14908] datetime.datetime should have a timestamp() method

2012-06-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file25854/issue14908.diff ___ Python tracker ___ ___ Python-bugs-list m

[issue15021] xmlrpc server hangs

2012-06-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: What kind of xmlrpc server do you run? And how exactly? Try to set a timeout to all sockets: socket.setdefaulttimeout(10) Does this change something? Which exception (and traceback) do you get? -- nosy: +amaury.forgeotdarc ___

[issue11823] disassembly needs argument counts on calls with keyword args

2012-06-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Bumping priority as a reminder to get this in. -- priority: normal -> high ___ Python tracker ___ ___

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Ronan Lamy
New submission from Ronan Lamy : PyPycLoader can't read or write .pyc files created by the core import machinery. I'm attaching a failing test case demonstrating the issue: if you import a .py file using standard mechanisms, thus creating a .pyc, and then (in a separate process, say) attempt t

[issue11823] disassembly needs argument counts on calls with keyword args

2012-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 22dc0a433b0e by Alexander Belopolsky in branch 'default': Issue #11823: disassembly now shows argument counts on calls with keyword args http://hg.python.org/cpython/rev/22dc0a433b0e -- nosy: +python-dev ___

[issue11823] disassembly needs argument counts on calls with keyword args

2012-06-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: needs patch -> committed/rejected type: behavior -> enhancement versions: -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___

[issue11823] disassembly needs argument counts on calls with keyword args

2012-06-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Ronan, can you confirm if 2.7 or 3.2 are affected too? -- nosy: +jcea ___ Python tracker ___ ___ P

[issue15031] Split .pyc parsing from module loading

2012-06-07 Thread Ronan Lamy
New submission from Ronan Lamy : I think it would be beneficial to extract the handling of the binary format of bytecode files from the rest of the loader/finder code in importlib._bootstrap. That means exposing, internally at least, functions that do nothing more than convert the binary conte

[issue15023] listextend (and therefore list.extend and list.__init__) peek at len before iter

2012-06-07 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-06-07 Thread Akintayo Holder
Akintayo Holder added the comment: Is my approach ok or is the plan to follow neologix's suggestion and make one fix that works for all the select.select issues. -- ___ Python tracker ___

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Ronan Lamy
Ronan Lamy added the comment: 2.7 doesn't have PyPycLoader. For 3.2, it's such a pain to create a working concrete subclass of PyPycLoader that I gave up. But just by reading the code, it doesn't seem affected, as there's no discrepancy with importlib._bootstrap: they both consider that metad

[issue15028] PySys_SetArgv escapes quotes in argv[]

2012-06-07 Thread R. David Murray
R. David Murray added the comment: Could you please clarify the inputs and outputs. I can't tell from your description what exact byte string you are passing in from C++ or what exact string you are seeing on the Python side. For example, if: '--net-label-name=\'("DC1","eth1")\'' is the

[issue13854] multiprocessing: SystemExit from child with non-int, non-str arg causes TypeError

2012-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4346cba353b4 by Richard Oudkerk in branch '3.2': Issue #13854: Properly handle non-integer, non-string arg to SystemExit http://hg.python.org/cpython/rev/4346cba353b4 New changeset 3585cb1388f2 by Richard Oudkerk in branch 'default': Merge fixes fo

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2012-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b3d4ffcb4d1 by Richard Oudkerk in branch '3.2': Issue #12157: pool.map() does not handle empty iterable correctly http://hg.python.org/cpython/rev/1b3d4ffcb4d1 New changeset 3585cb1388f2 by Richard Oudkerk in branch 'default': Merge fixes for #138

[issue10037] multiprocessing.pool processes started by worker handler stops working

2012-06-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I think this issue can be closed, the worker handler is simply borked and > we could open up a new issue deciding how to fix it (merging billiard.Pool > or someting else). OK. I am not sure which option under "Resolution" should be chosen. "Later"? > (

[issue13405] Add DTrace probes

2012-06-07 Thread Marc Abramowitz
Marc Abramowitz added the comment: Hi jcea, Sorry, I've been away from this for a while. I'm getting undefined symbols now while trying to link: ``` (12:47pm) [last: 0] marca@scml-marca:~/src$ hg clone http://hg.python.org/cpython... (12:55pm) [last: 0] marca@scml-marca:~/src$ cd cpython [l

[issue8865] select.poll is not thread safe

2012-06-07 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list maili

[issue10037] multiprocessing.pool processes started by worker handler stops working

2012-06-07 Thread Ask Solem
Ask Solem added the comment: Later works, or just close it. I can open up a new issue to merge the improvements in billiard later. > The execv stuff certainly won't go in by Py3.3. There has not been > consensus that adding it is a good idea. > (I also have the unit tests passing with a "f

[issue15032] Provide a select.select implemented using select.poll

2012-06-07 Thread Gregory P. Smith
New submission from Gregory P. Smith : Many random bits of the standard library were originally written using select.select. This is an ancient API that is available everywhere, but these days you'd be hard pressed to find _any_ system that does not implement the superior poll() API which doe

[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-06-07 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think your approach is fine. BTW for anyone who wants to chase the larger idea of dealing with all select.select use, take a look at the prototype for a select.select() implemented using poll.poll() that I just put in http://bugs.python.org/issue15032.

[issue13405] Add DTrace probes

2012-06-07 Thread Marc Abramowitz
Marc Abramowitz added the comment: The 2.7 patch doesn't apply cleanly for me against the latest on the 2.7 branch: [last: 0] marca@scml-marca:~/src$ hg clone http://hg.python.org/cpython && cd cpython && hg update 2.7 && hg branch && hg tip && curl -s http://bugs.python.org/file25192/aa2dcff

[issue15033] Different exit status when using -m

2012-06-07 Thread Kamil Kisiel
New submission from Kamil Kisiel : Python returns a different exit status when an exception is raised and -m is used as opposed to just running a module. A short example, let's call it foo.py: def main(): raise ValueError() if __name__ == '__main__': main() When run w

[issue10037] multiprocessing.pool processes started by worker handler stops working

2012-06-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Ah, a working 'fork server' would be just as good. Only problem is that it depends on fd passing which is apparently broken on MacOSX. > Btw, Billiard now supports running Pool without threads, using > epoll/kqueue/select instead. So Celery uses that when

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Could you write a patch for 3.3? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue13405] Add DTrace probes

2012-06-07 Thread Marc Abramowitz
Marc Abramowitz added the comment: If I do `/configure --with-dtrace --enable-framework && make` then I get: ``` ... gcc -c -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes-I. -I./Include-DPy_BUILD_CORE -o Modules/gcmodule.o Modules/gcmodule.

[issue15032] Provide a select.select implemented using select.poll

2012-06-07 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue13405] Add DTrace probes

2012-06-07 Thread Marc Abramowitz
Marc Abramowitz added the comment: I hacked around the previous error (duplicate definitions of `collect`) and then ran into: gcc -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes-I. -I./Include-DPy_BUILD_CORE -o ./Include/pydtrace_offsets \

[issue13405] Add DTrace probes

2012-06-07 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Marc, please, check your GTalk/XMPP window :-) -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2012-06-07 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue13854] multiprocessing: SystemExit from child with non-int, non-str arg causes TypeError

2012-06-07 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue15009] urlsplit can't round-trip relative-host urls.

2012-06-07 Thread Ankit Toshniwal
Ankit Toshniwal added the comment: Hello, Did some initial investigation, so looks like as per the code in parse.py, under the function urlunsplit, we take the 5-tuple returned by urlsplit . In the case of foo we get: SplitResult(scheme='yelp', netloc='', path='/foo', query='', fragment='')

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2012-06-07 Thread Ankit Toshniwal
Ankit Toshniwal added the comment: I cannot reproduce this issue. I just tested this on my mac. atoshniw@prusev-mn:~/Documents/code/python-dev/bin #hostname -f prusev-mn.helloworld.com atoshniw@prusev-mn:~/Documents/code/python-dev/bin #python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [

[issue15009] urlsplit can't round-trip relative-host urls.

2012-06-07 Thread Buck Golemon
Buck Golemon added the comment: Well i think the real issue is that you can't enumerate the protocals that "use netloc". All protocols are allowed to have a netloc. the smb: protocol certainly does, but it's not in the list. The core issue is that smb:/foo and smb:///foo are different urls, a

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 02b4c62ce393 by Terry Jan Reedy in branch '3.2': Issue #12510: Revise and triple # of calltip tests, with an eye to unittest http://hg.python.org/cpython/rev/02b4c62ce393 New changeset 03b5f75ddac7 by Terry Jan Reedy in branch 'default': Merge from

[issue12510] IDLE: calltips mishandle raw strings and other examples

2012-06-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I decided to commit the current patch (i12510c.test.diff + NEWS changes) as is. Another change is needed to correctly delete the first arg of all methods, not just instance methods with the first arg named 'self'. (In the current new classmethod test, I just

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Ronan Lamy
Ronan Lamy added the comment: My preferred solution would be to use to use the functions I describe in issue 15031. -- ___ Python tracker ___ __

[issue15034] tutorial should use best practices in user defined execeptions section

2012-06-07 Thread R. David Murray
New submission from R. David Murray : And I wish I knew what those were. -- assignee: docs@python components: Documentation messages: 162513 nosy: docs@python, r.david.murray priority: normal severity: normal stage: needs patch status: open title: tutorial should use best practices in us

[issue15031] Split .pyc parsing from module loading

2012-06-07 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-06-07 Thread Larry Hastings
Larry Hastings added the comment: Here's a nice fresh minor update. Notes on this third patch: * The docstrings are now done. * I discovered that fchmodat() doesn't actually support AT_SYMLINK_NOFOLLOW! glibc documents using the flag, then comically notes that it doesn't actually work.

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- dependencies: +Split .pyc parsing from module loading ___ Python tracker ___ ___ Python-bugs-list mail

[issue8652] Minor improvements to the "Handling Exceptions" part of the tutorial

2012-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset b873afe640e2 by R David Murray in branch '2.7': #8652: update errors tutorial. http://hg.python.org/cpython/rev/b873afe640e2 -- nosy: +python-dev ___ Python tracker __

[issue8652] Minor improvements to the "Handling Exceptions" part of the tutorial

2012-06-07 Thread R. David Murray
R. David Murray added the comment: The Python3 tutorial was already fixed, and the explanation of the parens is not needed there since the "old syntax" is not supported. I did not do any reordering since the use of 'as' immediately follows in the text and seems to make fine sense as is. Actu

[issue15031] Split .pyc parsing from module loading

2012-06-07 Thread Brett Cannon
Brett Cannon added the comment: So the problem with the function is that had this been implemented in Python 3.2 it already would be outdated thanks to the 3.3 change of storing the file size in the .pyc file, and simply changing the length of the sequence returned would probably break code.

[issue15030] PyPycLoader can't read cached .pyc files

2012-06-07 Thread Brett Cannon
Brett Cannon added the comment: The format did change and importlib.abc.PyPycLoader was not subsequently updated. Problem is that the ABC has been deprecated and given backwards-compatibility instructions for Python 3.1, so I don't know if it should be considered a priority to fix this to rea

[issue15009] urlsplit can't round-trip relative-host urls.

2012-06-07 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue14998] pprint._safe_key is not always safe enough

2012-06-07 Thread Shawn Brown
Shawn Brown <03sjbr...@gmail.com> added the comment: Here's a patch for 3.3 -- as well as two new assertions in test_pprint.py The added try/catch also fixes the issues mentioned in issue 10017 so I added a test for that case as well. -- keywords: +patch Added file: http://bugs.python.