[issue24773] Add local time disambiguation flag to datetime

2015-09-17 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy:  -ethan.furman

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 more attractive.

--
assignee: ethan.furman
messages: 250875
nosy: barry, eli.bendersky, ethan.furman
priority: normal
severity: normal
stage: patch review
status: open
title: Enum: remove dependency on OrderedDict
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 windows 
changed to be '3.5-32',
which I can change my installer to cope with.

However the key for the 64bit install is ‘3.5’ but not '3.5-64'.

This seems like a regression to me in the interface to Python on Windows.

Is there a reason not to use the original naming?

Barry

--
components: Installation
messages: 250877
nosy: barry.scott
priority: normal
severity: normal
status: open
title: Windows registry PythonCore key changed inconsistent with other releases
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 discussed on the python-dev 
mailing list.

To keep __members__ ordered, we can delay the creation of the OrderedDict at 
the first access to __members__: start with a dict, and use the ordered 
_all_member_names_ to created the ordered dictionary.

Attached patch implements this idea.

I checked enum.Enum and enum.IntEnum classes and the @enum.unique decorated: 
__members__ is not used to declare the class. Hum, I had to modify a little bit 
@enum.unique to not access __members__.

--
nosy: +haypo
Added file: http://bugs.python.org/file40490/delayed_ordered_dict.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: Service Pack 0), 
  path: C:\Users\mg\Downloads\python-3.5.0.exe

[0F48:03B4][2015-09-14T05:54:05]i301: 
  Applying execute package: crt_14.0_v6.2_x64, 
  action: Install, 
  path: C:\ProgramData\Package Cache\
0F275C704EE13CA9E98834DB6DA50D4693FF2BAF\
Windows8-RT-KB2999226-x64.msu, 
  arguments: '"C:\Windows\SysNative\wusa.exe" 
  "C:\ProgramData\Package Cache\
   0F275C704EE13CA9E98834DB6DA50D4693FF2BAF\
   Windows8-RT-KB2999226-x64.msu" 
  /quiet /norestart'

which seems to succeed: 

[0A68:0EC8][2015-09-14T05:54:24]i319: 
  Applied execute package: crt_14.0_v6.2_x64, 
  result: 0x0, 
  restart: Required

Yet trying to run py.exe to compile the standard library fails with 
STATUS_DLL_NOT_FOUND (0xC135):

[0F48:03B4][2015-09-14T05:55:11]i301: 
  Applying execute package: compileall_AllUsers, 
  action: Install, 
  path: C:\ProgramData\Package Cache\
1D1205B0F2D3B4B31CC368C86271206AEF327163\py.exe, 
  arguments: '"C:\ProgramData\Package Cache\
   1D1205B0F2D3B4B31CC368C86271206AEF327163\py.exe" 
  -3.5-32 -E -s -Wi "C:\Python35\Lib\compileall.py" 
  -f -x "bad_coding|badsyntax|site-packages|py2_|
 lib2to3\\tests|venv\\scripts" 
  "C:\Python35\Lib"'

[0F48:03B4][2015-09-14T05:57:24]e000: 
  Error 0xc135: Process returned error: 0xc135

Your screenshot shows that api-ms-win-crt-runtime-l1-1-0.dll is missing. Does 
this DLL exist in "%SystemRoot%\SysWOW64"?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 = datetime.utcfromtimestamp(int('1410446564'))  # datetime.datetime(2014, 
9, 11, 14, 42, 44)
date.weekday()  # should be 4, not 3

I can reproduce this behaviour on our dev and production systems, and just 
tested it locally with python 3.4.3.

Since I'm not a smart man, I might overlook something silly...

--
components: Library (Lib)
messages: 250881
nosy: odianus
priority: normal
severity: normal
status: open
title: datetime.weekday() off by one if handling a date from utcfromtimestamp()
type: behavior
versions: Python 2.7, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 related to 
the new 3.5.0 version.  The system installed is the current Fedora 22, gcc 
5.1.1-4.

--
components: Extension Modules
files: error.txt
hgrepos: 318
messages: 250884
nosy: axh
priority: normal
severity: normal
status: open
title: yt package pip compile/install error
type: compile error
versions: Python 3.5
Added file: http://bugs.python.org/file40491/error.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 hooking on the memory allocators.

But one day I would like to try to modify PyMem_Malloc() to reuse 
PyObject_Malloc(). I don't see why PyMem_Malloc() shouldn't be optimized for 
small applications. But it's hard to benchmark such change, and it depends on 
the platform. I already had to use different config for memory allocators 
depending on the platform :-/ The implementation of tracemalloc uses a 
different overallocation factor on Windows and on other platforms.

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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,
 from 
build/src.linux-x86_64-3.5/yt/utilities/lib/geometry_utils.c:4:
/usr/lib/gcc/x86_64-redhat-linux/5.1.1/include/stdatomic.h:40:1: sorry, 
unimplemented: ‘_Atomic’ with OpenMP
 typedef _Atomic _Bool atomic_bool;
 ^

I'm not sure that Include/pyatomic.h should be included by the main 
Include/Python.h header. We already skipped Include/pyatomic.h on C++ because 
this header is incompatible with C++.

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: Command '['/bin/python3.4', '-Im', 
'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 
1

Debian knows all about this, but they don't want to make changes.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732703

Instead, if you want venv to work you will need to install the debian packages 
python3-venv (for 3.4) and python3.5-venv for 3.5.

Can somebody close this issue now, as this is clearly a debian issue and not a 
Python bug.  I am just reporting it here so that somebody else who has the 
problem can find out what to do.

--
components: Distutils
messages: 250887
nosy: dstufft, eric.araujo, lac
priority: normal
severity: normal
status: open
title: venv does not work with debian releases, if you want to install pip
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
  -I. -IInclude -I./Include-DPy_BUILD_CORE -o Programs/python.o 
./Programs/python.c
In file included from Include/traceback.h:8:0,
 from Include/Python.h:97,
 from ./Programs/python.c:3:
Include/pystate.h:186:8: error: unknown type name ‘_Py_atomic_address’
 PyAPI_DATA(_Py_atomic_address) _PyThreadState_Current;
^
Makefile:747: recipe for target 'Programs/python.o' failed
make: *** [Programs/python.o] Error 1

pystate.h:

/* Assuming the current thread holds the GIL, this is the
   PyThreadState for the current thread.

   Issue #23644: pyatomic.h is incompatible with C++ (yet). Disable
   PyThreadState_GET() optimization: declare it as an alias to
   PyThreadState_Get(), as done for limited API. */
#if !defined(Py_LIMITED_API) && !defined(__cplusplus)
PyAPI_DATA(_Py_atomic_address) _PyThreadState_Current;
#endif

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 all symbols in pyatomic.h are prefixed by _Py, this header is fully part 
of the Python private API and so it's fine to modify it in a bugfix release 
(3.5.0 => 3.5.1).

--
keywords: +patch
Added file: http://bugs.python.org/file40493/pyatomic.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 executing the pyvenv script:"

which undoubtably works if you _have_ a pyenv script, but I don't have
one.  It is nowhere stated where I should find one.

Fortunately, I can also run things as

some_python_version -m venv myvenv 

This, everybody is able to do.  (However, it may not work, see
issue 25151 --  but forget that for now.)

This is something that everybody ought to be able to do.
Thus I propose either deleting the mention of pyenv, (if it is exactly
equivalent to running python -m venv)  or expanding
the section, indicating where the script lives, and why you might
want to run it instead of python -m venv.

Then, before the line:
The command, if run with -h, will show the available options:

add the line:

The version of python used in the venv is determined at this time.
If the default version of python is not the one desired, use:

/path/to/the/python/I/want -m venv  myenv instead.

(Plus, if there is a way to do this with pyenv, then list that
part here).

--
assignee: docs@python
components: Distutils, Documentation
messages: 250891
nosy: docs@python, dstufft, eric.araujo, lac
priority: normal
severity: normal
status: open
title: venv documentation doesn't tell you how to specify a particular version 
of python
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 can't document what every distribution does.

That said, I think it would be a good idea to move the description of calling 
it via 'python -m venv' to be the *first* mention, and *then* describing pyvenv 
(and noting that it is installed by our installers but a vendor install may do 
something different, including omit it).

--
nosy: +r.david.murray
versions:  -Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 labels in the 
NMakeCommandLine script, which can fail confusingly when that script has LF 
line endings (the error is "The system cannot find the batch label specified - 
build")

Thanks to Andres Guzman-ballen for bringing this to my attention again. I have 
also seen this on my Windows 8.1 Non-Debug buildbot, where I worked around it 
by turning on the hg 'eol' extension so that everything would be converted to 
CRLF on checkout.

--
assignee: zach.ware
components: Build, Windows
messages: 250893
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: PCbuild/*.vcxproj* should use CRLF line endings
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 we test with.

--
assignee:  -> ned.deily
stage:  -> patch review
versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 python versions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

As Josh Billings (American humourist) wrote:
"It ain't ignorance causes so much trouble; it's folks knowing so much that 
ain't so."

A 'this is not virtualenv' message would be useful.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 as David suggests and bump up the `python -m` 
suggestion up as the first one.

--
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 import deque as _deque
except ImportError:
from collections import deque as _deque

What is the cost of importing OrderedDict at all? Ethan, can you provide any 
measurement results?

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 compatibility break.  (Gentoo at least would probably 
recreate it so that 'pyvenv' continued to work no matter which version of 
python you had selected as your system default).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 only a cost you pay once, so maybe it's not a big deal.

On the other hand, I could make __members__ a caching property that doesn't 
import OrderedDict until it is used, and not use it internally -- and I can't 
think of any reason why the stdlib would need to access __members__ itself.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 would be no loss in functionality since the 
exact same functionality is available through `python3 -m venv`. This is a 
backwards-compatibility change, hence the deprecation, but changing various 
shell scripts and such should be trivial thanks to the -m flag. This would also 
help promote the use of -m, especially for any projects that rely on being tied 
to a specific installed interpreter.

As pointed out in issue #25152, virtualenv provides a -p flag to specify what 
version of Python should be used to create a virtual environment: 
https://virtualenv.pypa.io/en/latest/reference.html#virtualenv-command. The 
pyvenv script and venv package provide no such mechanism since it is included 
in the stdlib, which makes sense since improvements will be tied to the stdlib 
of the Python interpreter being used while virtualenv is a standalone 
project/app.

Some may argue that worrying about this is unnecessary, but we are already 
ending up with OSs that come with multiple versions of Python pre-installed, 
let alone when people install their own versions of Python on top of the system 
installation. For instance, OS X Yosemite comes with Python 2.6 and 2.7, and 
then if you install the latest version of Python independently you end up with 
3 installations. If they all happened to have a pyvenv script you wouldn't 
easily know which Python interpreter the pyvenv command was going to use for 
the virtual environment.

Since the pyvenv script is just a script, the deprecation will be in the form 
of a message printed to sys.stderr in the Tools/scripts/pyvenv file mentioning 
that the deprecation and that people should switch to `python3 -m venv` 
instead. The long deprecation cycle is for those who have pyvenv provided by 
their OS and only upgrade Python every few years, and thus run the risk of 
missing the deprecation warning. As for the deprecation in Python 3.5.1, that's 
to get the warning out immediately and to minimize people missing the 
deprecation prior to the removal.

--
components: Installation
messages: 250910
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: Drop the pyvenv script
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 newblock(), I want to 
understand whether there is an actual issue here and if so whether 
PyMem_RawMalloc() would solve the problem directly.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 anyone please give me a note, whether it would be reasonable for me to 
wait for a patch in Python3.5.x, or such behavior is common since 3.5 and 
should not use it in my 'strange' case at all ? 

A bit of details:

Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.now()
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: timestamp too large to convert to C _PyTime_t
>>>

Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.now()
datetime.datetime(2045, 4, 2, 2, 42, 8, 359375)
>>>

--
components: Interpreter Core, Windows
messages: 250914
nosy: paul.moore, steve.dower, tim.golden, vmurashev, zach.ware
priority: normal
severity: normal
status: open
title: datetime.datetime.now() raises
type: behavior
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25155] datetime.datetime.now() raises

2015-09-17 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 cause a crash in common use, and the former only 
with special memory allocation hooks (Victor, perhaps we should disable GC for 
executing hooks).

But my version of the patch solves not only this issue. It eliminates the use 
of possibly re-entrant alternate method.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25155] datetime.datetime.now() raises

2015-09-17 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +belopolsky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 believe such risk does not exist for shutil.copyfile, and it would be 
possible to use sendfile if available.

--
components: Library (Lib)
messages: 250918
nosy: desbma
priority: normal
severity: normal
status: open
title: shutil.copyfile should internally use os.sendfile when possible
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
-Ibuild/temp.linux-x86_64-3.5/libffi/include 
-Ibuild/temp.linux-x86_64-3.5/libffi 
-I/home/alex/Python-3.5.0/Modules/_ctypes/libffi/src -I./Include 
-I/home/alex/Python/include -I. -IInclude -I/usr/local/include 
-I/home/alex/Python-3.5.0/Include -I/home/alex/Python-3.5.0 -c 
/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c -o 
build/temp.linux-x86_64-3.5/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.o 
-Wall -fexceptions
/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c: In function 
‘PyCSimpleType_from_param’:
/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c:2062:15: error: 
‘_PyThreadState_Current’ undeclared (first use in this function)
 if (Py_EnterRecursiveCall("while processing _as_parameter_")) {
   ^
/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c:2062:15: note: each 
undeclared identifier is reported only once for each function it appears in
/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c:2062:28: error: 
‘__atomic_load_ptr’ undeclared (first use in this function)
 if (Py_EnterRecursiveCall("while processing _as_parameter_")) {
^
/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c:2062:66: error: argument 1 of 
‘__atomic_load’ must be a non-void pointer type
 if (Py_EnterRecursiveCall("while processing _as_parameter_")) {
  ^
/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c:2062:19: warning: cast to 
pointer from integer of different size [-Wint-to-pointer-cast]
 if (Py_EnterRecursiveCall("while processing _as_parameter_")) {
   ^
/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c:2067:62: error: argument 1 of 
‘__atomic_load’ must be a non-void pointer type
/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c:2067:21: warning: cast to 
pointer from integer of different size [-Wint-to-pointer-cast]
 Py_LeaveRecursiveCall();
 ^
/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c:2067:62: error: argument 1 of 
‘__atomic_load’ must be a non-void pointer type
/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c:2067:139: warning: cast to 
pointer from integer of different size [-Wint-to-pointer-cast]

Failed to build these modules:
_ctypes   _decimal  _json  
_pickle

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:

  Error: Command '['/bin/python3.4', '-Im', 'ensurepip', 
'--upgrade', '--default-pip']' returned non-zero exit status 1

such as 'Your python may not be configured with ensure-pip'

--
nosy: +lac

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 window will get the installation running (see mailing 
list thread quoted), only to experience error messages like `python.exe is not 
a valid win32 application' (translated from what I get in German, exact wording 
in English might be different) when trying to run the interpreter. That message 
is not helpful at all, either! Actually, searching the web for that message 
yields various suggestions how to fix the problem (useless here), taking me two 
days before I finally found the thread on the mailing list. :-( :-(

--
nosy: +UlFie

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25154] Drop the pyvenv script

2015-09-17 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +doko

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 ensurepip module.

--
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 for secs, where struct timeval is defined (on 
Windows) with a long which is still 32 bits on Windows, so we reintroduced the 
Y2K38 problem.

The bug was introduced while trying to support #22117: "Rewrite pytime.h to 
work on nanoseconds" in reve93eeadef0c3: 
https://hg.python.org/cpython/rev/e93eeadef0c3

--
nosy: +josh.r

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 '}'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, I found that one, too. Sorry to waste your time on this, but I literally 
just finished the test changes 15 minutes ago.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
/usr/local/ssl/lib/libssl.so.1.0.0: symbol EVP_aes_128_cbc_hmac_sha256: 
referenced symbol not found
Killed


Python 3.5.0 fails to make install:

ld.so.1: python: fatal: relocation error: file 
/usr/local/ssl/lib/libssl.so.1.0.0: symbol EVP_aes_128_cbc_hmac_sha256: 
referenced symbol not found
*** Error code 137
make: Fatal error: Command failed for target `install'


Has anyone seen this behavior?
Up to now, we have been successfully using Python 3.2.2 with OpenSSL 1.0.1j, 
but cannot use that version anymore due to a critical SSL security bug.


I would greatly appreciate any information on the above errors.

Regards,
Dónal

--
components: Extension Modules
messages: 250928
nosy: eeiddne
priority: normal
severity: normal
status: open
title: Python 3.2.2 and 3.5.0 Do not seem compatible with OpenSSL 1.0.2d on 
Solaris 10
type: compile error
versions: Python 3.2, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 think.

>>> tree = ElementTree(Element('hello', {'beer': 'good'}))
>>> tree.write(stdout.buffer, encoding="UTF-8", xml_declaration=True); print()


>>> tree.write(stdout.buffer, encoding="UTF-8"); print()

>>> tree.write(stdout.buffer, xml_declaration=True); print()



--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file40496/etree-encoding.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 run_docstring_examples()
https://hg.python.org/cpython/rev/ce595a047bd9

New changeset 767cc99020d2 by Ethan Furman in branch '3.5':
Issue24756: clarify usage of run_docstring_examples()
https://hg.python.org/cpython/rev/767cc99020d2

New changeset c8689d3df68a by Ethan Furman in branch 'default':
Close issue24756: clarify usage of run_docstring_examples()
https://hg.python.org/cpython/rev/c8689d3df68a

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 -- Traceback (most recent call last):
  File "/home/ethan/source/python/issue25147/Lib/test/test_property.py", line 
175, in test_property_decorator_doc_writable
self.assertEqual(sub.__class__.spam.__doc__, 'Eggs')
AssertionError: 'Spam' != 'Eggs'
- Spam
+ Eggs


1 test failed:
test_property

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 down mostly by the JVM 
startup time anyway. And if you use PyPy then it's exactly because you do *not* 
care about the startup time but about performance improvements for long running 
code.

--
nosy: +scoder

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:

So, apparently, more than just one spot needs to be fixed.  I also tried just 
modifying the Python.h after install, but that does not do the trick either.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25159] Import time regression

2015-09-17 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

There are regressions in import time in 3.5 and 3.6.

$ for i in `seq 5`; do ./python -I -m timeit -n1 -r1 "import enum"; done

Python 3.4:
1 loops, best of 1: 3.45 msec per loop
1 loops, best of 1: 3.43 msec per loop
1 loops, best of 1: 3.55 msec per loop
1 loops, best of 1: 3.54 msec per loop
1 loops, best of 1: 3.42 msec per loop

Python 3.5:
1 loops, best of 1: 4.38 msec per loop
1 loops, best of 1: 4.31 msec per loop
1 loops, best of 1: 4.32 msec per loop
1 loops, best of 1: 4.32 msec per loop
1 loops, best of 1: 4.4 msec per loop

Python 3.6:
1 loops, best of 1: 20.2 msec per loop
1 loops, best of 1: 20.2 msec per loop
1 loops, best of 1: 22 msec per loop
1 loops, best of 1: 20.3 msec per loop
1 loops, best of 1: 20.4 msec per loop


$ for i in `seq 5`; do ./python -I -m timeit -n1 -r1 -s "import sys; 
sys.modules.clear()" -- "import enum"; done

Python 3.4:
1 loops, best of 1: 29.5 msec per loop
1 loops, best of 1: 29.3 msec per loop
1 loops, best of 1: 30 msec per loop
1 loops, best of 1: 28.9 msec per loop
1 loops, best of 1: 29.2 msec per loop

Python 3.5:
1 loops, best of 1: 43.8 msec per loop
1 loops, best of 1: 44 msec per loop
1 loops, best of 1: 43.5 msec per loop
1 loops, best of 1: 43.1 msec per loop
1 loops, best of 1: 43.8 msec per loop

Python 3.6:
1 loops, best of 1: 59.8 msec per loop
1 loops, best of 1: 59.1 msec per loop
1 loops, best of 1: 58.8 msec per loop
1 loops, best of 1: 58.6 msec per loop
1 loops, best of 1: 61.9 msec per loop


And even in importing already imported and cached module there is small 
regression.
$ for i in `seq 5`; do ./python -I -m timeit "import enum"; done

Python 3.4:
10 loops, best of 3: 3.04 usec per loop
10 loops, best of 3: 3.07 usec per loop
10 loops, best of 3: 3.08 usec per loop
10 loops, best of 3: 3.11 usec per loop
10 loops, best of 3: 3.04 usec per loop

Python 3.5:
10 loops, best of 3: 3.27 usec per loop
10 loops, best of 3: 3.22 usec per loop
10 loops, best of 3: 3.18 usec per loop
10 loops, best of 3: 3.28 usec per loop
10 loops, best of 3: 3.17 usec per loop

Python 3.6:
10 loops, best of 3: 3.29 usec per loop
10 loops, best of 3: 3.26 usec per loop
10 loops, best of 3: 3.34 usec per loop
10 loops, best of 3: 3.35 usec per loop
10 loops, best of 3: 3.35 usec per loop

--
messages: 250941
nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Import time regression
type: performance
versions: Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

But the comment is false. That change doesn't reduce startup cost.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25147] Enum: remove dependency on OrderedDict

2015-09-17 Thread Stefan Behnel

Stefan Behnel added the comment:

Let's say the change minimises the dependencies. That is a reasonable goal, too.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25108] traceback.extract_stack() compatibility break in 3.5

2015-09-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:

/home/alex/Python-3.5.0/Modules/_ctypes/_ctypes.c:2062:15: error: 
‘_PyThreadState_Current’ undeclared (first use in this function)
 if (Py_EnterRecursiveCall("while processing _as_parameter_")) {
   ^

Ah yes, if you check the fix for C++ (changeset cb05b6d7aacd), I also had to 
modify pystate.h.

Please try pyatomic-2.patch which hides more CPython internals in public 
headers.

--
Added file: http://bugs.python.org/file40497/pyatomic-2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com