[issue25741] Usual Installation Directory

2015-11-27 Thread Zachary Ware
Zachary Ware added the comment: Here's a patch to try to modernize the whole section a bit, and to remove one of the two other instances of 'Python35' in the docs (the other instance is in the docs for pyvenv, which needs its own overhaul in a separate issue). -- keywords: +patch

[issue25733] Idle does not handle non-standard compile errors

2015-11-27 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: -> terry.reedy stage: -> needs patch versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue25741] Usual Installation Directory

2015-11-27 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +steve.dower ___ Python tracker ___ ___ Python-bugs-list

[issue25719] Deprecate spitfire benchmark

2015-11-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 75751d838789 by Zachary Ware in branch 'default': Issue #25719: Deprecate spitfire benchmark. https://hg.python.org/benchmarks/rev/75751d838789 -- nosy: +python-dev ___ Python tracker

[issue25719] Deprecate spitfire benchmark

2015-11-27 Thread Zachary Ware
Zachary Ware added the comment: Done. Thanks, Florin! -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys

2015-11-27 Thread Robert Collins
Robert Collins added the comment: @Serhiy, EXIT_FAILURE is used in Python's C code itself (just once admittedly, and then we use 0 sometimes for success and sometimes for errors, and then 1 for errors... aiee.) FWIW to the extent that folk want to write posix code in Python, I'm all for

[issue25749] asyncio.Server class documented but not exported

2015-11-27 Thread Ron Frederick
New submission from Ron Frederick: The asyncio documentation defines the class 'asyncio.Server' in section 18.5.1.15. However, this class is not exported by asyncio. It is defined in base_events.py but not in the __all__ list. The only class exported at the asyncio top level is

[issue25744] Reference leaks in test_collections

2015-11-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python -m test.regrtest -uall -R 3:3 test_collections [1/1] test_collections beginning 6 repetitions 123456 .. test_collections leaked [-2, 0, 0] references, sum=-2 test_collections leaked [-1, 2, 1] memory blocks, sum=2 1 test failed:

[issue25745] Reference leaks in test_curses

2015-11-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python -m test.regrtest -uall -R 3:3 test_curses [1/1] test_curses beginning 6 repetitions 123456 . test_curses leaked [2, 2, 2] references, sum=6 test_curses leaked [0, 1, 2] memory blocks, sum=3 1 test failed: test_curses -- components:

[issue25743] Clarify exactly what \w matches in UNICODE mode

2015-11-27 Thread Zack Weinberg
New submission from Zack Weinberg: The `re` module documentation does not do a good job of explaining exactly what `\w` matches. Quoting https://docs.python.org/3.5/library/re.html : > \w > For Unicode (str) patterns: > Matches Unicode word characters; this includes most characters > that can

Re: [issue25625] "chdir" Contex manager for pathlib

2015-11-27 Thread Stephane Wirtel
What's the relation with subprocess ? -- Stéphane Wirtel - http://wirtel.be - @matrixise ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

[issue25747] test_idle failure in leaks searching mode

2015-11-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python -m test.regrtest -uall -R 3:3 test_idle [1/1] test_idle beginning 6 repetitions 123456 test test_idle failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython-debug/Lib/idlelib/idle_test/test_warning.py", line 76, in

[issue25743] Clarify exactly what \w matches in UNICODE mode

2015-11-27 Thread Andi McClure
Andi McClure added the comment: I would like to request also a clear explanation be given for the documentation in the 2.7 branch. From https://docs.python.org/2.7/library/re.html : "\w ... If UNICODE is set, this will match the characters [0-9_] plus whatever is classified as alphanumeric in

[issue25746] test_unittest failure in leaks searching mode

2015-11-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python -m test.regrtest -uall -R 3:3 test_unittest [1/1] test_unittest test test_unittest failed -- multiple errors occurred; run in verbose mode for details 1 test failed: test_unittest $ ./python -m test.regrtest -vvuall -R 3:3 test_unittest ...

[issue25687] Error during test case and tearDown

2015-11-27 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +ezio.melotti, michael.foord, rbcollins versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3 ___ Python tracker

[issue25748] Resource warnings when run test_asyncio in leaks searching mode

2015-11-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python -m test.regrtest -uall -R 3:3 test_asyncio [1/1] test_asyncio ... .Executing .start() done, defined at /home/serhiy/py/cpython-debug/Lib/test/test_asyncio/test_pep492.py:146> result=None created at

[issue25704] Update the devguide to 3.5

2015-11-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: The section of committing.rst in question was updated from 3.3 and 3.4 to 3.4 and 3.5 in 414a7e2067b2 after 3.4 came out. I think we should continue to update it. -- nosy: +terry.reedy ___ Python tracker

[issue25749] asyncio.Server class documented but not exported

2015-11-27 Thread Yury Selivanov
Yury Selivanov added the comment: Let's not export the Server class -- in uvloop, for instance, I have a completely different internal implementation of Server (I can't use the one from asyncio). -- ___ Python tracker

[issue25743] Clarify exactly what \w matches in UNICODE mode

2015-11-27 Thread Zack Weinberg
Zack Weinberg added the comment: FWIW, the actual behavior of \w matching "everything in Unicode general categories L* and N*, plus U+005F (underscore)" is consistent across all versions I can conveniently test (2.7, 3.4, 3.5). In 2.7, there are four characters in general category Nl that \w

[issue25733] Idle does not handle non-standard compile errors

2015-11-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I believe startup files are compiled in PyShell.py, line 649 (3.x) try: code = compile(source, filename, "exec") except (OverflowError, SyntaxError): and editor code is compiled in ScriptBinding.py, line 100 try:

[issue22233] http.client splits headers on non-\r\n characters

2015-11-27 Thread R. David Murray
R. David Murray added the comment: I agree. Can you update the email issue with this suggestion and/or a patch? The problem with this, of course is backward compatibility, but since it is more correct per the RFCs, our past policy has been to fix it anyway. --

[issue25752] asyncio.readline - add customizable line separator

2015-11-27 Thread STINNER Victor
STINNER Victor added the comment: I like the idea. It's common in protocols to have different kinds of "terminators" to mark the end of a message. C strings use a null byte for example. I would be trivial to accept other terminators, since we don't store received bytes as lines, but as a raw

[issue25608] ascynio readexactly() should raise ValueError if passed length <= 0 in argument

2015-11-27 Thread Guido van Rossum
Guido van Rossum added the comment: read(0) on a regular stream and os.read(fd, 0) also return an empty string without error. This is not something we should keep debating. -- ___ Python tracker

[issue25696] "make -j9 install" fails because bininstall target requires the libainstall target

2015-11-27 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file41178/bininstall-4.patch ___ Python tracker ___

[issue25757] Subclasses of property lose docstring

2015-11-27 Thread Emanuel Barry
Emanuel Barry added the comment: Pointed out a refleak and a small nit. -- nosy: +ebarry stage: -> patch review ___ Python tracker ___

[issue25741] Usual Installation Directory

2015-11-27 Thread Steve Dower
Steve Dower added the comment: That patch looks good to me. LOCALAPPDATA is set by the operating system, typically to C:\Users\\AppData\Local (at least since Vista I think? Certainly since Win7). While it's possible to customize it, people who know how to do that won't be emailing webmasters

[issue25754] Test test_rlcompleter failed if run twice

2015-11-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python -m test.regrtest test_rlcompleter test_rlcompleter [1/2] test_rlcompleter [2/2] test_rlcompleter test test_rlcompleter failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython-debug/Lib/test/test_rlcompleter.py", line 66, in

[issue25742] locale.setlocale does not work with unicode strings

2015-11-27 Thread STINNER Victor
STINNER Victor added the comment: I don't see the benefit of supporting Unicode strings for setlocale() arguments: locale name are always encodable to ASCII, so loc.decode('ascii') is enough to workaround the issue. But well, I think it's ok if it doesn't make the code much more complex ;-)

[issue25757] Subclasses of property lose docstring

2015-11-27 Thread Torsten Landschoff
New submission from Torsten Landschoff: I actually found this in Python2, but it is still unchanged in Python 3.6 dev. Namely, creating an instance of a class derived from property will drop the docstring passed explicitly to the constructor: torsten@defiant:~$ python3.6 Python 3.6.0a0

[issue25742] locale.setlocale does not work with unicode strings

2015-11-27 Thread STINNER Victor
STINNER Victor added the comment: Marc-Andre Lemburg added the comment: > No big deal. There are probably lots more places in the stdlib which > break without Unicode compiled in... :-) Well, to have more fun, try to run any Python application with a Python compiled without Unicode support

[issue25757] Subclasses of property lose docstring

2015-11-27 Thread Torsten Landschoff
Torsten Landschoff added the comment: Just a note about the patch: I changed the behaviour a bit in that the code does not ignore random exceptions while getting getter.__doc__. I think that would be surprising for most users and it also does not match the application of the doc field to the

[issue25757] Subclasses of property lose docstring

2015-11-27 Thread Torsten Landschoff
Torsten Landschoff added the comment: Here is a proposed patch to correct this including regression tests. -- keywords: +patch Added file: http://bugs.python.org/file41176/subprop_doc.diff ___ Python tracker

[issue16151] Deferred KeyboardInterrupt in interactive mode

2015-11-27 Thread Martin Panter
Martin Panter added the comment: Discovered Issue 22923 is already open about “Display all possibilities” problem. It sounds like that may be a regression in Readline, not Python. -- ___ Python tracker

[issue25742] locale.setlocale does not work with unicode strings

2015-11-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I wouldn't say this is a feature request. What the code wanted to check is "if this is an iterable of two strings, convert these to a locale string". I have no idea why the doc string uses "iterable". IMO, a tuple of two strings would have been fine and

[issue25755] Test test_property failed if run twice

2015-11-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python -m test.regrtest test_property test_property [1/2] test_property [2/2] test_property test test_property failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython-debug/Lib/test/test_property.py", line 172, in

[issue25742] locale.setlocale does not work with unicode strings

2015-11-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7841e9b614eb by Victor Stinner in branch '2.7': Closes #25742: locale.setlocale() now accepts a Unicode string for its second https://hg.python.org/cpython/rev/7841e9b614eb -- nosy: +python-dev resolution: -> fixed stage: -> resolved

[issue25742] locale.setlocale does not work with unicode strings

2015-11-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 27.11.2015 23:50, STINNER Victor wrote: > > STINNER Victor added the comment: > >> BTW: Why did you use (_str, _unicode) instead of basestring ? > > Serhiy usually insists that technically, it's possible to compile Python 2.7 > without Unicode

[issue25522] IDLE: warn if save-as name matches stdlib name

2015-11-27 Thread irdb
Changes by irdb : -- nosy: +irdb ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25252] Hard-coded line ending in asyncio.streams.StreamReader.readline

2015-11-27 Thread Martin Panter
Martin Panter added the comment: Eric seems to have retracted this proposal, however Issue 25752 has also been opened, which sounds very similar. -- nosy: +martin.panter status: open -> closed ___ Python tracker

[issue18082] Inconsistent behavior of IOBase methods on closed files

2015-11-27 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___

[issue25742] locale.setlocale does not work with unicode strings

2015-11-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 27.11.2015 23:11, STINNER Victor wrote: > > STINNER Victor added the comment: > > I don't see the benefit of supporting Unicode strings for setlocale() > arguments: locale name are always encodable to ASCII, so loc.decode('ascii') > is enough to

[issue9504] signal.signal/signal.alarm not working as expected

2015-11-27 Thread STINNER Victor
STINNER Victor added the comment: I don't understand this issue. I would expect that a system call fails with EINTR if it is interrupted by a signal. Python explicitly configures the C library to get EINTR errors: automatic retry is disabled when Python sets its signal handlers. If a system

[issue25696] "make -j9 install" fails because bininstall target requires the libainstall target

2015-11-27 Thread Martin Panter
Martin Panter added the comment: I agree your patches should fix your practical bug (I can reproduce it, two out of three times). My concern is more about making the code cleaner and less likely to grow problems in the future. :) The worse case with patch 3 would be the “Creating directory”

[issue9504] signal.signal/signal.alarm not working as expected

2015-11-27 Thread Martin Panter
Martin Panter added the comment: Okay, I tend to agree, and don’t have a problem with rejecting this. -- ___ Python tracker ___

[issue25755] Test test_property failed if run twice

2015-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As result the test is failed in leaks searching mode. $ ./python -m test.regrtest -uall -R 3:3 test_property [1/1] test_property beginning 6 repetitions 123456 test test_property failed -- Traceback (most recent call last): File

[issue25749] asyncio.Server class documented but not exported

2015-11-27 Thread STINNER Victor
STINNER Victor added the comment: Yury Selivanov added the comment: > But Ron suggested to actually export the Server class, so that it's available > as 'asyncio.Server'. And I think that *that* is a bad idea, (...) I know, but IMHO the issue is wider than just exporting or not the symbol.

[issue25742] locale.setlocale does not work with unicode strings

2015-11-27 Thread STINNER Victor
STINNER Victor added the comment: Marc-Andre Lemburg added the comment: > Hmm, but basestring is always defined, even when Python is compiled > without Unicode support (...) Oh, I didn't know. Well, I already pushed my patch and it works. Feel free to modify locale.py to use basestring. I'm not

[issue25608] ascynio readexactly() should raise ValueError if passed length <= 0 in argument

2015-11-27 Thread Марк Коренберг
Марк Коренберг added the comment: result of readexactly(0) is indistinguishable from EOF, so no one should try to use that as I think. What is the useful case when zero bytes should be read ? -- ___ Python tracker

[issue10399] AST Optimization: inlining of function calls

2015-11-27 Thread STINNER Victor
STINNER Victor added the comment: "Can we resurrect this, perhaps by taking it up on python-dev?" I created a new "FAT Python" project to reimplement such kind of optimizations with a similar design (similar but different ;-)): https://faster-cpython.readthedocs.org/fat_python.html --

[issue25751] ctypes.util , Shell Injection in find_library()

2015-11-27 Thread Martin Panter
Martin Panter added the comment: There is a patch at Issue 22636 which looks like it replaces all five os.popen() calls. -- nosy: +martin.panter resolution: -> duplicate status: open -> closed superseder: -> avoid using a shell in ctypes.util: replace os.popen with subprocess

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2015-11-27 Thread Martin Panter
Martin Panter added the comment: See Issue 25751 for some demo exploits on Linux, if anyone wants inspiration for test cases. Maybe this should be applied as a bug fix. I haven’t looked at the patch, other than confirming it removes all five os.popen() calls. -- nosy: +martin.panter

[issue25751] ctypes.util , Shell Injection in find_library()

2015-11-27 Thread Martin Panter
Martin Panter added the comment: Your Ubuntu link seems broken, or is that a private report? -- ___ Python tracker ___

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2015-11-27 Thread Martin Panter
Changes by Martin Panter : -- components: +ctypes ___ Python tracker ___ ___

[issue25742] locale.setlocale does not work with unicode strings

2015-11-27 Thread STINNER Victor
STINNER Victor added the comment: > BTW: Why did you use (_str, _unicode) instead of basestring ? Serhiy usually insists that technically, it's possible to compile Python 2.7 without Unicode support. I don't believe that anyone uses this crazy feature, but well, it was easier to use _unicode

[issue25742] locale.setlocale does not work with unicode strings

2015-11-27 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 28.11.2015 00:00, STINNER Victor wrote: > > STINNER Victor added the comment: > > Marc-Andre Lemburg added the comment: >> Hmm, but basestring is always defined, even when Python is compiled >> without Unicode support (...) > > Oh, I didn't know. Well,

[issue25756] asyncio WriteTransport documentation typo

2015-11-27 Thread Марк Коренберг
New submission from Марк Коренберг: Here is the match against master. Doc/library/asyncio-protocol.rst: @@ -156,9 +156,9 @@ WriteTransport high-water limit is given, the low-water limit defaults to an implementation-specific value less than or equal to the high-water

[issue21579] Python 3.4: tempfile.close attribute does not work

2015-11-27 Thread Марк Коренберг
Марк Коренберг added the comment: No activity last week ? Why not to merge ? -- ___ Python tracker ___ ___

[issue22233] http.client splits headers on non-\r\n characters

2015-11-27 Thread Martin Panter
Martin Panter added the comment: David: what is the email issue you mentioned? In the mean time, I am uploading a patch to this issue. It seems using StringIO is a bit slower than str.splitlines(). I found a way to optimize building long lines, which compensated a lot of the loss, but this

[issue25754] Test test_rlcompleter failed if run twice

2015-11-27 Thread Martin Panter
Martin Panter added the comment: Here is a possible fix, just using mock.patch.object() and a context manager to remove the attribute after the test. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file41179/repeat-rlcompleter.patch

[issue16151] Deferred KeyboardInterrupt in interactive mode

2015-11-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +No prompt for "display all X possibilities" on completion-enabled input() ___ Python tracker

[issue25754] Test test_rlcompleter failed if run twice

2015-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- stage: patch review -> commit review ___ Python tracker ___ ___

[issue25742] locale.setlocale does not work with unicode strings

2015-11-27 Thread tierlieb
New submission from tierlieb: Within locale.py in setlocale your have this piece of code: if locale and type(locale) is not type(""): # convert to string locale = normalize(_build_localename(locale)) That does not work with unicode strings as I found out after wondering

[issue25696] "make -j9 install" fails because bininstall target requires the libainstall target

2015-11-27 Thread STINNER Victor
STINNER Victor added the comment: > $(LIBPC) is a single directory name, so I suggest dropping the “for” loop. Ok, here is a version without loop. I also added "-" before the if to mimick other lines of the bininstall target. Does it look better now? > (...) there is technically still a race

[issue25753] Reference leaks in test_smtplib

2015-11-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python -m test.regrtest -uall -R 3:3 test_smtplib [1/1] test_smtplib beginning 6 repetitions 123456 .. test_smtplib leaked [0, 1, 1] references, sum=2 test_smtplib leaked [0, 1, 2] memory blocks, sum=3 1 test failed: test_smtplib --

[issue25749] asyncio.Server class documented but not exported

2015-11-27 Thread STINNER Victor
STINNER Victor added the comment: Yeah, I recall this point. The doc points to Server, but Guido didn't want to expose "implementation details" of Server like sockets. Different implementations of event loops (Yury gave the good example of uvloop based on libuv) don't give (direct) access to

[issue25749] asyncio.Server class documented but not exported

2015-11-27 Thread Yury Selivanov
Yury Selivanov added the comment: > Yeah, I recall this point. The doc points to Server, but Guido didn't want to expose "implementation details" of Server like sockets. Different implementations of event loops (Yury gave the good example of uvloop based on libuv) don't give (direct) access to

[issue14826] urllib2.urlopen fails to load URL

2015-11-27 Thread Martin Panter
Martin Panter added the comment: FWIW urlopen() already handles space characters in the Location target of redirects; see HTTPRedirectHandler.redirect_request(). So I think it is reasonable to handle space characters in user-supplied URLs also, if it is done properly. -- nosy:

[issue25741] Usual Installation Directory

2015-11-27 Thread Laura Creighton
Laura Creighton added the comment: Where does it go if the user hasn't set %LOCALAPPDATA% ? -- nosy: +lac ___ Python tracker ___

[issue25741] Usual Installation Directory

2015-11-27 Thread Firat Ozgul
New submission from Firat Ozgul: Official documentation reads: "On Windows machines, the Python installation is usually placed in C:\Python35" However, as of Python 3.5.0, usual installation directory on Windows is %LOCALAPPDATA%\Programs\Python. -- assignee: docs@python components:

[issue25741] Usual Installation Directory

2015-11-27 Thread Firat Ozgul
Firat Ozgul added the comment: Correct me if I am wrong, but as far as I know, %LOCALAPPDATA% is always set in Windows. When you want to install Python for just one user (which is the default), files are installed into this directory (LOCALAPPDATA). If you choose to install Python for all

[issue25741] Usual Installation Directory

2015-11-27 Thread Laura Creighton
Laura Creighton added the comment: I don't know the answer, but from the point of view of a webmaster who gets support requests and doesn't have a windows system, it would be very useful to already know where a person's python is supposed to be, and thus good if the documentation said something

[issue25741] Usual Installation Directory

2015-11-27 Thread Firat Ozgul
Firat Ozgul added the comment: Actually, under 'Using Python on Windows' at https://docs.python.org/3/using/windows.html, the documentation correctly refers to %LOCALAPPDATA% and %PROGRAMFILES% or %PROGRAMFILES(x86)% environment variables as the default installation directories for