[issue25316] distutils: broken error reporting about vcvarsall.bat

2015-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset a2016b29762c by Steve Dower in branch '3.5': Issue #25316: distutils raises OSError instead of DistutilsPlatformError when MSVC is not installed. https://hg.python.org/cpython/rev/a2016b29762c New changeset 07161dd8a078 by Steve Dower in branch

[issue25294] Absolute imports fail in some cases where relative imports would work

2015-10-05 Thread Brett Cannon
Brett Cannon added the comment: You have to realize, Patrick, that the ability for `from ... import ...` to work in some situations that `import ...` won't is an age-old problem -- they are different at the bytecode level as well as how __import__ handles them -- and starting in Python 3.5 it

[issue25316] distutils: broken error reporting about vcvarsall.bat

2015-10-05 Thread Steve Dower
Steve Dower added the comment: Ah, found it in the linked thread. I'll fix for 3.5.1. -- ___ Python tracker ___

[issue25316] distutils: broken error reporting about vcvarsall.bat

2015-10-05 Thread Steve Dower
Steve Dower added the comment: Do you have a full stack trace for that exception? I don't see anywhere that should be able to raise WinError in _find_vcvarsall. -- ___ Python tracker

[issue25298] Add lock and rlock weakref tests

2015-10-05 Thread Nir Soffer
Changes by Nir Soffer : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue25175] Documentation-Tkinter Clarify module spelling change in Python 3 docs

2015-10-05 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue20981] ssl doesn't build anymore with OpenSSL 0.9.7 or older: X509_check_ca

2015-10-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: For ancient OSes such as RHEL 4, I would suggest people request backports from the OS vendor if desired. -- ___ Python tracker

[issue25319] Keep lock type when reseting internal locks

2015-10-05 Thread Nir Soffer
Changes by Nir Soffer : -- nosy: +gregory.p.smith ___ Python tracker ___ ___

[issue25316] distutils: broken error reporting about vcvarsall.bat

2015-10-05 Thread Steve Dower
Changes by Steve Dower : -- assignee: -> steve.dower components: +Windows keywords: +3.5regression nosy: +eric.araujo, paul.moore, tim.golden, zach.ware ___ Python tracker

[issue25316] distutils: broken error reporting about vcvarsall.bat

2015-10-05 Thread Steve Dower
Changes by Steve Dower : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-05 Thread R. David Murray
R. David Murray added the comment: Yes, that would be correct. OrderedDict is designed to keep things in insertion order, so supporting changing that order is not part of its mission. Sorry about that, you'll have to write your own class. Now, Raymond might find the idea of supporting other

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-05 Thread Serge Matveenko
Serge Matveenko added the comment: Ok, then the OrderedDict is useless for any advanced hacking like altering the order in which __setitem__ stores items. It is just useless Python code and so much appliances missed for this class:( Thank you all for these completely helpful answers.

[issue24505] shutil.which wrong result on Windows

2015-10-05 Thread R. David Murray
R. David Murray added the comment: Well, that's a newish situation for Windows, something I certainly wasn't aware of. Which is trying to find the executable that would be found if typed at the prompt. So, what is the correct algorithm for emulating how Windows does that search? (Or some

[issue25319] Keep lock type when reseting internal locks

2015-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 69a26f0800b3 by Benjamin Peterson in branch '2.7': reinitialize an Event's Condition with a regular lock (closes #25319) https://hg.python.org/cpython/rev/69a26f0800b3 New changeset 6108d30dde21 by Benjamin Peterson in branch '3.4': reinitialize an

[issue25321] Null Dereference "subname" in zipimport.c

2015-10-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't think get_subname can return NULL. -- ___ Python tracker ___ ___

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2015-10-05 Thread Mauro S. M. Rodrigues
Mauro S. M. Rodrigues added the comment: Hi everybody! This is my second patch on the community, although the first one is not merged, so any feedback is appreciated. I've added tests to cover this new situation and docs to let people know about the possibility of keeping their temporary

[issue25321] Null Dereference "subname" in zipimport.c

2015-10-05 Thread Pankaj Sharma
New submission from Pankaj Sharma: Hi , The issues reported as String NULL dereferecne at line Python-2.7.10/Modules/zipimport.c:266 for "subname" which assigned by get_subname(fullname) at line 264.so there should be check "subname" for NULL and return error,if it is NULL. the respective

[issue23609] Export PyModuleObject in moduleobject.h

2015-10-05 Thread Hristo Venev
Hristo Venev added the comment: Quote from PEP 489: The Py_mod_create slot is used to support custom module subclasses. There is no way to subclass PyModuleObject from C. -- versions: +Python 3.5 -Python 3.4 ___ Python tracker

[issue24505] shutil.which wrong result on Windows

2015-10-05 Thread Steve Dower
Steve Dower added the comment: The Win32 API function linked by eryksun is the correct way to determine whether to include the current directory in the search - the doc specifically refers to matching cmd.exe's behaviour (searching ".;%PATH%" vs. just "%PATH%"). The PATHEXT behaviour should

[issue24505] shutil.which wrong result on Windows

2015-10-05 Thread eryksun
eryksun added the comment: My suggestion is only for 3.5 / 3.6, because Windows XP is no longer supported. Starting with Windows Vista, both cmd.exe and CreateProcess support this behavior. I realize that disabling searching the current director by default is going beyond what cmd.exe does,

[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-05 Thread Florin Papa
Florin Papa added the comment: Hi Stefan, When activating the "--with-mpx" flag in ./configure, a check is also performed to see if the compiler is GCC version 5.1 or higher in order to support MPX (and an appropriate error is shown, indicating that the compiler version is wrong). Setting

[issue25316] distutils: broken error reporting about vcvarsall.bat

2015-10-05 Thread Marius Gedminas
New submission from Marius Gedminas: When you try to build a C extension on Windows without having a C compiler, distutils tries to raise DistutilsPlatformError("Unable to find vcvarsall.bat"). However, on Python 3.5, it doesn't do that -- instead it lets a WinError(2 "no such file or

[issue12486] tokenize module should have a unicode API

2015-10-05 Thread Martin Panter
Martin Panter added the comment: I didn’t notice that this dual untokenize() behaviour already existed. Taking that into account weakens my argument for having separate text and bytes tokenize() functions. -- ___ Python tracker

[issue12486] tokenize module should have a unicode API

2015-10-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Martin. Here is rebased patch that addresses Matin's comments. I agree that having untokenize() changes its output type depending on the ENCODING token is bad design and we should change this. But this is perhaps other issue.

[issue12486] tokenize module should have a unicode API

2015-10-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file40679/tokenize_str_2.diff ___ Python tracker ___

[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-05 Thread Florin Papa
Florin Papa added the comment: Hi Antoine, Third party modules might need patching to work with MPX, as did the math module, included in this patch. Everything else worked fine in Python 2.7.10+ and 3.6 when running the Grand Unified Python Benchmarks suite and Openstack Swift ssbench

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-05 Thread Serge Matveenko
Serge Matveenko added the comment: Zach, ok I got your point. But there is Python implementation in the library still which does not conform the one done in C. Such a behavior is tremendously confusing. If there is both Python and C implementation in the library they must conform each other.

[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2015-10-05 Thread Peter Funk
Changes by Peter Funk : -- nosy: +pefu ___ Python tracker ___ ___

[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2015-10-05 Thread Peter Funk
Changes by Peter Funk : -- nosy: +pefu ___ Python tracker ___ ___ Python-bugs-list

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-05 Thread Serge Matveenko
Serge Matveenko added the comment: If Python source does conform the one in C, it will be completely fine and understandable to have such a change and to rely on it in using version checks or whatever. -- ___ Python tracker

[issue25317] Convert test_

2015-10-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: A large part of test_tokenize is doctests. Doctests are less powerful than unittests, and error reporting in doctests is less informative than in unittests. Proposed patch converts doctests to unittests. -- components: Tests files:

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> rhettinger nosy: +rhettinger priority: normal -> low ___ Python tracker ___

[issue25317] Convert test_tokenize to unittests

2015-10-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: Convert test_ -> Convert test_tokenize to unittests ___ Python tracker ___

[issue25313] IDLE: gracefully handle themes (or keysets, or ...) not present

2015-10-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Schedule update: 3.4.4 will be delayed untill after 3.5.1, which will be much sooner than the original minimum of 4 months after 3.5.0. Larry promises at least two weeks notice before 3.5.1rc1 but will give no hint of when notice might be given. So we have

[issue25304] Add run_coroutine_threadsafe() to asyncio

2015-10-05 Thread Vincent Michel
Vincent Michel added the comment: I attached a patch that should sum up all the points we discussed. I replaced the `call_soon_threadsafe` example with: loop.call_soon_threadsafe(callback, *args) cause I couldn't find a simple specific usage. Let me know if you think of a better example.

[issue25294] Absolute imports fail in some cases where relative imports would work

2015-10-05 Thread Patrick Maupin
Patrick Maupin added the comment: You are correct that I have conflated two issues, but they are not orthogonal -- if you choose to use relative imports, you will never encounter this issue, because your imports will all be of the 'from ... import' form. (And, as you point out, the fact that

[issue25266] mako benchmark not working in Python 3.6

2015-10-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks, Brett and Florin! -- ___ Python tracker ___ ___ Python-bugs-list

[issue1644818] Allow built-in packages and submodules as well as top-level modules

2015-10-05 Thread Nick Coghlan
Nick Coghlan added the comment: Petr, this could be an interesting issue to take a look at from the point of view of the builtin and extension module import changes in Python 3.5. Given the extent of the import system changes across 3.3/4/5, it's even conceivable we may have made this work

[issue14373] C implementation of functools.lru_cache

2015-10-05 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> serhiy.storchaka status: open -> pending ___ Python tracker ___

[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-05 Thread Florin Papa
Florin Papa added the comment: Hi all, Thank you for your feedback on the code I submitted. I added the MPX flags to CFLAGS, not CFLAGS_NODIST, because they also need to be included in LDFLAGS. Please see the new set of patches. Thank you, Florin -- Added file:

[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-05 Thread Florin Papa
Changes by Florin Papa : Added file: http://bugs.python.org/file40682/mpx_enable_2_7_v2.patch ___ Python tracker ___

[issue25301] Optimize UTF-8 decoder with error handlers

2015-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3152e4038d97 by Victor Stinner in branch 'default': Issue #25301: The UTF-8 decoder is now up to 15 times as fast for error https://hg.python.org/cpython/rev/3152e4038d97 -- nosy: +python-dev ___ Python

[issue25301] Optimize UTF-8 decoder with error handlers

2015-10-05 Thread STINNER Victor
STINNER Victor added the comment: I pushed my optimization. I close the issue. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: This looks ok to me as long as it's disabled by default. -- type: security -> enhancement ___ Python tracker ___

[issue25175] Documentation-Tkinter Clarify module spelling change in Python 3 docs

2015-10-05 Thread Bar Harel
Bar Harel added the comment: I guess you're correct, a simple mistake one time mistake shouldn't require the changing of the docs. -- ___ Python tracker

[issue20981] ssl doesn't build anymore with OpenSSL 0.9.7 or older: X509_check_ca

2015-10-05 Thread Mișu Moldovan
Mișu Moldovan added the comment: For the record, this is an issue in Red Hat Enterprise Linux 4 too. For RHEL 4, "Extended" support ends on March 31, 2017, according to https://access.redhat.com/support/policy/updates/errata -- ___ Python tracker

[issue25317] Convert test_tokenize to unittests

2015-10-05 Thread Eric V. Smith
Eric V. Smith added the comment: +1 -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-05 Thread STINNER Victor
STINNER Victor added the comment: Results of bench.py attached to issue #25227 (ASCII and Latin1 encoders): attached bench_ucs1_result.txt file. +-+--- Summary | ucs1_before | ucs1_after +-+--- ascii | 1.69 ms (*) |1.69 ms latin1 |

[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-05 Thread STINNER Victor
STINNER Victor added the comment: Result of bench.py attached to issue #25267: attached bench_utf8_result.txt. --+-+--- Summary   | utf8_before | utf8_after

[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-05 Thread STINNER Victor
New submission from STINNER Victor: Attached patch is the first step to optimize Unicode encoders: it adds a _PyBytesWriter API. This API is responsible to use the most efficient buffer depending on the need: * it's possible to use a small buffer directly allocated on the C stack * otherwise

[issue25319] Keep lock type when reseting internal locks

2015-10-05 Thread Nir Soffer
New submission from Nir Soffer: When Event._reset_internal_locks was called after fork, it use to reinitialize its condition without arguments, using RLock instead of Lock. -- components: Library (Lib) files: 0001-Keep-lock-type-when-reseting-internal-locks.patch keywords: patch

[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-05 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file40685/bytes_writer.patch ___ Python tracker

[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-05 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file40684/bench_ucs1_result.txt ___ Python tracker ___

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-05 Thread Emanuel Barry
Emanuel Barry added the comment: The same is true of the decimal and datetime modules. Names starting with an underscore are an implementation detail, and you shouldn't rely on these in production code. -- nosy: +ebarry ___ Python tracker

[issue25301] Optimize UTF-8 decoder with error handlers

2015-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5b9ffea7e7c3 by Victor Stinner in branch 'default': Issue #25301: Fix compatibility with ISO C90 https://hg.python.org/cpython/rev/5b9ffea7e7c3 -- ___ Python tracker

[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-05 Thread STINNER Victor
STINNER Victor added the comment: A few months ago, I wrote a previous implementation of the _PyBytesWriter API which embedded the "current pointer" inside _PyBytesWriter API. The problem was that GCC produced less efficient code than expect for the hotspot of the encoder. In the new

[issue25319] Keep lock type when reseting internal locks

2015-10-05 Thread Nir Soffer
Changes by Nir Soffer : Added file: http://bugs.python.org/file40688/0001-Keep-lock-type-when-reseting-internal-locks.patch ___ Python tracker

[issue25315] OrderedDict mangled private attribute is inaccessible

2015-10-05 Thread R. David Murray
R. David Murray added the comment: A method that starts with an '_' is not part of the API unless documented to be so (as with namedtuple), and a non-special method that starts with two is purposefully mangled so that you cannot accidentally rely on it. The C implementation is an

[issue25294] Absolute imports fail in some cases where relative imports would work

2015-10-05 Thread Patrick Maupin
Patrick Maupin added the comment: concurrent/futures/__init__.py may be a better example than 2to3 for this issue. It's relatively new code, it's part of the standard library, it's fairly small and self-contained, and it doesn't follow the promulgated standard. If it's bad code, it should be

[issue25319] Keep lock type when reseting internal locks

2015-10-05 Thread Nir Soffer
Changes by Nir Soffer : Added file: http://bugs.python.org/file40687/0001-Keep-lock-type-when-reseting-internal-locks-2.7.patch ___ Python tracker

[issue24505] shutil.which wrong result on Windows

2015-10-05 Thread Bar Harel
Bar Harel added the comment: Unfortunately that patch will not help for files like "python.exe.exe", and double ext which sometimes happens. I'm on it. Should take me a day or two, more problems might arise along the way. Thanks Bob for alerting. Regarding the uppercase, I believe it is

[issue25304] Add run_coroutine_threadsafe() to asyncio

2015-10-05 Thread Guido van Rossum
Guido van Rossum added the comment: loop *is* required for this function. It's just that there's an earlier, general comment describing it as optional for all functions in this section. -- ___ Python tracker

[issue23972] Asyncio reuseport

2015-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5e7e9b131904 by Guido van Rossum in branch '3.4': Issue #23972: updates to asyncio datagram API. By Chris Laws. https://hg.python.org/cpython/rev/5e7e9b131904 New changeset ba956289fe66 by Guido van Rossum in branch '3.5': Issue #23972: updates to

[issue25304] Add run_coroutine_threadsafe() to asyncio

2015-10-05 Thread Vincent Michel
Vincent Michel added the comment: > The docs look good. Should I add a note to explain why the loop argument has to be explicitly passed? (there is a note at the beginning of the `task functions` section stating "In the functions below, the optional loop argument ...") > What do you need to

[issue25316] distutils: broken error reporting about vcvarsall.bat

2015-10-05 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +steve.dower -eric.araujo ___ Python tracker ___ ___

[issue25320] unittest loader.py TypeError when code directory contains a socket

2015-10-05 Thread Victor van den Elzen
New submission from Victor van den Elzen: Hi, when trying to run tests after upgrading from Python 3.4 to Python 3.5 I encountered the following exception: Traceback (most recent call last): ... File "/usr/lib/python3.5/unittest/loader.py", line 341, in discover tests =

[issue22413] Bizarre StringIO(newline="\r\n") translation

2015-10-05 Thread Guido van Rossum
Guido van Rossum added the comment: The patch fails to apply in the 2.7 branch. It works in 3.4. Could you look into the 2.7 issue? -- ___ Python tracker

[issue25304] Add run_coroutine_threadsafe() to asyncio

2015-10-05 Thread Yury Selivanov
Yury Selivanov added the comment: >> Should I add a note to explain why the loop argument has to be explicitly passed? (there is a note at the beginning of the `task functions` section stating "In the functions below, the optional loop argument ...") > Oh, that's a good idea. It's sort of clear

[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-05 Thread Stefan Krah
Stefan Krah added the comment: > Third party modules might need patching to work with MPX... If the flags go into CFLAGS, these modules won't compile with distutils. Perhaps we should also add LDFLAGS_NODIST, if that would solve your problem. --

[issue25304] Add run_coroutine_threadsafe() to asyncio

2015-10-05 Thread Vincent Michel
Vincent Michel added the comment: I attached the first version of the documentation for `run_coroutine_threadsafe`. The `Concurrency and multithreading` section also needs to be updated but I could already use some feedback. Also, I think we should add a `try-except` in the callback function,

[issue23972] Asyncio reuseport

2015-10-05 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for the patch! It's live now. Closing. Watch the buildbots for me please! -- assignee: -> gvanrossum resolution: -> fixed status: open -> closed versions: +Python 3.6 ___ Python tracker

[issue24505] shutil.which wrong result on Windows

2015-10-05 Thread eryksun
eryksun added the comment: Please don't default to searching the current directory: if is_windows: # The current directory takes precedence on Windows. if not os.curdir in path: path.insert(0, os.curdir) Add a keyword option to enable this, with a warning that

[issue25304] Add run_coroutine_threadsafe() to asyncio

2015-10-05 Thread Guido van Rossum
Guido van Rossum added the comment: > Should I add a note to explain why the loop argument has to be explicitly passed? (there is a note at the beginning of the `task functions` section stating "In the functions below, the optional loop argument ...") Oh, that's a good idea. It's sort of clear

[issue22413] Bizarre StringIO(newline="\r\n") translation

2015-10-05 Thread Guido van Rossum
Guido van Rossum added the comment: It looks like we don't merge 2.7 into 3.4 any more, so that will have to be a separate patch anyway. So you can commit the patch to 3.4, merge into 3.5 and 3.6. Good luck! And thanks for your perseverance. --

[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-05 Thread Pathangi Jatinshravan
Pathangi Jatinshravan added the comment: This is the first ever bug I will be working on so there might be a bit of a learning curve, but I'll do my best to come out with something by this week. -- ___ Python tracker

[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-05 Thread Tim Graham
Tim Graham added the comment: Sure, feel free to propose a patch. -- ___ Python tracker ___ ___

[issue25304] Add run_coroutine_threadsafe() to asyncio

2015-10-05 Thread Guido van Rossum
Guido van Rossum added the comment: The docs look good. (I assume you've generated the HTML and checked that the output looks good, links are clickable etc.) What do you need to add to the concurrency and multithreading section? I agree on the try/except; can you add that to the same diff?

[issue25294] Absolute imports fail in some cases where relative imports would work

2015-10-05 Thread Patrick Maupin
Patrick Maupin added the comment: I don't think anything is wrong with that code. But PEP 8 prescribes a way of doing something that often won't work (which is unusual for PEP 8), with no discussion of this fact. > I think the key thing to take away from this whole discussion is "don't have

[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-05 Thread Pathangi Jatinshravan
Pathangi Jatinshravan added the comment: Hi, can I be assigned to this behaviour issue? -- nosy: +Pathangi Jatinshravan ___ Python tracker ___

[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-05 Thread STINNER Victor
STINNER Victor added the comment: My previous abandonned attempt was the issue #17742. "Add _PyBytesWriter API to optimize Unicode encoders" Oh, I forgot to mention and it may also be used to optimize bytes % args. More generally, any code generating a bytes object with an unknown length is

[issue25294] Absolute imports fail in some cases where relative imports would work

2015-10-05 Thread Brett Cannon
Brett Cannon added the comment: I don't quite follow what you think is wrong with https://hg.python.org/cpython/file/tip/Lib/concurrent/futures/__init__.py . It looks totally fine to me. And I should mention that you shouldn't follow PEP 8 like it's in stone and the only way to format code.