[issue13703] Hash collision security issue

2012-01-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: > What about PYTHONHASHSEED= -> off, PYTHONHASHSEED=0 -> random, > PYTHONHASHSEED=n -> n ? I agree with Jim that it's better to have one > env. variable than two. Rather than the "" empty string for off I suggest an explicit string that makes it clear what th

[issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates

2012-01-29 Thread Kang-Hao (Kenny) Lu
Kang-Hao (Kenny) Lu added the comment: Attached patch does the following beyond what the patch from haypo does: * call the error handler * reject 0xd800~0xdfff when decoding utf-32 The followings are on my TODO list, although this patch doesn't depend on any of these and can be reviewed an

[issue13703] Hash collision security issue

2012-01-29 Thread Zbyszek Szmek
Zbyszek Szmek added the comment: What about PYTHONHASHSEED= -> off, PYTHONHASHSEED=0 -> random, PYTHONHASHSEED=n -> n ? I agree with Jim that it's better to have one env. variable than two. -- ___ Python tracker

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-29 Thread Georg Brandl
Georg Brandl added the comment: ISTM that not doing this will make maintenance harder. For 2.7 I agree that there is no clear boundary to make, but 3.2 should be split up as well to ease merging of updates. -- ___ Python tracker

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with 3.3 only. This might not be ready for 3.2.3 anyway, depending on how soon hash patch is ready, and if not, it becomes a somewhat moot point as new people should then download 3.3.0 instead of 3.2.4 next August. -- ___

[issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers)

2012-01-29 Thread Paul Nasrat
Changes by Paul Nasrat : -- nosy: +pnasrat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue11457] os.stat(): add new fields to get timestamps as Decimal objects with nanosecond resolution

2012-01-29 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: I think that one of available types of time values returned by os.stat() should allow to directly pass these values to os.futimens() and os.utimensat(), which expect (time_sec, time_nsec) tuples. -- __

[issue11457] os.stat(): add new fields to get timestamps as Decimal objects with nanosecond resolution

2012-01-29 Thread STINNER Victor
STINNER Victor added the comment: I don't like the idea of adding new fields to os.stat() *by default* because it may break backward compatibility. And if the new fields are decimal.Decimal objects, the module has to be imported and it means that any call to os.stat() would be slower just to

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-29 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-29 Thread STINNER Victor
Changes by STINNER Victor : -- assignee: Arfrever -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-29 Thread STINNER Victor
STINNER Victor added the comment: > Another possible format would be "tuple" Or, I forgot an obvious format: "datetime"! -- ___ Python tracker ___ _

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-29 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file24331/time_decimal-3.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-29 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file24330/time_decimal-2.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-29 Thread STINNER Victor
Changes by STINNER Victor : -- assignee: -> Arfrever Added file: http://bugs.python.org/file24367/time_decimal-4.patch ___ Python tracker ___ ___

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-29 Thread STINNER Victor
STINNER Victor added the comment: Patch version 4, minor update: - remove the resolution field of _PyTime_t and remove int_log10(): use 1/divisior as the resolution to support divisor different than a power of 10 (e.g. the cpu frequency on Windows) - inline and remove _PyTime_FromTimespec()

[issue13856] xmlrpc / httplib changes to allow for certificate verification

2012-01-29 Thread Senthil Kumaran
Senthil Kumaran added the comment: I think, I was using wrong terminology, by 'sending' I meant, 'using' the ca_file in the client to verify Server's certificates. -- ___ Python tracker __

[issue13901] test_get_outputs (test_distutils) failure with --enable-shared on Mac OS X

2012-01-29 Thread Ned Deily
Ned Deily added the comment: On OS X, the linker includes in executables the absolute path to referenced shared libraries and normally --enable-shared builds are only usable from their installed location, i.e. after doing 'make install'. RUNSHARED is defined as it is on OS X so that during t

[issue13703] Hash collision security issue

2012-01-29 Thread Dave Malcolm
Dave Malcolm added the comment: On Sat, 2012-01-28 at 23:56 +, Terry J. Reedy wrote: > Terry J. Reedy added the comment: > > > I think you should check with randomization enabled, if only to see the > > nature of the failures and if they are expected. > > Including the list of when-enable

[issue13874] test_faulthandler: read_null test fails with current clang

2012-01-29 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue13703] Hash collision security issue

2012-01-29 Thread Dave Malcolm
Dave Malcolm added the comment: On Sun, 2012-01-29 at 00:06 +, Dave Malcolm wrote: I went ahead and added the flag to sys.flags, so now $ make test TESTPYTHONOPTS=-R shows: Testing with flags: sys.flags(debug=0, division_warning=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode

[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-01-29 Thread STINNER Victor
STINNER Victor added the comment: Two articles (Microsoft and IBM) about high resolution time on Windows: http://msdn.microsoft.com/en-us/magazine/cc163996.aspx http://www.ibm.com/developerworks/library/i-seconds/ I installed the Windows port of the NTP daemon: http://www.meinberg.de/english/sw

[issue13908] PyType_FromSpec() lacks PyType_Ready() call

2012-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 53b8f55e08bd by Benjamin Peterson in branch 'default': merge 3.2 (closes #13908) http://hg.python.org/cpython/rev/53b8f55e08bd -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed

[issue13856] xmlrpc / httplib changes to allow for certificate verification

2012-01-29 Thread Martin v . Löwis
Martin v. Löwis added the comment: > By that I mean, sending the ca_file and cert_reqs from the client, > which I believe would be required if you want to verify the server > certificate from the client end [1]. The other clients send only > the cert_file and the key_file. Ah, you are probably

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread John O'Connor
Changes by John O'Connor : -- nosy: +jcon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue6210] Exception Chaining missing method for suppressing context

2012-01-29 Thread Patrick Westerhoff
Patrick Westerhoff added the comment: Oh, where did that PEP come from? ^^ Also thanks for hinting at python-dev, didn’t realize that there was a discussion going on about this! -- ___ Python tracker _

[issue6210] Exception Chaining missing method for suppressing context

2012-01-29 Thread Nick Coghlan
Nick Coghlan added the comment: This was discussed a little more in the python-dev thread for PEP 409, but both Guido and I have been burned in the past by badly written libraries that replaced detailed exceptions that explained *exactly* what was going wrong with bland, generic "it broke!" e

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread STINNER Victor
STINNER Victor added the comment: I see two unrelated parts in your patch: - change dictionary structure in memory - change many constants linked to optimization: PyDICT_MAXFREELIST: 80->40, 2/3->5/8, etc. You may open a new issue for the second part, except if I am wrong and you need to ch

[issue13874] test_faulthandler: read_null test fails with current clang

2012-01-29 Thread Stefan Krah
Stefan Krah added the comment: STINNER Victor wrote: > Does my commit fix the issue? Yes, perfectly. -- ___ Python tracker ___ ___

[issue13856] xmlrpc / httplib changes to allow for certificate verification

2012-01-29 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Sun, Jan 29, 2012 at 10:30:45PM +, Antoine Pitrou wrote: > > Well, if you are a security expert you can volunteer to maintain a > trusted certificates' file in the Python repository :) I think > nobody else amongst us is qualified. :-) haha. Neither am

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-29 Thread STINNER Victor
STINNER Victor added the comment: > Constant arguments What do you call a constant argument? "float" and "decimal"? You would prefer a constant like time.FLOAT_FORMAT? Or maybe a boolean (decimal=True)? I chose a string because my first idea was to add a registry to support other format, may

[issue13856] xmlrpc / httplib changes to allow for certificate verification

2012-01-29 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Sun, Jan 29, 2012 at 10:48:35PM +, Martin v. Löwis wrote: > orsenthil: I don't fully understand your question (what kind of "carrying" > should the clients do); By that I mean, sending the ca_file and cert_reqs from the client, which I believe would b

[issue13911] test_trace depends on dict repr() ordering

2012-01-29 Thread Mark Shannon
New submission from Mark Shannon : Changing PyDict_MINSIZE to 4 causes the following failure python -m test.test_trace ... == ERROR: test_coverage (__main__.TestCoverage) ---

[issue13868] Add hyphen doc fix

2012-01-29 Thread Sandro Tosi
Sandro Tosi added the comment: Wow.. do you really expect any positive outcome from you reply style? I'll pretend I didn't read your reply and let me rephrase my question like this: there are several occurrences of 'floating point' in python doc, are you going to fix all the ones that are wro

[issue13910] test_packaging is dependent on dict ordering.

2012-01-29 Thread Mark Shannon
New submission from Mark Shannon : Changing PyDict_MINSIZE to 4 causes the following failure: python -m test.test_packaging ... Traceback (most recent call last): File "/home/mark/python/cpython/Lib/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/

[issue6210] Exception Chaining missing method for suppressing context

2012-01-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: Patrick Westerhoff wrote: > Patrick Westerhoff added the comment: > > I have to agree with Georg on that. I think it would make more sense to > introduce some internal flag/variable that keeps track of if the cause was > explicitely set. So if cause was set (

[issue13909] Ordering of free variables in dis is dependent on dict ordering.

2012-01-29 Thread Mark Shannon
New submission from Mark Shannon : This only seems to apply to free variables, not local or cell variables. The offending tests are lines 429 & 430 of Lib/test/test_dis.py (tricky, code_info_tricky), (co_tricky_nested_f, code_info_tricky_nested_f), Changing PyDict_MINSIZE to 4 prov

[issue13847] Catch time(), ftime(), localtime() and clock() errors

2012-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5b42aefb8969 by Victor Stinner in branch 'default': Issue #13847: Fix test_time, time.gmtime() doesn't use localtime() http://hg.python.org/cpython/rev/5b42aefb8969 -- ___ Python tracker

[issue13908] PyType_FromSpec() lacks PyType_Ready() call

2012-01-29 Thread Andreas Stührk
New submission from Andreas Stührk : As already stated by Amaury in http://mail.python.org/pipermail/python-dev/2011-October/113829.html, that leads to crashes: >>> import xxlimited >>> repr(xxlimited.Str) [1]19575 segmentation fault (core dumped) ./python -- files: pytype_fromsp

[issue6210] Exception Chaining missing method for suppressing context

2012-01-29 Thread Ethan Furman
Ethan Furman added the comment: Not sure I have traceback._iter_chain() patched correctly, but all the tests pass. Here's the latest code. -- Added file: http://bugs.python.org/file24362/raise_from_none_v3.diff ___ Python tracker

[issue13846] Add time.monotonic() function

2012-01-29 Thread STINNER Victor
STINNER Victor added the comment: > Do we actually yet another function, or could this be covered by adding a > parameter such as monotonic=False, perhaps to wallclock(). A monotonic is a different clock, it would be surprising that an argument uses another clock. --

[issue13874] test_faulthandler: read_null test fails with current clang

2012-01-29 Thread STINNER Victor
STINNER Victor added the comment: Does my commit fix the issue? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue13874] test_faulthandler: read_null test fails with current clang

2012-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset f71249d785d6 by Victor Stinner in branch 'default': Issue #13874: read_null() of faulthandler uses volatile to avoid optimisation http://hg.python.org/cpython/rev/f71249d785d6 -- nosy: +python-dev ___ Py

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-29 Thread Nick Coghlan
Nick Coghlan added the comment: Trying to make this change in 2.7 would actually be a bit of a nightmare - how do you cleanly split documentation of the binary data and text processing sequence types when "str" is used for both? The change would be *mostly* feasible in 3.2 (that's why I start

[issue13703] Hash collision security issue

2012-01-29 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Given PYTHONHASHSEED, what is the point of PYTHONHASHRANDOMIZATION? How would you do what it does without it? I.e. how would you indicate that it should randomize the seed, rather than fixing the seed value? > On startup, python reads a config file with the

[issue13703] Hash collision security issue

2012-01-29 Thread Mark Shannon
Mark Shannon added the comment: Barry A. Warsaw wrote: > Barry A. Warsaw added the comment: > > On Jan 28, 2012, at 07:26 PM, Dave Malcolm wrote: > >> This turns out to pass without PYTHONHASHRANDOMIZATION in the >> environment, and fail intermittently with it. >> >> Note that "make test" inv

[issue13907] test_pprint relies on set/dictionary repr() ordering

2012-01-29 Thread Mark Shannon
New submission from Mark Shannon : The function test_set_reprs() includes the comment: "Consequently, this test is fragile and implementation-dependent" Changing the dictionary iteration ordering breaks it. -- components: Tests messages: 152272 nosy: Mark.Shannon priority: normal severit

[issue13856] xmlrpc / httplib changes to allow for certificate verification

2012-01-29 Thread Martin v . Löwis
Martin v. Löwis added the comment: For 3.x, xmlrpc.client should just pass-through the SSL context. Since the code to do so will be quite different from the current patch, I'm tempted to close this issue as rejected, unless Nathanael indicates that he would like to redo the patch for 3.x; thi

[issue7097] urlparse.urljoin of simple "http://" and "somedomain.com" produces incorrect result

2012-01-29 Thread Senthil Kumaran
Senthil Kumaran added the comment: >>> urljoin("http://";, "//somedomain.com") results in "http://somedomain.com"; So, I wonder if this way to specify the relative url properly and not the base-url. The test suite of urlparse tries to follow all the advertised scenarios for RFC3986 and als

[issue13703] Hash collision security issue

2012-01-29 Thread Jim Jewett
Jim Jewett added the comment: Given PYTHONHASHSEED, what is the point of PYTHONHASHRANDOMIZATION? Alternative: On startup, python reads a config file with the seed (which defaults to zero). Add a function to write a random value to that config file for the next startup. -- _

[issue13703] Hash collision security issue

2012-01-29 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jan 28, 2012, at 07:26 PM, Dave Malcolm wrote: >This turns out to pass without PYTHONHASHRANDOMIZATION in the >environment, and fail intermittently with it. > >Note that "make test" invokes the built python with "-E", so that it >ignores the setting of PYTH

[issue13856] xmlrpc / httplib changes to allow for certificate verification

2012-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Antoine - I fail to recollect, but is there any reason for the clients > in the stdlib are not carrying a ca_file and doing a certificate > validation of the server connection? Well, if you are a security expert you can volunteer to maintain a trusted certi

[issue13906] mimetypes.py under windows - bad exception catch

2012-01-29 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of issue 9291. -- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> mimetypes initialization fails on Windows because of non-Latin characters in registry _

[issue13856] xmlrpc / httplib changes to allow for certificate verification

2012-01-29 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for submitting the patch. Couple of comments. 1. This is a new feature, so the patch should be addressed against 3.x. 2. The patch lacks tests and documentation and hence it is not complete. You could take a look at http/client.py or ssl.py (with test

[issue13906] mimetypes.py under windows - bad exception catch

2012-01-29 Thread Alexander Maksimenko
New submission from Alexander Maksimenko : mimetypes.py(249) expectts Unicode*En*codeError, but Unicode*De*codeError happens when registry has non latin symbols (Vista Home 64). I just change cathc jn next line to UnicodeDecodeError and all now works fine. But may be error not here, but on enc

[issue13889] str(float) and round(float) issues with FPU precision

2012-01-29 Thread Samuel Iseli
Samuel Iseli added the comment: Hi Marc, the changes to the pythoncore.vcproj Visual-Studio file define the HAVE_VC_FUNC_FOR_X87 symbol. I use this symbol to enable the precision-setting macros in pyport.h. I made this similar to the existing code for gcc (linux). You can change this but curr

[issue13899] re pattern r"[\A]" should work like "A" but matches nothing. Ditto B and Z.

2012-01-29 Thread John Machin
John Machin added the comment: Whoops: "normal Python rules for backslash escapes" should have had a note "but revert to the C behaviour of stripping the \ from unrecognised escapes" which is what re appears to do in its own \ handling. -- ___ Pyth

[issue13899] re pattern r"[\A]" should work like "A" but matches nothing. Ditto B and Z.

2012-01-29 Thread John Machin
John Machin added the comment: @Ezio: Comparison of the behaviour of \letter inside/outside character classes is irrelevant. The rules for inside can be expressed simply as: 1. Letters dDsSwW are special; they represent categories as documented, and do in fact have a similar meaning outside c

[issue13868] Add hyphen doc fix

2012-01-29 Thread Boštjan Mejak
Boštjan Mejak added the comment: If "floating point" in a sentence is in a role of an adjective, then it must be written as "floating-point" (with a hyphen), otherwise not. Example: "The number 3.5 is a floating-point number." Please consult some English orthography book and start writing cor

[issue13897] Move fields relevant to coroutine/generators out of frame into generator/threadstate

2012-01-29 Thread Mark Shannon
Mark Shannon added the comment: The important part is not the change of name, but wrapping them in a struct which can be embedded in both PyThreadState and PyGenObject. The state->exc_XXX trio of values are the currently handled exception (sys.exc_info()) and are shadowed by generator exceptio

[issue13897] Move fields relevant to coroutine/generators out of frame into generator/threadstate

2012-01-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: IMO "tstate->exc_value" has nothing to do with generators. Changing its name seems gratuitous breakage to me. -- ___ Python tracker ___

[issue5231] Change format of a memoryview

2012-01-29 Thread Stefan Krah
Stefan Krah added the comment: Yes, it's really superseded by #10181 now. I'm closing as 'duplicate', since technically it'll be fixed once the patch for #10181 is committed. -- dependencies: -Problems with Py_buffer management in memoryobject.c (and elsewhere?) resolution: -> duplic

[issue13507] Modify OS X installer builds to package liblzma for the new lzma module

2012-01-29 Thread David Bolen
David Bolen added the comment: I recently built the xz library on my OSX Tiger buildbot (that also does the daily DMGs via the build script), and Nadeem mentioned this ticket. As an FYI, I wasn't able to get the xz library (5.0.3) to configure/build as a universal build (i386/ppc) in a single

[issue1625] bz2.BZ2File doesn't support multiple streams

2012-01-29 Thread Nadeem Vawda
Nadeem Vawda added the comment: > An alternative solution I'd like to pursue is to backport 3.3's BZ2File > implementation to run on 2.7, and release it on PyPI. Well, that was easier than I expected. It didn't take much work to get it working under 2.6, 2.7 and 3.2. I've put up this "bz2file"

[issue5231] Change format of a memoryview

2012-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Shouldn't this be closed in favour of #10181? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13905] Built-in Types Comparisons should mention rich comparison methods

2012-01-29 Thread Catalin Iacob
Catalin Iacob added the comment: Here's my attempt at a patch. It mostly takes the text from the default branch and adds references to __cmp__. -- keywords: +patch Added file: http://bugs.python.org/file24361/issue13905v1.patch ___ Python tracker <

[issue13905] Built-in Types Comparisons should mention rich comparison methods

2012-01-29 Thread Catalin Iacob
New submission from Catalin Iacob : In 2.7 the Comparisons section of stdtypes.rst only talks about __cmp__ and never mentions the rich comparison methods: "Instances of a class normally compare as non-equal unless the class defines the __cmp__() method. Refer to Basic customization) for inform

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Philip Jenvey
Changes by Philip Jenvey : -- nosy: +pjenvey ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: In the initial comment, 'Dummy' to 'Deleted' here but only here: - Holds an active (key, value) pair. Active can transition to Dummy + Holds an active (key, value) pair. Active can transition to Deleted Im Lib/test/test_pprint.py def test_set_reprs

[issue6210] Exception Chaining missing method for suppressing context

2012-01-29 Thread Ethan Furman
Ethan Furman added the comment: Patrick: The value in this enhancement is in not displaying the chained exception. I do not see any value in throwing it away completely. If you don't care about __context__ you can safely ignore it. On the other hand, if it is completely removed, and you do

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson, pitrou stage: -> patch review versions: +Python 3.3 -Python 3.4 ___ Python tracker ___ _

[issue13890] test_importlib failures under Windows

2012-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think it's more laziness. _Environ.__setitem__ could also update the original mapping. -- nosy: +haypo ___ Python tracker ___ __

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've made small changes and committed the patch in 3.2 and 3.3. 2.7 would need further changes and I don't think it's worth the bother. Thanks! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed __

[issue13890] test_importlib failures under Windows

2012-01-29 Thread Brett Cannon
Brett Cannon added the comment: Is there a technological reason environ is not updated, or is it simply oversight? Lib/os.py: under POXIX, os.environ reflects posix.environ (it uses the same underlying dict), while under Windows, os.environ uses a distinct dict from nt.environ. > > -- >

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 572bb8c265c0 by Antoine Pitrou in branch '3.2': Issue #13848: open() and the FileIO constructor now check for NUL characters in the file name. http://hg.python.org/cpython/rev/572bb8c265c0 New changeset 6bb05ce1cd1f by Antoine Pitrou in branch 'de

[issue13872] socket.detach doesn't mark socket._closed

2012-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > socket.socket.detach doesn't mark the socket._closed flag. Well, does it have to? It's only an internal detail, it's not exposed as a public API. -- ___ Python tracker ___

[issue2636] Adding a new regex module (compatible with re)

2012-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It'd be nice if we had some sort of representative benchmark for > real-world uses of Python regexps. The JS guys have all pitched in to > create such a thing for uses of regexps on thew web. I don't know of > any such thing for Python. See http://hg.python.o

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2012-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Of course this could also be exposed as a function, e.g.: > >/* stealing a reference to bytes */ >PyMemoryView_FromBytesAndInfo(PyObject *bytes, Py_buffer *info); I think we should minimize the number of reference-stealing functions. > So let's make

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch works under Windows here (on branch default). -- stage: needs patch -> patch review ___ Python tracker ___ __

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Georg Brandl
Changes by Georg Brandl : Removed file: http://bugs.python.org/file24357/061f8573af54.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Mark Shannon
Changes by Mark Shannon : Added file: http://bugs.python.org/file24360/6a21f3b35e20.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue13904] Generator as *args: TypeError replaced

2012-01-29 Thread July Tikhonov
Changes by July Tikhonov : Added file: http://bugs.python.org/file24359/typeerror-replaced-in-stararg-test.diff ___ Python tracker ___ ___ Py

[issue13904] Generator as *args: TypeError replaced

2012-01-29 Thread July Tikhonov
New submission from July Tikhonov : >>> set().union(*(None[k] for k in range(5))) Traceback (most recent call last): File "", line 1, in TypeError: union() argument after * must be a sequence, not generator Clearly, exception in not relevant, since next line works: >>> set().union(*([k] for

[issue6210] Exception Chaining missing method for suppressing context

2012-01-29 Thread Patrick Westerhoff
Patrick Westerhoff added the comment: I have to agree with Georg on that. I think it would make more sense to introduce some internal flag/variable that keeps track of if the cause was explicitely set. So if cause was set (i.e. `from X` syntax is used), then always display it in favor of the

[issue6774] socket.shutdown documentation: on some platforms, closing one half closes the other half

2012-01-29 Thread Charles-François Natali
Charles-François Natali added the comment: I've reverted the commit. -- resolution: -> rejected stage: -> committed/rejected status: open -> closed versions: +Python 3.3 ___ Python tracker ___

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-29 Thread Ezio Melotti
Ezio Melotti added the comment: > One other point... the branch is actually now relative to default, not > 3.2. While that was due to a merging mistake on my part, it also means > I can legitimately ignore the narrow/wide build distinction in the > section on strings. So will this go on 3.3 onl

[issue6774] socket.shutdown documentation: on some platforms, closing one half closes the other half

2012-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9be82f458b79 by Charles-François Natali in branch 'default': Issue #6774: Back out c8b77efe8b56, which only brings confusion. http://hg.python.org/cpython/rev/9be82f458b79 -- nosy: +python-dev ___ Python

[issue13872] socket.detach doesn't mark socket._closed

2012-01-29 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue13899] re pattern r"[\A]" should work like "A" but matches nothing. Ditto B and Z.

2012-01-29 Thread Georg Brandl
Georg Brandl added the comment: Interesting. That shifts the issue, since the current behavior is neither of the two that make sense. Then it would indeed make the most sense to raise in these cases. (I wonder what these patterns actually would match, but I have no time to look in the sre so

[issue13899] re pattern r"[\A]" should work like "A" but matches nothing. Ditto B and Z.

2012-01-29 Thread Ezio Melotti
Ezio Melotti added the comment: [\w] should definitely work, but [\B] doesn't seem to match anything useful, and it just fails silently because it's neither equivalent to \B nor to [B]: >>> re.match(r'foo\B', 'foobar') # on a non-word-boundary -- matches fine <_sre.SRE_Match object at 0xb76dd3

[issue13896] shelf doesn't work with 'with'

2012-01-29 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Oh, I haven't noticed that. Using contextlib.closing solves my problem. Thanks. -- ___ Python tracker ___ _

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Georg Brandl
Changes by Georg Brandl : -- keywords: +patch Added file: http://bugs.python.org/file24357/061f8573af54.diff ___ Python tracker ___ __

[issue13900] documentation page on email.parser contains self-referential non-definition of headersonly parameter

2012-01-29 Thread Georg Brandl
Changes by Georg Brandl : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue13900] documentation page on email.parser contains self-referential non-definition of headersonly parameter

2012-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 690d5978bd21 by Georg Brandl in branch '2.7': Fix #13900: resolve self-referential description of a parameter. http://hg.python.org/cpython/rev/690d5978bd21 -- ___ Python tracker

[issue13900] documentation page on email.parser contains self-referential non-definition of headersonly parameter

2012-01-29 Thread Georg Brandl
Georg Brandl added the comment: Should now be fixed. Thanks for the report. -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-

[issue13900] documentation page on email.parser contains self-referential non-definition of headersonly parameter

2012-01-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0d5667171356 by Georg Brandl in branch '3.2': Fix #13900: resolve self-referential description of a parameter. http://hg.python.org/cpython/rev/0d5667171356 -- nosy: +python-dev ___ Python tracker

[issue13899] re pattern r"[\A]" should work like "A" but matches nothing. Ditto B and Z.

2012-01-29 Thread Georg Brandl
Georg Brandl added the comment: r'[\w]' also matches word chars. I find that a very useful property, since you can easily build classes like '[\w.]' It's also impossible to change this without breaking lots of regexes. It's also explicitly documented, although IMO it's not clear it extends

[issue13857] Add textwrap.indent() as counterpart to textwrap.dedent()

2012-01-29 Thread Georg Brandl
Georg Brandl added the comment: Otherwise +1. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue13857] Add textwrap.indent() as counterpart to textwrap.dedent()

2012-01-29 Thread Georg Brandl
Georg Brandl added the comment: BTW, the short spelling looks like it wouldn't indent the first line. -- nosy: +georg.brandl ___ Python tracker ___ _

  1   2   >