[issue22379] Empty exception message of str.join

2014-09-12 Thread Yongzhi Pan
Yongzhi Pan added the comment: I updated the patches. Since exceptions in 3 do not have a message attribute, I did not check them. Are they OK? -- Added file: http://bugs.python.org/file36605/test_for_35.diff ___ Python tracker

[issue22362] Warn about octal escapes > 0o377 in re

2014-09-12 Thread STINNER Victor
STINNER Victor added the comment: re_octal_escape_overflow_raise.patch: you should write a subfunction to not repeat the error message 3 times. +if c > 0o377: Hum, I never use octal. 255 instead of 0o377 would be less surprising :-p By the way, you should also check for negative n

[issue22389] Generalize contextlib.redirect_stdout

2014-09-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> ncoghlan nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue22389] Generalize contextlib.redirect_stdout

2014-09-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 on Victor's suggestion. I don't think hypergeneralizing it is the way to go. That adds too much complexity for too little benefit. -- nosy: +rhettinger ___ Python tracker

[issue22389] Generalize contextlib.redirect_stdout

2014-09-12 Thread STINNER Victor
STINNER Victor added the comment: redirect_stdout("stderr", stream) looks wrong to be: you want to redirect "stdout" or "stderr"? If you want to redirect something else (ex: stdin), you can still implement the very simple pattern: old_stdin = sys.stdin try: sys.stdin = mock_input ... fina

[issue19232] Speed up _decimal import

2014-09-12 Thread STINNER Victor
STINNER Victor added the comment: "We could speed up the import further by not importing collections in _decimal. That could be done once structseq fully implements the namedtuple protocol (for DecimalTuple)." I suggest to close this issue. I guess that importing decimal is already fast enough

[issue22348] Documentation of asyncio.StreamWriter.drain()

2014-09-12 Thread STINNER Victor
STINNER Victor added the comment: IMO we should mention the write buffer limits ("high- and low-water limits for write flow control"). get_write_buffer_limits() and set_write_buffer_limits() methods of the transport are public, there is no reason to "hide" them. -- ___

[issue22389] Generalize contextlib.redirect_stdout

2014-09-12 Thread Nick Coghlan
Nick Coghlan added the comment: I'm fine with adding "redirect_stderr" - better to have the obvious counterpart, rather than hypergeneralising, or having to explain why it's missing. It's *currently* missing largely on a "wait for someone to ask" basis, and Barry asked. (Tangentially related, I

[issue22348] Documentation of asyncio.StreamWriter.drain()

2014-09-12 Thread Martin Richard
Martin Richard added the comment: Here is an other patch which mentions high and low water limits. I think it's better to talk about it, since it tells extactly what a "full buffer" and "partially drained" means. On the other hand, StreamWriter wraps the transport but does not expose the set/

[issue19232] Speed up _decimal import

2014-09-12 Thread Stefan Krah
Stefan Krah added the comment: I'm fine with closing this. The structseq issue is #1820. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5 -Python 3.4 ___ Python tracker

[issue22378] SO_MARK support for Linux

2014-09-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue20631] python readline module crashing on NULL access

2014-09-12 Thread Ismail Donmez
Ismail Donmez added the comment: Can we please get a review on this? -- nosy: +cartman ___ Python tracker ___ ___ Python-bugs-list mai

[issue20631] python readline module crashing on NULL access

2014-09-12 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue22379] Empty exception message of str.join

2014-09-12 Thread R. David Murray
R. David Murray added the comment: You can check .args[0] in python3. Can you include a complete patch for python3? Your test_for_35 only has a change for test_bytes, not the ones for string_tests. -- ___ Python tracker

[issue21356] Support LibreSSL (instead of OpenSSL): make RAND_egd optional

2014-09-12 Thread Michał Górny
Michał Górny added the comment: > In CPython, the _ssl module is compiled in C. How can we check if libssl > provides RAND_egd() or not at compile time? How about... checking whether the function is provided? Unless I'm missing some major point, AC_CHECK_FUNC should be good enough. > Is there

[issue20334] make inspect Signature hashable

2014-09-12 Thread Yury Selivanov
Yury Selivanov added the comment: Antonie, I'm attaching a patch (issue20334-2.01.patch) to this issue which should fix the problem. Please review. -- Added file: http://bugs.python.org/file36607/issue20334-2.01.patch ___ Python tracker

[issue22394] Update documentation building to use venv and pip

2014-09-12 Thread Brett Cannon
New submission from Brett Cannon: Now that we have ensurepip, is there any reason to not have the Doc/ Makefile create a venv for building the docs instead of requiring people to install sphinx into either their global Python interpreter or some venv outside of their checkout? Basically it wou

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

2014-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9efefcab817e by Brett Cannon in branch 'default': Issue #16104: Allow compileall to do parallel bytecode compilation. http://hg.python.org/cpython/rev/9efefcab817e -- nosy: +python-dev ___ Python tracker

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

2014-09-12 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Claudiu! -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___ ___

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

2014-09-12 Thread Claudiu Popa
Claudiu Popa added the comment: Thank you for committing it. :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue22381] update zlib in 2.7 to 1.2.8

2014-09-12 Thread Matthias Klose
Changes by Matthias Klose : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue22389] Generalize contextlib.redirect_stdout

2014-09-12 Thread Berker Peksag
Berker Peksag added the comment: Here's a simple implementation. I will add tests and update the documentation. -- keywords: +patch nosy: +berker.peksag stage: -> patch review Added file: http://bugs.python.org/file36608/issue22389.diff ___ Python tr

[issue22362] Warn about octal escapes > 0o377 in re

2014-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > By the way, you should also check for negative numbers. Not in this case. You can't construct negative number from three octal digits. -- ___ Python tracker __

[issue22253] ConfigParser does not handle files without sections

2014-09-12 Thread kernc
kernc added the comment: > > I am dubious that there are any with a mixture of both sections and > additional option lines at the top without a section. > rsyncd.conf [1] is one such example, and I wouldn't say there aren't countless more in the wild. > Anyone writing an app and planning to par

[issue22395] test_pathlib error for complex symlinks on Windows

2014-09-12 Thread Justin Foo
New submission from Justin Foo: The _check_complex_symlinks function compares paths for string equality instead of using the assertSame helper function. Patch attached. -- components: Tests messages: 226828 nosy: jfoo priority: normal severity: normal status: open title: test_pathlib er

[issue22395] test_pathlib error for complex symlinks on Windows

2014-09-12 Thread Justin Foo
Justin Foo added the comment: The _check_complex_symlinks function compares stringified paths for string equality instead of using the assertSame helper method. Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file36609/issue22395.patch ___

[issue22356] mention explicitly that stdlib assumes gmtime(0) epoch is 1970

2014-09-12 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue22393] multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly

2014-09-12 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue22379] Empty exception message of str.join

2014-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > You can check .args[0] in python3. Or str(cm.exception). This works on 2.7 too. -- nosy: +serhiy.storchaka ___ Python tracker ___ _

[issue22395] test_pathlib error for complex symlinks on Windows

2014-09-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue20334] make inspect Signature hashable

2014-09-12 Thread Antony Lee
Antony Lee added the comment: While your patch works, I think it is a good opportunity to simplify the implementation of Signature.__eq__, which is *much* more complicated than what it should be. Please comment on the attached patch, which uses the helper method approach I suggested.

[issue22395] test_pathlib error for complex symlinks on Windows

2014-09-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can you explain in which case the assertion breaks? -- ___ Python tracker ___ ___ Python-bugs-list m

[issue21356] Support LibreSSL (instead of OpenSSL): make RAND_egd optional

2014-09-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Unless I'm missing some major point, AC_CHECK_FUNC should be good enough. Building extension modules such as ssl doesn't involve autoconf. > Do you want to make silly assumptions on API depending on provider name, and > then add extra conditionals for versio

[issue22396] AIX posix_fadvise and posix_fallocate

2014-09-12 Thread David Edelsohn
New submission from David Edelsohn: As with Solaris and Issue10812, test_posix fadvise and fallocate fail on AIX. Python is compiled with _LARGE_FILES, which changes the function signature for posix_fadvise and posix_fallocate so that off_t is "long long" on 32 bit system passed in two regist

[issue22253] ConfigParser does not handle files without sections

2014-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Microsoft Windows INI files, "POSIX-compatible config files", and other formats (e.g. Java properties files) use different methods for escaping, quoting, line continuing, interpolations, etc. Actually there are more differences than similarity between them.

[issue22396] AIX posix_fadvise and posix_fallocate

2014-09-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The Python call to those functions does not place the arguments in the > correct registers Well... isn't there a way to fix this? I don't understand how this issue can come up. -- ___ Python tracker

[issue22397] test_socket failure on AIX

2014-09-12 Thread David Edelsohn
New submission from David Edelsohn: AIX has the same test_socket problem with FDPassSeparate as Darwin in Issue12958 so skip some tests. -- components: Library (Lib) files: 12958_aix.patch keywords: patch messages: 226837 nosy: David.Edelsohn, pitrou priority: normal severity: normal st

[issue22396] AIX posix_fadvise and posix_fallocate

2014-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See similar Ruby issue: https://bugs.ruby-lang.org/issues/9914 . As workaround we can redeclare posix_fadvise as "int posix_fadvise(int fd, long offset, long len, int advice)" on 32-bit AIX with enabled _LARGE_FILES. More safe option is to disable posix_fadv

[issue22398] Tools/msi enhancements for 2.7

2014-09-12 Thread Steve Dower
New submission from Steve Dower: This patch has some minor changes to the build scripts for Python 2.7 on Windows. They're fully tested on my build machine, but I wanted someone who's more familiar with how the buildbots are set up to either confirm that the Tools/msi scripts are not used or t

[issue22397] test_socket failure on AIX

2014-09-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue20334] make inspect Signature hashable

2014-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3b974b61e74d by Yury Selivanov in branch 'default': inspect.Signature: Fix discrepancy between __eq__ and __hash__. http://hg.python.org/cpython/rev/3b974b61e74d -- ___ Python tracker

[issue20334] make inspect Signature hashable

2014-09-12 Thread Yury Selivanov
Yury Selivanov added the comment: Antony, I've tweaked the patch a bit and it's now in default branch. Thank you! -- ___ Python tracker ___ __

[issue22343] Install bash activate script on Windows when using venv

2014-09-12 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list ma

[issue22398] Tools/msi enhancements for 2.7

2014-09-12 Thread Zachary Ware
Zachary Ware added the comment: Actually, I think the method Martin used was to create a local config.py in Tools/msi/, which provided the proper settings for the release. See http://hg.python.org/cpython/file/2.7/Tools/msi/msi.py#l37 Either way, the buildbots are completely unaffected by Too

[issue22351] NNTP constructor exception leaves socket for garbage collector

2014-09-12 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue22398] Tools/msi enhancements for 2.7

2014-09-12 Thread Steve Dower
Steve Dower added the comment: Thanks for confirming. Somehow I never noticed the import config line - guess that's a pattern I'm not really used to seeing. Still, I prefer having the env variables there as I invoke the scripts through some batch files (very specific to my machine, unfortunate

[issue22398] Tools/msi enhancements for 2.7

2014-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c55a7bfec0c by Steve Dower in branch '2.7': #22398 Tools/msi enhancements for 2.7 http://hg.python.org/cpython/rev/5c55a7bfec0c -- nosy: +python-dev ___ Python tracker

[issue22398] Tools/msi enhancements for 2.7

2014-09-12 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue22399] Doc: missing anchor for dict in library/functions.html

2014-09-12 Thread Philippe Dessauw
New submission from Philippe Dessauw: There is a missing anchor for the dict functions in the documentation at library/functions.html. It is present in the documentation of all python version. It seems to impact cross-referencing in Sphinx (using intersphinx). -- assignee: docs@python

[issue22354] Idle: highlite tabs

2014-09-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that this is an issue, and I believe others have made similar comments or requests, but I cannot find an existing issue for this. By experiment, it is possible to tag a tab and change the background color for the spaces a tab is visually converted to.

[issue22355] inconsistent results with inspect.getsource / .getsourcelines

2014-09-12 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: inconsistent results with inspect.getsource() / inspect.getsourcelines() -> inconsistent results with inspect.getsource / .getsourcelines versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.3 ___ Python track

[issue22360] Adding manually offset parameter to str/bytes split function

2014-09-12 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue22364] Unify error messages of re and regex

2014-09-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I prefer "cannot" for error messages. "Can't" is an informal version of "cannot", used in speech, dialog representing speech, and 'informal' writing. It looks wrong to me in this context. -- nosy: +terry.reedy ___

[issue22375] urllib2.urlopen().read().splitlines() opening a directory in a FTP server randomly returns incorrect results

2014-09-12 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved superseder: -> urllib2.urlopen().read().splitlines() opening a directory in a FTP server randomly returns incorrect result ___ Python tracker

[issue22376] urllib2.urlopen().read().splitlines() opening a directory in a FTP server randomly returns incorrect result

2014-09-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: You should have just added a new message to #22375 with the revision. #15002 ends with "This is fixed in 3.4 and 3.5. I will backport to 2.7 ( I think, it is worth it)." Please check whether the backport has been done or whether current you still have a proble

[issue22378] SO_MARK support for Linux

2014-09-12 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed versions: +Python 3.5 -Python 2.7, Python 3.4 ___ Python tracker ___ ___ Python-

[issue17120] Mishandled _POSIX_C_SOURCE and _XOPEN_SOURCE in pyconfig.h

2014-09-12 Thread koobs
koobs added the comment: See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192365 -- nosy: +koobs ___ Python tracker ___ __

[issue22388] Unify style of "Contributed by" notes

2014-09-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with making a complete and separate sentence. There are 3 variations. -- Add parenthetical note after last sentence. (Contributed by me.) -- Add note on next line after short line. (Contributed by me. -- Add note after a blank line. (Contributed by me.

[issue20537] logging exc_info parameter should accept exception instances

2014-09-12 Thread Yury Selivanov
Yury Selivanov added the comment: Vinay, Please take a look at the second patch -- 'logging_02.patch' -- with updated docs -- Added file: http://bugs.python.org/file36614/logging_02.patch ___ Python tracker _

[issue22394] Update documentation building to use venv and pip

2014-09-12 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue22351] NNTP constructor exception leaves socket for garbage collector

2014-09-12 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.