[issue19993] Pool.imap doesn't work as advertised

2013-12-16 Thread Jurjen N.E. Bos
New submission from Jurjen N.E. Bos: The pool.imap and pool.imap_unordered functions are documented as a lazy version of Pool.map. In fact, they aren't: they consume the iterator argument as a whole. This is almost certainly not what the user wants: it uses unnecessary memory and will be

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: How about this doc fix? -- keywords: +patch nosy: +vajrasky Added file: http://bugs.python.org/file33159/fix_doc_parse_non_valid_json_float.patch ___ Python tracker rep...@bugs.python.org

[issue19976] Argument Clinic: generate second arg for METH_NOARGS

2013-12-16 Thread STINNER Victor
STINNER Victor added the comment: The Visual Studio pragma disables for the rest of the file, which is undesirable. Maybe we could turn it on and off inline, but it's not clear to me that that would have the desired effect of turning off the warning for explicitly that parameter

[issue19983] Ctrl-C at startup can end in a Py_FatalError call

2013-12-16 Thread STINNER Victor
STINNER Victor added the comment: I modified initstdio() to add raise(SIGINT); at the beginning of the function. I get: $ ./python Fatal Python error: Py_Initialize: can't initialize sys standard streams Traceback (most recent call last): File frozen importlib._bootstrap, line 2157, in

[issue19994] re.match does not return or takes long time

2013-12-16 Thread Taesu Pyo
New submission from Taesu Pyo: // code sampe: import re r = (r'(/.*)*X') s = '' print re.match(r, s) print list(re.finditer(r, s)) print re.findall(r, s) // it does not return or takes long time depends on length of 's' -- components: Regular Expressions

[issue19983] Ctrl-C at startup can end in a Py_FatalError call

2013-12-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 16.12.2013 10:02, STINNER Victor wrote: Maybe we should modify Py_FatalError() to call exit(1) in release mode, and only call abort() in debug mode? Dumping a core dump, opening a Windows fatal error popup, calling Fedora ABRT handler, etc. is

[issue19537] Fix misalignment in fastsearch_memchr_1char

2013-12-16 Thread STINNER Victor
STINNER Victor added the comment: If you compile Python with GCC, we can maybe try something with __attribute__ ((aligned (sizeof(void * attribute. The attribute can be used on a structure field. The problem is that we don't care of the alignment of header attributes, only of data, but

[issue17919] AIX POLLNVAL definition causes problems

2013-12-16 Thread STINNER Victor
STINNER Victor added the comment: I have fixed the issue in http://hg.python.org/cpython/rev/039306b45230 You forget 2.7 and 3.3 branches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17919

[issue19983] Ctrl-C at startup can end in a Py_FatalError call

2013-12-16 Thread STINNER Victor
STINNER Victor added the comment: 2013/12/16 Marc-Andre Lemburg rep...@bugs.python.org: I don't think changing Py_FatalError() is a good idea. However, its use in this particular case (streams not initializing) appears wrong. Python should simply exit with an error code in such a case;

[issue19983] Ctrl-C at startup can end in a Py_FatalError call

2013-12-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 16.12.2013 10:30, STINNER Victor wrote: STINNER Victor added the comment: 2013/12/16 Marc-Andre Lemburg rep...@bugs.python.org: I don't think changing Py_FatalError() is a good idea. However, its use in this particular case (streams not

[issue19983] Ctrl-C at startup can end in a Py_FatalError call

2013-12-16 Thread STINNER Victor
STINNER Victor added the comment: BTW: Why can't we make this an official API function, e.g. Py_Terminate() ? Exiting Python immediatly is bad practice, there is already Py_FatalError() for that. Instead of adding a second public function, I would prefer to remove most calls to

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Ethan Furman
New submission from Ethan Furman: Using Enum to illustrate: -- class Grade(enum.Enum): ... A = 4 ... B = 3 ... C = 2 ... D = 1 ... F = 0 ... def __index__(self): ... return self._value_ -- ['miserable'][Grade.F] 'miserable' -- '%x' %

[issue19988] hex() and oct() use __index__ instead of __int__

2013-12-16 Thread Ethan Furman
Ethan Furman added the comment: Guido van Rossum opined: I still think the problem is with your class design. You shouldn't want a hex representation for a value that's not an integer. Well, in fairness I only supported it because bool does, and I was trying to have

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, I added unit test for this edge case. -- Added file: http://bugs.python.org/file33160/parse_non_valid_json_float_with_unit_test.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19871

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread STINNER Victor
STINNER Victor added the comment: Calls: * hex()/oct() = PyNumber_ToBase() = PyNumber_Index(). * PyUnicode_Format() = mainformatlong() = PyNumber_Long() I never understood the difference between long (__int__ method) and index (__index__ method). Is the difference on the behaviour of floating

[issue19996] httplib infinite read on invalid header

2013-12-16 Thread Cory Benfield
Changes by Cory Benfield c...@lukasa.co.uk: -- components: Library (Lib) nosy: Lukasa priority: normal severity: normal status: open title: httplib infinite read on invalid header type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

[issue19996] httplib infinite read on invalid header

2013-12-16 Thread Cory Benfield
New submission from Cory Benfield: Initially spotted on Requests GitHub bugtracker: https://github.com/kennethreitz/requests/issues/1804 On receiving an HTTP response with an invalid header, httplib stops parsing the headers and attempts to receive the rest of the message as body content.

[issue17919] AIX POLLNVAL definition causes problems

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset c42647d76bd1 by Christian Heimes in branch '3.3': Issue #17919: add missing import of USHRT_MAX http://hg.python.org/cpython/rev/c42647d76bd1 New changeset 1f3f4147c35e by Christian Heimes in branch 'default': Issue #17919: add missing import of

[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-16 Thread Nick Coghlan
Nick Coghlan added the comment: I created a test suite to ensure that all the various cases were handled correctly by the eventual patch (it doesn't test some of the namespace package related edge cases, but they devolve to normal module execution in terms of the final state of __main__, and

[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-16 Thread Nick Coghlan
Nick Coghlan added the comment: Current work in progress patch. The existing multiprocessing tests all pass, but the new main handling tests fail. The fork start_method passes all the tests The forkserver and spawn start methods fail the directory, zipfile and package tests. -- Added

[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-16 Thread Nick Coghlan
Nick Coghlan added the comment: Updated test that handles timeouts better. I also realised the current test failures are due to an error in the test design - the failing cases are ones where we deliberately *don't* rerun __main__ because the entire __main__.py file is assumed to be inside an

[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-16 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19946 ___ ___

[issue19997] imghdr.what doesn't accept bytes paths

2013-12-16 Thread Claudiu.Popa
New submission from Claudiu.Popa: imghdr.what check explicitly for string path, while `open` happily accepts bytes paths, as seen below: x b'\xc2\xba' imghdr.what(x) Traceback (most recent call last): File stdin, line 1, in module File /tank/libs/cpython/Lib/imghdr.py, line 15, in what

[issue19965] Non-atomic generation of Include/Python-ast.h and Python/Python-ast.c

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 874813a3523d by Charles-François Natali in branch '2.7': Issue #19965: Make sure that Python-ast.h is properly taken into account in the http://hg.python.org/cpython/rev/874813a3523d New changeset cfe0a293551f by Charles-François Natali in branch

[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-16 Thread Olivier Grisel
Olivier Grisel added the comment: I applied issue19946_pep_451_multiprocessing_v2.diff and I confirm that it fixes the problem that I reported initially. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19946

[issue19901] tests fail due to unsupported SO_REUSEPORT when building Python 3.3.2-r2

2013-12-16 Thread Reuben Garrett
Reuben Garrett added the comment: On Sat, Dec 14, 2013 at 2:38 PM, Gregory P. Smith rep...@bugs.python.org wrote: ask the gentoo python portage ebuild maintainer and point them at the commit with the additional patch to apply if you want it fixed there. (or file a bug on gentoo's bug tracking

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Eric V. Smith
Eric V. Smith added the comment: It seems to me that by giving it an __index__ method, you're saying it can be used as an integer. It's not surprising to me that hex(), oct(), and bin() would work with a Grade.F object. If anything, I'd say that more places should use __index__ than currently

[issue19912] ntpath.splitunc() is broken and not tested

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 129105f8457d by Serhiy Storchaka in branch '3.3': Issue #19912: Fixed numerous bugs in ntpath.splitunc(). http://hg.python.org/cpython/rev/129105f8457d New changeset 5e39c69bad21 by Serhiy Storchaka in branch 'default': Issue #19912: Fixed numerous

[issue19911] ntpath.splitdrive() fails when UNC part contains \u0130

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7b0d083082ea by Serhiy Storchaka in branch '3.3': Issue #19911: ntpath.splitdrive() now correctly processes the 'İ' character http://hg.python.org/cpython/rev/7b0d083082ea New changeset 63d769dfa4ef by Serhiy Storchaka in branch 'default': Issue

[issue19911] ntpath.splitdrive() fails when UNC part contains \u0130

2013-12-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19911

[issue19911] ntpath.splitdrive() fails when UNC part contains \u0130

2013-12-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19911 ___ ___

[issue19912] ntpath.splitunc() is broken and not tested

2013-12-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19912

[issue19996] httplib infinite read on invalid header

2013-12-16 Thread R. David Murray
R. David Murray added the comment: Well, having it hang forever is a potential DOS attack, so something needs to be fixed, I think. -- nosy: +christian.heimes, r.david.murray ___ Python tracker rep...@bugs.python.org

[issue19998] Python 2.7.6 fails to build _ctypes on GCC 2.x toolchain

2013-12-16 Thread Jim Carroll
New submission from Jim Carroll: When building Python 2.7.6 on older GCC 2.x, the _ctypes module fails to build. The failure is caused due to a header file reference to __builtin_expect (the author expected this to be available when the module was built with gcc, but did not take into account

[issue17919] AIX POLLNVAL definition causes problems

2013-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Christian. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17919 ___ ___ Python-bugs-list mailing

[issue18215] Script to test multiple versions of OpenSSL

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7719efb182e3 by Christian Heimes in branch 'default': Issue #18215: Add script Tools/ssl/test_multiple_versions.py to compile and http://hg.python.org/cpython/rev/7719efb182e3 -- nosy: +python-dev ___

[issue18215] Script to test multiple versions of OpenSSL

2013-12-16 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18215 ___

[issue19887] Path.resolve() fails on complex symlinks

2013-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suppose that was some kind of joke, but what I meant was that we don't need to test with 100 levels of symlinks. 2 or 3 are enough... Yes, sorry for this joke. Your tests LGTM, but why you repeat similar code 3-4 times instead using loops? --

[issue19537] Fix misalignment in fastsearch_memchr_1char

2013-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that adding __attribute__ ((aligned (sizeof(void * to the PyObject type (or to the ob_base field) is enough. If first byte of structure is aligned, then first byte past the structure should be aligned too. --

[issue19987] Winsound: test_alias_fallback fails on WS 2008

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1824fa874f08 by Christian Heimes in branch 'default': Issue #19987: disable test_winsound's test_alias_fallback test when no sound card http://hg.python.org/cpython/rev/1824fa874f08 -- nosy: +python-dev

[issue19887] Path.resolve() fails on complex symlinks

2013-12-16 Thread Vajrasky Kok
Vajrasky Kok added the comment: The patch passed on Windows Vista. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19887 ___ ___ Python-bugs-list

[issue19987] Winsound: test_alias_fallback fails on WS 2008

2013-12-16 Thread Zachary Ware
Zachary Ware added the comment: This is a little odd, since it seems that that buildbot doesn't have a sound card (according to _have_soundcard), but succeeded in playing a sound...although without an ear in the room, we have no way to tell if a sound was played or not. I'm thinking it may

[issue19996] httplib infinite read on invalid header

2013-12-16 Thread Cory Benfield
Cory Benfield added the comment: The easiest way to 'fix' the DoS problem is to throw an exception if an invalid header is parsed. That's a backwards-compatibility problem though: things that previously 'worked' now won't. That presumably limits the ability to back-apply this fix to 2.7.7.

[issue19987] Winsound: test_alias_fallback fails on WS 2008

2013-12-16 Thread Christian Heimes
Christian Heimes added the comment: Zach, that sounds like a really good plan. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19987 ___ ___

[issue19987] Winsound: test_alias_fallback fails on WS 2008

2013-12-16 Thread Zachary Ware
Zachary Ware added the comment: I'll get it committed shortly, thanks Christian. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19987 ___ ___

[issue19987] Winsound: test_alias_fallback fails on WS 2008

2013-12-16 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- assignee: - zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19987 ___ ___

[issue19996] httplib infinite read on invalid header

2013-12-16 Thread R. David Murray
R. David Murray added the comment: I haven't looked at the code, but could we preserve the existing behavior but apply a timeout to mitigate the DOS? On the other hand, the fact that curl manages to return something indicates there is probably an error recovery strategy that would work. I'm

[issue19987] Winsound: test_alias_fallback fails on WS 2008

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset f590e9aeb990 by Zachary Ware in branch '2.7': Issue #19987: Re-write test_alias_fallback in test_winsound to have two http://hg.python.org/cpython/rev/f590e9aeb990 New changeset 5455456945d4 by Zachary Ware in branch '3.3': Issue #19987: Re-write

[issue19996] httplib infinite read on invalid header

2013-12-16 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19996 ___

[issue19996] httplib infinite read on invalid header

2013-12-16 Thread Cory Benfield
Cory Benfield added the comment: Maybe. If we do it we have to apply that timeout to all the socket actions on that HTTP connection. This would have the effect of changing the default value of the timeout parameter on the HTTPConnection object from socket._GLOBAL_DEFAULT_TIMEOUT to whatever

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Ethan Furman
Ethan Furman added the comment: Victor Stinner commented: - I never understood the difference between long (__int__ method) and index (__index__ method). Is the difference on the behaviour of floating point numbers? __index__ was originally added so that non-int

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread STINNER Victor
STINNER Victor added the comment: $ python Python 2.7.5 (default, Nov 12 2013, 16:18:42) import numpy hex(numpy.uint16(257)) '0x101' %x % numpy.uint16(257) '101' x=numpy.uint16(257) x.__int__() 257 x.__index__() 257 -- ___ Python tracker

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Stefan Krah
Stefan Krah added the comment: Ethan Furman rep...@bugs.python.org wrote: The current meaning is unfortunate in that it is possible to want a type that can be used as an index or slice but that is still not a number, and in fact won't be used as a number in any scenario _except_ bin(), hex(),

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Ethan Furman
Ethan Furman added the comment: Did I mention __index__ is an unfortunate name for the current trend for this method? Stefan Krah commented: -- memoryview, struct and probably also array.array accept __index__. When you say accept __index__ do you mean for use as indices,

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Stefan Krah
Stefan Krah added the comment: Did I mention __index__ is an unfortunate name for the current trend for this method? Yes, but it's probably too late to change that now. Also, a fully precise name would be something like: __to_int_exact_iff_object_has_integer_nature__ :) When you say

[issue19912] ntpath.splitunc() is broken and not tested

2013-12-16 Thread Berker Peksag
Berker Peksag added the comment: Hi Serhiy, there are commented-out lines in changeset http://hg.python.org/cpython/rev/e4beb183a674. Are they intentionally there? +#if p[1:2] == ':': +#return '', p # Drive letter present +#firstTwo = p[0:2] +#if firstTwo == '//' or

[issue19912] ntpath.splitunc() is broken and not tested

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4de09cbd3b97 by Serhiy Storchaka in branch '2.7': Removed old implementation of ntpath.splitunc() (issue #19912). http://hg.python.org/cpython/rev/4de09cbd3b97 -- ___ Python tracker

[issue19994] re.match does not return or takes long time

2013-12-16 Thread Tim Peters
Tim Peters added the comment: It will always complete, but may take a very long time - this is one of many ways to write a regexp that can't match requiring time exponential in the length of the string. It's not a bug - it's the way Python's kind of regexp engine works. For detailed

[issue19912] ntpath.splitunc() is broken and not tested

2013-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, my fault. Thank you Berker. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19912 ___ ___

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Ethan Furman
Ethan Furman added the comment: Hmmm... Well, much as I hate to say it, it's sounding like the correct solution here is to have %o and %x work when __index__ is available, instead of the other way around. :( .format is not an issue because one must specify one's own if inheriting from

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread STINNER Victor
STINNER Victor added the comment: Are we in agreement? Start maybe on writing unit tests :-) IMO all int-like objects should behave the same. I don't see any good reason why hex(value) would succeed whereas %x % value fails. Both should succeed (or both should fail). --

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Did I mention __index__ is an unfortunate name for the current trend for this method? Yes, but it's probably too late to change that now. Also, a fully precise name would be something like: __to_int_exact_iff_object_has_integer_nature__ :) Perhaps

[issue19993] Pool.imap doesn't work as advertised

2013-12-16 Thread Tim Peters
Tim Peters added the comment: Nice to see you, Jurjen! Been a long time :-) I'd like to see changes here too. It's unclear what a lazy version is intended to mean, exactly, but I agree the actual behavior is surprising, and that mpool.py is a lot less surprising in several ways. I got

[issue19987] Winsound: test_alias_fallback fails on WS 2008

2013-12-16 Thread Zachary Ware
Zachary Ware added the comment: The revised test passes on that buildbot on 3.3 and 3.x; the 2.7 build is having permissions issues (and seems to have been for some time). Closing the issue. Thanks for pointing it out and approving the rewrite, Christian! -- resolution: - fixed

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, I think adding __index__ to d, i, o, u, U, and c is the correct thing to do here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995 ___

[issue19987] Winsound: test_alias_fallback fails on WS 2008

2013-12-16 Thread Christian Heimes
Christian Heimes added the comment: Awesome! Thanks a lot! :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19987 ___ ___ Python-bugs-list

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Guido van Rossum
Guido van Rossum added the comment: Not so fast. Currently, even in Python 3, '%d' % 3.14 returns '3'. Fixing this will likely break a huge amount of code. -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Guido van Rossum
Guido van Rossum added the comment: Also (the tracker email interface swallowed this): it is possible to want a type that can be used as an index or slice but that is still not a number I'm sorry, but this requirement is absurd. An index *is* a number. You have to make up your mind. (I

[issue7980] time.strptime not thread safe

2013-12-16 Thread David Palms
David Palms added the comment: I am still seeing this in 2.7.5, has a patch been created yet? -- nosy: +dpalms2011 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Eric V. Smith
Eric V. Smith added the comment: If you were going to make this change, I'd think you'd have to look for __index__ and then __int__. But I'll admit I haven't thought through all of the ramifications. It would be interesting to see what tests would break. --

[issue19045] Make on Solaris 11 x64 with OracleStudio12.3 failed

2013-12-16 Thread Christian Heimes
Christian Heimes added the comment: Thanks for the report. This is a duplicate of issue #16733. I'm closing this bug as duplicated. -- nosy: +christian.heimes resolution: - duplicate stage: - committed/rejected status: open - closed versions: +Python 3.3, Python 3.4

[issue16733] Solaris ctypes_test failures

2013-12-16 Thread Christian Heimes
Christian Heimes added the comment: The ctypes issue also affects test_uuid. #19045 is a duplicate of this bug, too. == FAIL: test_ints (ctypes.test.test_bitfields.C_Test)

[issue19999] test_monotonic fails on x86 OpenIndiana

2013-12-16 Thread Christian Heimes
New submission from Christian Heimes: I have seen this failure multiple times. http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.x/builds/7353/steps/test/logs/stdio == FAIL: test_monotonic

[issue19887] Path.resolve() fails on complex symlinks

2013-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: why you repeat similar code 3-4 times instead using loops? For no real reason :) I'll try with a loop. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19887

[issue19887] Path.resolve() fails on complex symlinks

2013-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, I remember. Using subtests would make it more annoying to backport to 2.7. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19887 ___

[issue20000] SSLContext.get_ca_certs() and self-signed certs

2013-12-16 Thread Christian Heimes
New submission from Christian Heimes: The new method SSLContext.get_ca_certs() returns all certificates in the context's trusted X509_STORE. I recently found out that it is possible to put a self-signed certificate into the store and use it successfully with verify_mode CERT_REQUIRED.

[issue19887] Path.resolve() fails on complex symlinks

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 12a52186b4fd by Antoine Pitrou in branch 'default': Issue #19887: Improve the Path.resolve() algorithm to support certain symlink chains. http://hg.python.org/cpython/rev/12a52186b4fd -- nosy: +python-dev

[issue19887] Path.resolve() fails on complex symlinks

2013-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks a lot for the patch! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19887

[issue19996] httplib infinite read on invalid header

2013-12-16 Thread Cory Benfield
Cory Benfield added the comment: An update: in Python 2.7 through 3.3, fixing this should only affect http.client/httplib, because they do most of their header parsing themselves. Fixing this in later versions of Python is more interesting, as http.client got rewritten to use email.parser

[issue20000] SSLContext.get_ca_certs() and self-signed certs

2013-12-16 Thread Christian Heimes
Christian Heimes added the comment: Example: $ openssl s_server -cert Lib/test/ssl_cert.pem -key Lib/test/ssl_key.pem $ ./python import ssl ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv3) ctx.verify_mode = ssl.CERT_REQUIRED ctx.check_hostname = True

[issue19921] Path.mkdir(0, True) always fails

2013-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that the description of the POSIX mkdir utility (*) has something a bit more complex to say about the `-p` option. Instead of simply applying the default umask, it computes (S_IWUSR|S_IXUSR|~filemask)0777 as the mode argument, where filemask is the file

[issue19996] httplib infinite read on invalid header

2013-12-16 Thread Cory Benfield
Cory Benfield added the comment: Actually, that might be OK. I don't know the email package at all, but I suspect being able to handle empty header keys (by ignoring them) is a reasonable thing to do in the email case as well. Thoughts? -- ___

[issue20001] pathlib inheritance diagram too large

2013-12-16 Thread Antoine Pitrou
New submission from Antoine Pitrou: The inheritance diagram at http://docs.python.org/dev/library/pathlib.html is too large, it can easily take up half the vertical space (or perhaps all of it on a smaller screen). The font size looks fine, it's just that there's a lot of spacing around. (of

[issue19921] Path.mkdir(0, True) always fails

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 87b81b7df7f0 by Antoine Pitrou in branch 'default': Issue #19921: When Path.mkdir() is called with parents=True, any missing parent is created with the default permissions, ignoring the mode argument (mimicking the POSIX mkdir -p command).

[issue19921] Path.mkdir(0, True) always fails

2013-12-16 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19921 ___

[issue19930] os.makedirs('dir1/dir2', 0) always fails

2013-12-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19930 ___ ___ Python-bugs-list

[issue19993] Pool.imap doesn't work as advertised

2013-12-16 Thread Tim Peters
Tim Peters added the comment: Just for interest, I'll attach the worm-around I mentioned (imu.py). At this level it's a very simple implementation, but now that I look at it, it's actually a lazy implementation of imap() (or of an unimaginative ;-) imap_unordered()). -- Added file:

[issue20002] Cleanup and microoptimize pathlib

2013-12-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch which contains many small cleanups and optimizations for the pathlib module. Not all of them can be backported to 2.7 version. -- assignee: pitrou components: Library (Lib) files: pathlib_cleanup.patch keywords: patch messages:

[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-16 Thread Christian Heimes
Christian Heimes added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file33168/issue19919.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19919 ___

[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks fine to me. -- stage: - patch review versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19919 ___

[issue19996] httplib infinite read on invalid header

2013-12-16 Thread Cory Benfield
Cory Benfield added the comment: Alright, here's a patch for the current tip. I'll need to prepare a different patch for earlier versions of Python, which will take me a little while longer to do (maybe not today). I've also signed a contributor agreement, but it doesn't look like that's

[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 40955ae17472 by Christian Heimes in branch '3.3': Issue #19919: Fix flacky SSL test. connect_ex() sometimes returns http://hg.python.org/cpython/rev/40955ae17472 New changeset 593c3fa7aa2c by Christian Heimes in branch 'default': Issue #19919: Fix

[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-16 Thread Christian Heimes
Christian Heimes added the comment: Thanks! -- resolution: - fixed stage: patch review - committed/rejected status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19919 ___

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Ethan Furman
Ethan Furman added the comment: Eric V. Smith commented: If you were going to make this change, I'd think you'd have to look for __index__ and then __int__. Does the order matter? Are there any types (and should there be) that would have both and return different

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm with Guido: it doesn't really make sense to allow __index__ but not __int__ on a type. So trying __index__ in str.format() sounds like a distraction. -- ___ Python tracker rep...@bugs.python.org

[issue20002] Cleanup and microoptimize pathlib

2013-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, since it makes backporting more tedious, I'd rather keep this for post-3.4. -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20002

[issue20000] SSLContext.get_ca_certs() and self-signed certs

2013-12-16 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2 ___

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995 ___

[issue19998] Python 2.7.6 fails to build _ctypes on GCC 2.x toolchain

2013-12-16 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Modules/_ctypes/libffi directory contains a copy of externally maintained libffi library. Please report problem to libffi maintainers: https://github.com/atgreen/libffi -- nosy: +Arfrever ___

[issue19995] hex() and %x, oct() and %o do not behave the same

2013-12-16 Thread Ethan Furman
Ethan Furman added the comment: Antoine Pitrou opined: -- I'm with Guido: it doesn't really make sense to allow __index__ but not __int__ on a type. So trying __index__ in str.format() sounds like a distraction. -- hex(3.14) # calls __index__ Traceback (most recent

  1   2   >