[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2015-09-17 Thread Yu Tomita
Yu Tomita added the comment: Submitting a patch. To support both iterable and mapping in the same way as with dict(...), `values` is updated to be a list of length-2 iterables instead of using copy call. Patch includes unittest which tests the reported problem. -- keywords: +patch

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-09-17 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: -ethan.furman ___ Python tracker ___ ___

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Ethan Furman
Changes by Ethan Furman : -- keywords: +patch Added file: http://bugs.python.org/file40489/issue25147.stoneleaf.01.patch ___ Python tracker

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Ethan Furman
New submission from Ethan Furman: Pulling in collections.OrderedDict has a significant startup cost (from what I've heard, and can easily believe by glancing at all the imports in collections.__init__). By keeping a separate list for the Enum member names using Enum in the stdlib becomes

[issue24773] Add local time disambiguation flag to datetime

2015-09-17 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: -ethan.furman ___ Python tracker ___ ___

[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I left comments on Rietveld. Perhaps you missed Rietveld messages in the Spam folder. -- nosy: +serhiy.storchaka ___ Python tracker

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This change has visible side effect: __members__ is no longer ordered. This should be reflected in the documentation and in What's New. -- nosy: +serhiy.storchaka ___ Python tracker

[issue25148] Windows registry PythonCore key changed inconsistent with other releases

2015-09-17 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +steve.dower type: -> behavior ___ Python tracker ___

[issue25149] datetime.weekday() off by one if handling a date from utcfromtimestamp()

2015-09-17 Thread AndreC
New submission from AndreC: I've stumbled over an odd datetime.weekday() behaviour in Python 2.7.8 (default, Jun 18 2015, 18:54:19) [GCC 4.9.1] on linux2) under Ubuntu. weekday() is off by 1. Code to reproduce: from datetime import datetime date =

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread STINNER Victor
STINNER Victor added the comment: > This change has visible side effect: __members__ is no longer ordered. This property of part of the PEP 435 (enum): "The special attribute __members__ is an ordered dictionary mapping names to members." IMHO if we really want to change this, it must be

[issue25117] Windows installer: precompiling stdlib fails with missing DLL errors

2015-09-17 Thread eryksun
eryksun added the comment: Per "Python 3.5.0 (32-bit)_20150914055131.log", the installer detects the OS as NT 6.2.9200 (Windows 8/Server 2012), and installs Windows8-RT-KB2999226-x64.msu. [0A68:0EC8][2015-09-14T05:51:31]i001: Burn v3.10.0.1823, Windows v6.2 (Build 9200:

[issue24982] shutil.make_archive doesn't archive empty directories

2015-09-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue25148] Windows registry PythonCore key changed inconsistent with other releases

2015-09-17 Thread Barry Scott
New submission from Barry Scott: I am used to looking in HKLM:\SOFTWARE\Python\PythonCore\%(py_maj)d.%(py_min)d\InstallPath to find out where python is installed so that my installation kit can add itself to site-packages. I just found that the registry key used for 32 bit python 3.5 on

[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: How does newblock() mutate the deque? Does PyMem_Malloc() do anything other than call malloc()? We hold the GIL so there doesn't seem to be a need to use PyMem_RawMalloc(). -- ___ Python tracker

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2015-09-17 Thread Laura Creighton
Laura Creighton added the comment: On thinking things over, I think that venv is, as it stands now, only able to work with python3.3 and greater. If you want to build a virtualenv for python 2.7, then I think venv is not for you. I think this needs to be mentioned. --

[issue25150] yt package pip compile/install error

2015-09-17 Thread Alexander Heger
New submission from Alexander Heger: trying to install the yt package, most recent version 3.2.1 on python 3.5.0 using pip pip3 install -U yt error output attached. The same package installs fine with python 3.4.3, same compiler and also build from scratch, so the suspicion is that it is

[issue25149] datetime.weekday() off by one if handling a date from utcfromtimestamp()

2015-09-17 Thread AndreC
AndreC added the comment: as I said, I'm not a smart man, the sort order was wrong and the year was simply wrong... sorry :-/ -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue25151] venv does not work with debian releases, if you want to install pip

2015-09-17 Thread Laura Creighton
New submission from Laura Creighton: I am reporting this here so that the next person who runs into this and looks into the bug tracker will find out what to do. You cannot create a venv with Python3.3, 3.4, 3.5. on debian (and likely on many debian-derived distros). Instead you get Error:

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2015-09-17 Thread Laura Creighton
New submission from Laura Creighton: https://docs.python.org/3/library/venv.html nowhere explicitly states how you are supposed to get a venv with a particular python version. Users of virtualenv will be looking for a -p option. The doc says: "Creation of virtual environments is done by

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2015-09-17 Thread R. David Murray
R. David Murray added the comment: Our documentation describes what you get if you install Python using our distribution of python. If you do that, you (by default) get a pyvenv script, and it points to the version of python that you just (last) installed. Distributions change this. We

[issue25136] Python doesn't find Xcode 7 stub libraries

2015-09-17 Thread Ned Deily
Ned Deily added the comment: Thanks for the analysis and the patches, Tim. Now that Xcode 7 is released, we'll need to ensure we fully support the new stubs. But, as you note, the workaround as always is to make sure that the current Command Line Tools are installed, the configuration that

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Ethan Furman
Ethan Furman added the comment: Is pulling in `_collections` not as resource intensive as pulling in `collections`? -- ___ Python tracker ___

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2015-09-17 Thread R. David Murray
R. David Murray added the comment: Not in the python3 docs, it doesn't. The python3 docs are documenting python3. But, this is another reason the -m venv description should be first, to make it clear it is *part* of the python version, not a standalone package that might work with multiple

[issue25153] PCbuild/*.vcxproj* should use CRLF line endings

2015-09-17 Thread Zachary Ware
New submission from Zachary Ware: PCbuild/*.vcxproj* should be added to .hgeol to force them to CRLF. A couple of reasons: 1) They're only used on Windows, where the default (terrible, but always available) editor doesn't understand LF 2) More importantly, the tcl, tk, and tix projects use

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Eric Snow
Eric Snow added the comment: OrderedDict has a C implementation now. So try the following: try: from _collections import OrderedDict except ImportError: from collections import OrderedDict -- nosy: +eric.snow ___ Python tracker

[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that doesn't need newblock(). -- Added file: http://bugs.python.org/file40494/deque_nonreentrant_clear3.diff ___ Python tracker

[issue25150] yt package pip compile/install error

2015-09-17 Thread STINNER Victor
STINNER Victor added the comment: It looks like the problem is that yt uses OpenMP whereas OpenMP doesn't support atomic operations: In file included from /home/alex/Python/include/python3.5m/pyatomic.h:12:0, from /home/alex/Python/include/python3.5m/Python.h:53,

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-09-17 Thread STINNER Victor
STINNER Victor added the comment: "When I just comment out the << #include "pyatomic.h" >> line, python 3.5.0 will no longer compile" Sure. My idea is to "disable" the header with we are not building Python itself. There is a nice define for that: Py_BUILD_CORE. See attached patch. Since

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-09-17 Thread Alexander Heger
Alexander Heger added the comment: When I just comment out the #include "pyatomic.h" line, python 3.5.0 will no longer compile gcc -pthread -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes-Werror=declaration-after-statement

[issue25151] venv does not work with debian releases, if you want to install pip

2015-09-17 Thread Zachary Ware
Changes by Zachary Ware : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___

[issue25144] 3.5 Win install fails with "TARGETDIR"

2015-09-17 Thread Felipe
Changes by Felipe : Added file: http://bugs.python.org/file40492/Python 3.5.0 (32-bit)_20150916132422.log ___ Python tracker ___

[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-17 Thread STINNER Victor
STINNER Victor added the comment: "Does PyMem_Malloc() do anything other than call malloc()? We hold the GIL so there doesn't seem to be a need to use PyMem_RawMalloc()." Well, the difference between PyMem_Malloc() and PyMem_RawMalloc() is subtle. Right now, it should only impact debug tools

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-09-17 Thread STINNER Victor
Changes by STINNER Victor : -- title: yt package pip compile/install error -> 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5) versions: +Python 3.6 ___

[issue25154] Drop the pyvenv script

2015-09-17 Thread Brett Cannon
New submission from Brett Cannon: I propose that the pyvenv script be deprecated in Python 3.5 and removed in Python 3.8. The reason for this proposal is because it is non-obvious what version of Python a pyvenv command is tied to (heck, it isn't necessarily obvious that it's Python 3). There

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-09-17 Thread Brett Cannon
Brett Cannon added the comment: If everything in the header is a _Py definition then I agree we should hide it in Python.h from the public. -- nosy: +brett.cannon ___ Python tracker

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _collections exists because it contains C implementations of some collections classes or helpers. _collections itself is imported only in collections and threading. And in threading the same idiom as proposed by Eric is used: try: from _collections

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2015-09-17 Thread Brett Cannon
Brett Cannon added the comment: Actually, I like the idea of dropping pyvenv enough that I'm going to create an issue for it and bring it up on python-dev. -- ___ Python tracker

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I tried to measure import time with different patches and didn't notice any difference. -- ___ Python tracker ___

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Ethan Furman
Ethan Furman added the comment: In that case I'll go with _collections; if performance does become an issue with other pythons later we can add the caching property. Thanks for all the insights. -- ___ Python tracker

[issue25154] Drop the pyvenv script

2015-09-17 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm sympathetic, given that in Debian/Ubuntu (and maybe other distros) where we have both Python 3.4 and 3.5, we have to install /usr/bin/pyvenv-3.4 and pyvenv-3.5, and then use symlinks to provide the default version. --

[issue25117] Windows installer: precompiling stdlib fails with missing DLL errors

2015-09-17 Thread Marius Gedminas
Marius Gedminas added the comment: Yes, it exists: http://imgur.com/YCmApN7 -- ___ Python tracker ___ ___

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2015-09-17 Thread Brett Cannon
Brett Cannon added the comment: It would break backwards-compatibility, but the fix is to simply switch to `python3 -m venv` which still gives you the same semantics of using the newest Python 3 installation you have so the work to change is minimal. --

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread R. David Murray
R. David Murray added the comment: _collections exists because it contains only the stuff that is needed at python startup. So it is loaded regardless, and thus is very cheap to import elsewhere :) -- nosy: +r.david.murray ___ Python tracker

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Ethan Furman
Ethan Furman added the comment: _collections sounds cool, but the flip side is any python without the C implemntation would still have the slower startup, right? No, I don't have measurements -- just that I have heard importing collections can have an effect on startup time. Of course, it's

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2015-09-17 Thread R. David Murray
R. David Murray added the comment: I was surprised myself that pyvenv wasn't at least named pyvenv3. I think I've only ever used it once, mostly I use the -m because then I *know* what version of python I'm getting. I'd be in favor of dropping the script except that that would be a backward

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2015-09-17 Thread Laura Creighton
Laura Creighton added the comment: The problem is that people who run into venv will think that it is virtualenv made into part of the standard library. Thus they will have a great expectation that there will be a -p option to specify the python version that they want and that they can get 2.7.

[issue25154] Drop the pyvenv script

2015-09-17 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue25155] datetime.datetime.now() raises

2015-09-17 Thread Vitaly Murashev
New submission from Vitaly Murashev: Current time on my machine with Windows7x64 is set to year 2045 for test purposes. Since Python3.5(amd64) I have an OverflowError when I am trying to call datetime.datetime.now() It looks like a regress since there was no such error on Python3.4.3 Could

[issue25155] datetime.datetime.now() raises

2015-09-17 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +belopolsky ___ Python tracker ___ ___

[issue25155] datetime.datetime.now() raises

2015-09-17 Thread Zachary Ware
Changes by Zachary Ware : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party yt module fails on Python 3.5)

2015-09-17 Thread Alexander Heger
Alexander Heger added the comment: if I just include this patch, some modules don't build: (...) gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement

[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I perhaps were overcautious. There is a difference between the case of deque and the case of lru_cache and OrderedDict. The latter creates Python object (PyDict_New) that can trigger garbage collecting, and the former calls only PyMem_Malloc. The latter can

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-09-17 Thread desbma
New submission from desbma: This is related to issue25063 (https://bugs.python.org/issue25063). Trying to use sendfile internally in shutil.copyfileobj was considered risky because of special Python files that expose a file descriptor but wrap it to add special behavior (eg: GzipFile). I

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If there is no any evidences, we shouldn't change a code. -- ___ Python tracker ___

[issue25061] Add native enum support for argparse

2015-09-17 Thread desbma
desbma added the comment: Thanks for sharing this code, I like the factory idea. I'll have a look at creating a custom Action class too. -- ___ Python tracker

[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy contends that calling newblock() can mutate the deque (its only external call is PyMem_Malloc()). I'm trying understand how that could be possible if it is just a thin wrapper around malloc. Before gumming-up the code in an effort to avoid calling

[issue25154] Drop the pyvenv script

2015-09-17 Thread Laura Creighton
Laura Creighton added the comment: Due to debian policy decision https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732703 neither pyenv nor python -m venv may work for you. While things are getting changed, it would be good if people running into this problem got a better error message than:

[issue25154] Drop the pyvenv script

2015-09-17 Thread Brett Cannon
Brett Cannon added the comment: the ensurepip case is another issue, so if you want you can file a separate issue for it so it doesn't get lost. -- ___ Python tracker

[issue25143] 3.5 install fails poorly on Windows XP

2015-09-17 Thread Ulrich Fieseler
Ulrich Fieseler added the comment: Even better: Clearly (and ASAP!) document on download page that 3.4.3 is the last version usable in XP! This avoids useless downloads and a lot of confusion as clicking somewhere in the erroneously white area above the `Cancel' button in the 3.5.0 installer

[issue25154] Drop the pyvenv script

2015-09-17 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +doko ___ Python tracker ___ ___ Python-bugs-list

[issue25152] venv documentation doesn't tell you how to specify a particular version of python

2015-09-17 Thread Brett Cannon
Brett Cannon added the comment: Maybe we should consider dropping the generic pyvenv script or at least only install it with a full version suffix like pyvenv3.6 to prevent this kind of confusion (I have this issue all the time with pip and it drives me nuts). At the very minimum we should do

[issue25158] Python 3.2.2 and 3.5.0 Do not seem compatible with OpenSSL 1.0.2d on Solaris 10

2015-09-17 Thread Donal Duane
New submission from Donal Duane: Hi, I have been trying to compile both Python 3.2.2, and 3.5.0 with OpenSSL 1.0.2d. Python 3.2.2 succeeds to compile and install, but fails to load the OpenSSL module: >>> import ssl ld.so.1: python3.2: fatal: relocation error: file

[issue24965] Implement PEP 498: Literal String Formatting

2015-09-17 Thread Eric V. Smith
Eric V. Smith added the comment: Hopefully the last version. -- Added file: http://bugs.python.org/file40495/pep-498-8.diff ___ Python tracker ___

[issue25047] xml.etree.ElementTree encoding declaration should be capital ('UTF-8') rather than lowercase ('utf-8')

2015-09-17 Thread Martin Panter
Martin Panter added the comment: Here is a patch which changes the code to respect the letter case specified by the user, although it still compares the special strings "unicode", "us-ascii", and "utf-8" case-insensitively, and the default encoding is still lowercase. Let me know what you

[issue24965] Implement PEP 498: Literal String Formatting

2015-09-17 Thread Eric V. Smith
Eric V. Smith added the comment: > Martin Panter added the comment: > > Another strange error message (though maybe the new test changes you > mentioned caught this): > f'{3:{10}' # Actually missing a closing bracket '}' > File "", line 1 > SyntaxError: f-string: unexpected '}' Yes,

[issue25151] venv does not work with debian releases, if you want to install pip

2015-09-17 Thread Laura Creighton
Laura Creighton added the comment: And now, I want to open this again. I'd like to change python -m venv (and pyenv) to say something more useful than Command '['/bin/python3.4', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1 if it cannot find the

[issue25155] datetime.datetime.now() raises

2015-09-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: It looks like between 3.4.3 and 3.5, datetime_best_possible changed from using _PyTime_gettimeofday with a _PyTime_timeval to using _PyTime_AsTimeval with struct timeval. The difference is that _PyTime_timeval appears to have been defined with a proper time_t

[issue24965] Implement PEP 498: Literal String Formatting

2015-09-17 Thread Martin Panter
Martin Panter added the comment: Another strange error message (though maybe the new test changes you mentioned caught this): >>> f'{3:{10}' # Actually missing a closing bracket '}' File "", line 1 SyntaxError: f-string: unexpected '}' -- ___

[issue24965] Implement PEP 498: Literal String Formatting

2015-09-17 Thread Martin Panter
Martin Panter added the comment: I left a few more comments on Reitveld. Checking the error messages does make me feel a lot more comfortable though. -- ___ Python tracker

[issue24840] implement bool conversion for enums to prevent odd edge case

2015-09-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 87a9dff5106c by Ethan Furman in branch 'default': Close issue24840: Enum._value_ is queried for bool(); original patch by Mike Lundy https://hg.python.org/cpython/rev/87a9dff5106c -- nosy: +python-dev resolution: -> fixed stage: patch

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Ethan Furman
Ethan Furman added the comment: Serhiy, your objection is noted, thank you. -- ___ Python tracker ___ ___

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset b77916d2d7cc by Ethan Furman in branch 'default': Close issue25147: use C implementation of OrderedDict https://hg.python.org/cpython/rev/b77916d2d7cc -- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Zachary Ware
Zachary Ware added the comment: That change could use a comment stating why it's doing things that way instead of the 'obvious' way. -- nosy: +zach.ware ___ Python tracker

[issue24756] doctest run_docstring_examples does have an obvious utility

2015-09-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 64d48786d6b0 by Ethan Furman in branch '2.7': Issue24756: clarify usage of run_docstring_examples() https://hg.python.org/cpython/rev/64d48786d6b0 New changeset ce595a047bd9 by Ethan Furman in branch '3.4': Issue24756: clarify usage of

[issue24766] Subclass of property doesn't preserve instance __doc__ when using doc= argument

2015-09-17 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: -larry ___ Python tracker ___ ___ Python-bugs-list

[issue24766] Subclass of property doesn't preserve instance __doc__ when using doc= argument

2015-09-17 Thread Ethan Furman
Ethan Furman added the comment: ethan@code:~/source/python/issue25147$ ./python -m test.regrtest -R3:3 test_property [1/1] test_property Eggs # from print() inside test beginning 6 repetitions 123456 Spam # the new value from the previous run seems stuck test test_property failed --

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset c0363f849624 by Ethan Furman in branch 'default': Issue 25147: add reason for using _collections https://hg.python.org/cpython/rev/c0363f849624 -- ___ Python tracker

[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Stefan Behnel
Stefan Behnel added the comment: > _collections sounds cool, but the flip side is any python without the C > implemntation would still have the slower startup, right? I wouldn't bother too much with that, certainly not given the order we are talking about here. Jython's startup time is slowed