[issue25105] Docs 3.x buildbot: ":root" found in ...

2015-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Docs 3.x buildbot: -> Docs 3.x buildbot: ":root" found in ...

___
Python tracker 

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



[issue25105] Docs 3.x buildbot: ":root" found in ...

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

It looks like a bug in the "suspicious" tool which should skip preformatted 
blocks (blocks starting with "::").


+don't provide any options to redirect it::

+

+>>> import contextlib, io, logging

+>>> f = io.StringIO()

+>>> with contextlib.redirect_stderr(f):

+... logging.warning('warning')

+...

+>>> f.getvalue()

+'WARNING:root:warning\n'

+

+(Contributed by Berker Peksag in :issue:`22389`.)

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Alecsandru Patrascu

New submission from Alecsandru Patrascu:

Hi All,

This is Alecsandru from Server Scripting Languages Optimization team at Intel 
Corporation.

I would like to submit a patch that improves the performance of the hash 
computation code on stringobject, bufferobject and unicodeobject. As can be 
seen from the attached sample performance results from the Grand Unified Python 
Benchmark, speedups up to 40% were observed. Furthermore, we see a 5-7% 
performance on OpenStack/Swift, where most of the code is in Python 2.7.

Attached is the patch that modifies Object/stringobject.c, 
Object/bufferobject.c and Object/unicodeobject.c files. We built and tested 
this patch for Python 2.7 on our Linux machines (CentOS 7/Ubuntu Server 14.04, 
Intel Xeon Haswell/Broadwell with 18/8 cores).

Steps to apply the patch:
1.  hg clone https://hg.python.org/cpython cpython 
2.  cd cpython 
3.  hg update 2.7
4.  Copy hash8.patch to the current directory 
5.  hg import --no-commit hash8.patch
6.  ./configure 
7.  make



In the following, please find our sample performance results measured on a XEON 
Haswell machine.  

Hardware (HW):  Intel XEON (Haswell) 18 Cores

BIOS settings:  Intel Turbo Boost Technology: false
Hyper-Threading: false

Operating System:   Ubuntu 14.04.3 LTS trusty

OS configuration:   CPU freq set at fixed: 2.0GHz by
echo 200 > 
/sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq
echo 200 > 
/sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
Address Space Layout Randomization (ASLR) disabled (to 
reduce run to run variation) by
echo 0 > /proc/sys/kernel/randomize_va_space

GCC version:gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)

Benchmark:  Grand Unified Python Benchmark (GUPB)
GUPB Source: https://hg.python.org/benchmarks/  
  

Python2.7 results:
Python source: hg clone https://hg.python.org/cpython cpython
Python Source: hg update 2.7

Benchmarks  Speedup(%)
unpack_sequence 40.32733766
chaos   24.84002537
chameleon   23.01392651
silent_logging  22.27202911
django  20.83842317
etree_process   20.46968294
nqueens 20.34234985
pathlib 19.63445919
pidigits19.34722148
etree_generate  19.25836634
pybench 19.06895825
django_v2   18.06073108
etree_iterparse 17.3797149
fannkuch17.08120879
pickle_list 16.60363602
raytrace16.0316265
slowpickle  15.86611184
pickle_dict 15.30447114
call_simple 14.42909032
richards14.2949594
simple_logging  13.6522626
etree_parse 13.38113097
json_dump_v212.2655
float   11.88164311
mako11.20606516
spectral_norm   11.04356684
hg_startup  10.57686164
mako_v2 10.37912648
slowunpickle10.24030714
go  10.03567319
meteor_contest  9.956231435
normal_startup  9.607401586
formatted_logging   9.601244811
html5lib9.082603748
2to38.741557816
html5lib_warmup 8.268150981
nbody   7.507012306
regex_compile   7.153922724
bzr_startup 7.140244739
telco   6.869411927
slowspitfire5.746323922
tornado_http5.24360121
rietveld3.865704876
regex_v83.777622219
hexiom2 3.586305282
json_dump   3.477551682
spambayes   3.183991854
fastunpickle2.971645347
fastpickle  0.673086656
regex_effbot0.127946837
json_load   0.023727176

Thank you,
Alecsandru

--
components: Interpreter Core
files: hash8-v01.patch
keywords: patch
messages: 250639
nosy: alecsandru.patrascu
priority: normal
severity: normal
status: open
title: Hash computation speedup for {buffer,string,unicode}object
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file40456/hash8-v01.patch

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Python 2.7 is closed for adding new features. Python 3.4+ uses different code 
for calculating hashes.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread Sergei

New submission from Sergei:

Can't run IDLE or python command line on Windows XP 32-bit after installation.

--
components: IDLE, Interpreter Core
files: Clipboard02.jpg
messages: 250641
nosy: Sergio
priority: normal
severity: normal
status: open
title: Windows 32-bit: exe-files doesn't run
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file40457/Clipboard02.jpg

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread Sergei

Changes by Sergei :


Added file: http://bugs.python.org/file40458/Clipboard02.jpg

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread Sergei

Changes by Sergei :


Removed file: http://bugs.python.org/file40457/Clipboard02.jpg

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

> Python 2.7 is closed for adding new features. Python 3.4+ uses different code 
> for calculating hashes.

The code doesn't modify the hash function. It's a common loop unroll 
optimization technique.

Since the optimization can be seen on real world benchmark, I think that it's 
worth to take this optimization.

--
nosy: +haypo
type: enhancement -> performance

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Chris Angelico

Chris Angelico added the comment:

Hmm. Is Duff's Device a valid construct for CPython? It'd shorten this a lot...

--
nosy: +Rosuav

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Chris Angelico

Chris Angelico added the comment:

Or at very least, can fallthrough be used in the switch block, so there aren't 
7+6+5+4+3+2+1 copies of the same line?

-- Not a C performance expert --

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Or at very least, can fallthrough be used in the switch block, so there
> aren't 7+6+5+4+3+2+1 copies of the same line?

It is how _Py_HashBytes is implemented in 3.4+.

--
title: Hash computation speedup for {buffer,string,unicode}object -> Hash 
computation speedup for {buffer, string, unicode}object

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

Yes, sure it can be implemented in smaller space, as Serhiy and Chris well 
pointed out. I submitted the 01 version like that just to be clear that I don't 
want to re-implement a new hash computing value and just unroll the loop in the 
existing one. I will submit a new version based on this observations.

--

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread Oleg N

Oleg N added the comment:

You need ucrtbase.dll. Extract this archive to your Python35-32 folder and try 
to run python.

--
nosy: +Oleg N
Added file: http://bugs.python.org/file40459/ucrtbase.zip

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread Oleg N

Oleg N added the comment:

This dll probobly won't work. Read at the end of this article 
http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx
 how to obtain ucrtbase.

--

___
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-14 Thread Antoine Pitrou

New submission from Antoine Pitrou:

This can be considered a regression, although perhaps it may not be desirable 
to fix it in a later release.

In 3.4:

>>> def f(): return traceback.extract_stack()
... 
>>> print([x[0:3] for x in f()])
[('', 1, ''), ('', 1, 'f')]

In 3.5:

>>> print([x[0:3] for x in f()])
[('', 1, ''), ('', 1, 'f'), 
('/home/antoine/35/lib/python3.5/traceback.py', 201, 'extract_stack')]

Note how the traceback module suddenly appears in the extracted stack. This 
breaks any application which uses a fixed offset into the returned stack to 
look up for information.

--
components: Library (Lib)
messages: 250649
nosy: larry, ncoghlan, pitrou, rbcollins
priority: normal
severity: normal
status: open
title: traceback.extract_stack() compatibility break in 3.5
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



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

2015-09-14 Thread Robert Collins

Robert Collins added the comment:

Hmm, I think we can fix this. Its leaking due to the use of a helper I think. 
So - we should just fix this [and add a test, since clearly the test coverage 
is insufficient]

--

___
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-14 Thread Larry Hastings

Larry Hastings added the comment:

Tracebacks aren't my forte, but this does smell like a regression and something 
that should be fixed.

My worry about things like this is that it isn't as much a "bug" as a "badly 
implemented interface".  As in, that's the interface in 3.5, and people will 
depend on it, and we change it in a point release at our peril.  (That's why I 
didn't permit "fixing" warnings.warn(stacklevel=) for 3.4.)

--

___
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-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Note the doc says "Extract the raw traceback from the current stack frame". The 
"current stack frame" may be assumed to be the caller's (as it is in previous 
Python releases).

Fortunately, this is also worked around by calling 
`extract_stack(sys._getframe())`.

--

___
Python tracker 

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



[issue25083] Python can sometimes create incorrect .pyc files

2015-09-14 Thread tzickel

tzickel added the comment:

You are not looking at the correct code, the function you are pointing to, 
check_compiled_module is run to check the existing .pyc (it is a good question, 
why the .pyc is overriden, but that is a secondary issue, which I cannot 
reproduce as I've said by demand).

I am talking about the code which creates a new (and incorrect) .pyc in 
parse_source_module:
https://hg.python.org/cpython/file/2.7/Python/import.c#l861
calls in the end to Py_UniversalNewlineFgets
https://hg.python.org/cpython/file/2.7/Objects/fileobject.c#l2749
you can see that function will return NULL if it gets an EOF because of a file 
error, and then the tokenises which calls it will not know if it got NULL 
because of EOF or file error, and compile the AST and generate an incorrect 
.pyc file.

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Added file: http://bugs.python.org/file40460/hash8-v02.patch

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

I've submitted a more compact version of the previous code (hash8-v02.patch)

--

___
Python tracker 

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



[issue25109] test_code_module tests fail when run from the installed location

2015-09-14 Thread Matthias Klose

New submission from Matthias Klose:

seen when running the tests in the installed location:

the test expects:

Traceback (most recent call last):
  File "", line 1, in 
ValueError

but it gets:

Traceback (most recent call last):
  File "/usr/lib/python3.5/code.py", line 91, in runcode
exec(code, self.locals)
  File "", line 1, in 
ValueError

same for the other failing test case.

Re-running test 'test_code_module' in verbose mode
test_banner (test.test_code_module.TestInteractiveConsole) ... ok
test_cause_tb (test.test_code_module.TestInteractiveConsole) ... FAIL
test_console_stderr (test.test_code_module.TestInteractiveConsole) ... ok
test_context_tb (test.test_code_module.TestInteractiveConsole) ... FAIL
test_ps1 (test.test_code_module.TestInteractiveConsole) ... ok
test_ps2 (test.test_code_module.TestInteractiveConsole) ... ok
test_syntax_error (test.test_code_module.TestInteractiveConsole) ... ok
test_sysexcepthook (test.test_code_module.TestInteractiveConsole) ... ok

==
FAIL: test_cause_tb (test.test_code_module.TestInteractiveConsole)
--
Traceback (most recent call last):
  File "/usr/lib/python3.5/test/test_code_module.py", line 96, in test_cause_tb
self.assertIn(expected, output)
AssertionError: '\nAttributeError\n\nThe above exception was the direct cause 
of the following exception:\n\nTraceback (most recent call last):\n  File 
"", line 1, in \nValueError\n' not found in 'Python  on \nType "help", "copyright", 
"credits" or "license" for more 
information.\n(InteractiveConsole)\nAttributeError\n\nThe above exception was 
the direct cause of the following exception:\n\nTraceback (most recent call 
last):\n  File "/usr/lib/python3.5/code.py", line 91, in runcode\n
exec(code, self.locals)\n  File "", line 1, in 
\nValueError\n\n'

==
FAIL: test_context_tb (test.test_code_module.TestInteractiveConsole)
--
Traceback (most recent call last):
  File "/usr/lib/python3.5/test/test_code_module.py", line 114, in 
test_context_tb
self.assertIn(expected, output)
AssertionError: '\nTraceback (most recent call last):\n  File "", line 
1, in \nNameError: name \'ham\' is not defined\n\nDuring handling of 
the above exception, another exception occurred:\n\nTraceback (most recent call 
last):\n  File "", line 2, in \nNameError: name \'eggs\' is 
not defined\n' not found in 'Python  on \nType "help", "copyright", "credits" or "license" for 
more information.\n(InteractiveConsole)\nTraceback (most recent call last):\n  
File "", line 1, in \nNameError: name \'ham\' is not 
defined\n\nDuring handling of the above exception, another exception 
occurred:\n\nTraceback (most recent call last):\n  File 
"/usr/lib/python3.5/code.py", line 91, in runcode\nexec(code, 
self.locals)\n  File "", line 2, in \nNameError: name \'eggs\' 
is not defined\n\n'

--
components: Tests
messages: 250655
nosy: doko
priority: normal
severity: normal
status: open
title: test_code_module tests fail when run from the installed location
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



[issue25083] Python can sometimes create incorrect .pyc files

2015-09-14 Thread tzickel

Changes by tzickel :


--
nosy: +brett.cannon, meador.inge

___
Python tracker 

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



[issue17750] allow the testsuite to run in the installed location

2015-09-14 Thread Matthias Klose

Changes by Matthias Klose :


--
dependencies: +test_code_module tests fail when run from the installed location

___
Python tracker 

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



[issue19746] No introspective way to detect ModuleImportFailure in unittest

2015-09-14 Thread Peter

Peter added the comment:

This comment is just to note that this change broke our (exotic?) usage of 
unittest.TestLoader().loadTestsFromName(name) inside a try/except since under 
Python 3.5 some expected exceptions are no longer raised.

My nasty workaround hack:
https://github.com/biopython/biopython/commit/929fbfbcf2d1ba65ec460a413128dd5e6f68f5bf

I think it is unfortunate that the .errors attribute is just a list of messages 
as strings, rather than the original exception object(s) which would be easier 
to handle (e.g. using the subclass hierarchy).

--
nosy: +maubp

___
Python tracker 

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



[issue25063] shutil.copyfileobj should internally use os.sendfile when possible

2015-09-14 Thread R. David Murray

R. David Murray added the comment:

I'm going to reject this.  If you think there is enough value in this to 
warrant the complications that would be required to ensure backward 
compatibility (assuming that is even possible), you could bring it up again on 
python-ideas.

--
resolution:  -> rejected
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



[issue17750] allow the testsuite to run in the installed location

2015-09-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +test_compileall fails when run by unprivileged user on installed 
Python, test_zipfile failure when run by unprivileged user with installed Python

___
Python tracker 

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



[issue25102] Windows installer: 'precompile standard library' option should pre-compile with -O and -OO

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

Doesn't it? It's supposed to...

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

Maybe errno needs to be explicitly cleared before calling strftime or else 
we're seeing someone else's EINVAL?

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

(In the C code I mean, not in the test.)

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread Zachary Ware

Zachary Ware added the comment:

Windows XP is not supported by Python 3.5. See PEP 11 for details.

--
components: +Windows -IDLE
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
resolution:  -> wont fix
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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Stefan Krah

Stefan Krah added the comment:

Yes, errno should always be cleared before use (in C99 at least,
not sure what the crt does).

--
nosy: +skrah

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread eryksun

eryksun added the comment:

The latest version that supports Windows XP is 3.4.3.

--
components: +IDLE -Windows
nosy: +eryksun

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread eryksun

Changes by eryksun :


--
components: +Windows -IDLE

___
Python tracker 

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



[issue25089] Can't run Python Launcher on Windows

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

Just the main log file from the initial install is enough if there's no log for 
the launcher. It probably means the initial setup startup deselected it for 
some reason.

--

___
Python tracker 

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



[issue25103] 3.5.0 installed standard library on Windows has LF line endings

2015-09-14 Thread R. David Murray

R. David Murray added the comment:

I'm pretty sure the hg eol extension would need to get involved here.  This may 
not be worth the pain it would likely cause, but I could be wrong :)

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



[issue25089] Can't run Python Launcher on Windows

2015-09-14 Thread Mark Lawrence

Changes by Mark Lawrence :


Added file: http://bugs.python.org/file40461/Python 3.5.0 
(64-bit)_20150913191600.log

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread eryksun

eryksun added the comment:

> errno should always be cleared before use (in C99 at least,
> not sure what the crt does).

The CRT's strftime doesn't clear errno. I suggested clearing it in issue 25029, 
msg250215.

--
nosy: +eryksun

___
Python tracker 

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



[issue25110] Documentation sometimes still links to py3.4

2015-09-14 Thread Florian Apolloner

New submission from Florian Apolloner:

Compare those two URLs:
https://docs.python.org/3/whatsnew/
https://docs.python.org/3/

The first one shows version 3.4, whereas the later shows version 3.5.

--
messages: 250667
nosy: Florian.Apolloner
priority: normal
severity: normal
status: open
title: Documentation sometimes still links to py3.4

___
Python tracker 

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



[issue25110] Documentation sometimes still links to py3.4

2015-09-14 Thread Florian Apolloner

Changes by Florian Apolloner :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
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



[issue25110] Documentation sometimes still links to py3.4

2015-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +larry

___
Python tracker 

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



[issue25110] Documentation sometimes still links to py3.4

2015-09-14 Thread Larry Hastings

Larry Hastings added the comment:

Old version stuck in the CDN cache.  I cleared the cache, it's fine now.

--
resolution:  -> fixed
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



[issue25090] IDLE: remove noisy icons from class (module) browser

2015-09-14 Thread Mark Roseman

Mark Roseman added the comment:

Thanks Raymond. As an 'outsider' I rely on people like you to provide feedback 
based on your experience to some of the proposals I'm floating here. 

On a more specific note... 

This one came about mainly as I was looking at the class (module) browser. I 
thought it a bit limited/clunky, which as Terry noted has been brought up 
before. I noticed many editors/IDEs do a status bar thing showing current class 
and/or function, often as a gateway to navigating through the structure. I've 
found it a convenient and compact navigational cue/tool. I've also seen this 
used in addition to or in conjunction with a sidebar showing the file 
structure, highlighting current location. 

I've admittedly only briefly tried Code Context (and personally based on that 
limited experience didn't find it particularly helpful, and somewhat visually 
disruptive), and the mention here was almost an afterthought (since the status 
bar thing does provide a coarse level of context). I'd actually be curious to 
see how other editors/IDEs implement the same sort of feature as there may be 
some nice tweaks to steal - do you have any pointers?

Again, I greatly appreciate the feedback. In regards to your comment on "too 
many sweeping change proposals" I'd certainly like to hear any suggestions you 
may have around process, general concerns, etc.  Thanks again.

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue25089] Can't run Python Launcher on Windows

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

Yep, as part of the upgrade detection we're choosing not to install the 
launcher. Not sure whether that's because of a bug or a previous install on 
your machine, but I'll take a closer look.

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

I guess when I said I'd done "exactly" what you suggested I misread that 
part... whoops.

This is a pretty nasty bug to workaround... do we have any way for a user to 
clear errno from their own code?

--

___
Python tracker 

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



[issue25102] Windows installer: 'precompile standard library' option should pre-compile with -O and -OO

2015-09-14 Thread Zachary Ware

Zachary Ware added the comment:

It doesn't appear to; my 'C:\Program Files\Python 3.5\Lib\__pycache__' is full 
of .pyc's, but none with an optimization tag.  To confirm with math rather than 
eyesight, according to 'dir' there are 168 files in Lib\, and 168 in 
Lib\__pycache__ rather than the expected 168*3.

For the record, I have not run this Python as a privileged user, so the 
contents of __pycache__ are not incidental; they were definitely created by the 
precompile option.

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Stefan Krah

Stefan Krah added the comment:

Clearing is easy: errno = 0; :)


C library functions are not supposed to set errno to 0 by
themselves (C99: paragraph 7.5).

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

I get that part.

Is there a way people can set errno to zero from Python code? Or do we need to 
ship 3.5.1 already?

--

___
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-14 Thread desbma

desbma added the comment:

> With my type function, the string input is converted to an enum object and 
> that is stored in the Namespace.  You can't be any more direct than that.

Yes I know, but in that case it's missing the autogenerated help message with 
the possible choices.

I know I can generate it manually, it just does not feel right for doing 
something so simple. IMO the goal of argparse is to unload the burden of 
checking/validating parameters manually, generating help messages with 
default/possible values, etc.

Your solution with a dictionnary is similar to what I currently use and wrote 
in my example, with the added drawback that the keys are randomly ordered in 
the help message, unless I use OrderedDict (one more import and more 
boilerplate code).

Each approach has its drawbacks, unless you write some additional code to 
workaround each limitation.

In a perfect world, argparse would:
* only show to the user the enum names, and use it in help/error messages, 
possible choice set, etc.
* after parsing, set the real enum value in the namespace
* and most importantly: to do that, don't require more code than just passing 
the enum

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

It's common in Modules/posixmodule.c to set errno to 0 before calling a C 
function, especially when "errno != 0" is checked after the call (because it's 
the only way to check if the function failed?).

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread R. David Murray

R. David Murray added the comment:

Given all the changes in the windows support in 3.5, I will not be at all 
surprised if we need to spin 3.5.1 much more quickly than we normally would in 
any case.

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Stefan Krah

Stefan Krah added the comment:

Steve, sorry if I misunderstand you: My point (and eryksun's)
was that errno is currently not cleared before the call to
format_time() in

  Modules/timemodule.c:657


I didn't look at this issue in depth, just pointing out a
possible cause.

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Stefan Krah

Stefan Krah added the comment:

Argh, finally I got it: You suggested that Python users work
around this in 3.5 by setting errno from the interpreter.

I think it's better to release 3.5.1 early.

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread eryksun

eryksun added the comment:

> Is there a way people can set errno to zero from Python code? 
> Or do we need to ship 3.5.1 already?

The only the thing that comes to mind is using ctypes based on the CRT's 
implementation of errno:

import ctypes
import errno
import time

ucrtbase = ctypes.CDLL('ucrtbase')
ucrtbase._errno.restype = ctypes.POINTER(ctypes.c_int)
c_errno = ucrtbase._errno().contents

>>> time.strftime('')
''
>>> c_errno.value = errno.EINVAL; time.strftime('')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Invalid format string

--

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2) on Solaris 11.3 and newer

2015-09-14 Thread John Beck

John Beck added the comment:

The owner of the Solaris kernel bug has confirmed that he plans to get
the fix into both Solaris 12 and 11.3.

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread eryksun

eryksun added the comment:

But it should go without saying that clearing errno from Python isn't reliable 
considering how much code executes between Python statements. It needs to be 
cleared right before call strftime, and optionally the old value needs to be 
saved first in order to restore it, if you're concerned about that.

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

I'm not worried about preserving it - strftime is supposed to be a very thin 
wrapper around the underlying strftime.

I think David's right and we'll be shipping 3.5.1 pretty soon regardless 
(though a lot of the issues seem to be due to changed installation locations 
and have existing for a long time, just that the people who regularly change 
the defaults apparently haven't reported them).

--

___
Python tracker 

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



[issue25102] Windows installer: 'precompile standard library' option should pre-compile with -O and -OO

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

Right, it's just doing the single pass.

You're proposing making a slow part of the install three times slower, correct? 
Just to confirm :)

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Brett Cannon

Brett Cannon added the comment:

Is this applicable to Python 3 at all? From Serhiy's comment I think this might 
be a backport of a technique already used there, but it's not entirely clear as 
Alecsandru didn't say why there wasn't a 3.6 patch.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue25102] Windows installer: 'precompile standard library' option should pre-compile with -O and -OO

2015-09-14 Thread Zachary Ware

Zachary Ware added the comment:

Steve Dower added the comment:
> You're proposing making a slow part of the install three times slower, 
> correct? Just to confirm :)

Indeed I am :).  Or extend the precompile options to let the user do whatever 
of the three they want.

The precompile option is meant as a startup time optimization.  -O and -OO are 
meant as (very slim) runtime optimizations; it only makes sense that people 
actually concerned enough to use -O/-OO would rather have their startup time 
optimized as well.

This is pretty low priority, though.

--
priority: normal -> low

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-09-14 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

This patch is not applicable to Python 3, as it already has a better hash 
function and has the same unrolling technique applied. 

As Brett well observed, it is a backport of an optimization technique used in 
Python 3, applied to the existing hash function in 2.7.

--

___
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-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch that restores compatibility. There were no tests for 
print_stack(), format_stack(), and extract_stack() without arguments. New tests 
are passed with 3.4.

There is a difference between this bug and warnings.warn(stacklevel=) at import 
time. In the latter the behavior is changed when we specify the stacklevel and 
we can't workaround this besides change the specified stacklevel depending on 
Python version. In the former the behavior is changed only when we don't 
specify a frame. The workaround is version independed: specify the frame 
explicitly. Therefore we will not break a code with a workaround for 3.5.0, but 
will fix a code without workaround.

--
keywords: +patch
nosy: +serhiy.storchaka
stage:  -> patch review
Added file: http://bugs.python.org/file40462/traceback_extract_stack.patch

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Brett Cannon

Brett Cannon added the comment:

If this is applying something we already did in Python 3 and it doesn't break 
compatibility then this should fall under the same sort of backport exemption 
that Guido granted for the eval loop performance enhancements that Intel did a 
couple months back.

--

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

IIRC there's an existing issue for this. (Or it may have just been mentioned in 
a "things that don't work when you're not root" list on an issue.)

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

Yes, it doesn't break the compatibility with existing applications. To make 
sure, we tested it in various scenarios and workloads.

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Chris Angelico

Chris Angelico added the comment:

+1 for anything that makes Python faster with provably no semantic changes.

--

___
Python tracker 

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



[issue25111] Broken compatibility in FrameSummary equality

2015-09-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +patch
Added file: 
http://bugs.python.org/file40463/traceback_FrameSummary_equality.patch

___
Python tracker 

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



[issue25111] Broken compatibility in FrameSummary equality

2015-09-14 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Since 3.5 traceback.extract_tb() and traceback.extract_stack() return a list 
(actually list's subclass StackSummary) of FrameSummary objects instead of a 
list of tuples. FrameSummary is not fully compatible with tuple. One important 
incompatibility is in the comparing.

>>> import traceback
>>> traceback.extract_stack()[0] == ('', 1, '', '')
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython-3.5/Lib/traceback.py", line 254, in __eq__
return (self.filename == other.filename and
AttributeError: 'tuple' object has no attribute 'filename'

In general __eq__ shouldn't raise an exception. Issue25108 is needed to be 
fixed first for tests.

Here is a patch that restores compatibility.

An alternative solution would be to make FrameSummary a subclass of tuple 
(namedtuple).

--
components: Library (Lib)
messages: 250693
nosy: rbcollins, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Broken compatibility in FrameSummary equality
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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Existing issue21264 reports about failure of different test. It may be the same 
issue or different but related issues.

--

___
Python tracker 

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



[issue25112] Windows installer assigns non-existent icons to Python file types

2015-09-14 Thread Thijs van Dien

New submission from Thijs van Dien:

Whenever the Python launcher is selected, the installer sets the icon for 
common Python file extensions, i.e. .py, .pyc, .pyo, .pyw, .pyz and .pyzw. 
Formerly (under Python 3.4) the icons were located in DLLs in the Python 
installation directory. The new installer assigns either py.exe,1 or py.exe,2 
as the icon. Because py.exe contains just a single icon, the only valid icon 
index is 0. As a result of the invalid icon, all Python files show up with 
either blank or generic icons. Probably those icons have not been included as 
they should have.

Tested on Windows 7 SP1, both X86 and AMD64, both fresh a fresh install and one 
with quite a bit of history. It occurs with all appropriate Python 3.5 
installers (pick any of X86/AMD64 and web/non-web). Make sure the Python 
launcher is selected; the default settings will do.

--
components: Installation, Windows
files: Screen Shot 2015-09-14 at 20.00.50.png
messages: 250696
nosy: paul.moore, steve.dower, thijsvandien, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows installer assigns non-existent icons to Python file types
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file40464/Screen Shot 2015-09-14 at 
20.00.50.png

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The code for str and buffer can be shared as _Py_HashBytes() (as in 3.4+). Also 
please add comments in the switch block as in 3.4+.

Should we ask Guido for granting backport exemption for this optimization?

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-09-14 Thread Brett Cannon

Brett Cannon added the comment:

It sounds like some tests just need to have a decorator that blocks execution 
if the relevant __pycache__ isn't writable.

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Brett Cannon

Brett Cannon added the comment:

Assuming Benjamin doesn't object I don't think we need to explicit ask Guido. 
He made his feelings quite clear about allowing backports of performance 
improvements that already exist in Python 3 and have been battle-tested.

Having said that, I hope Intel is also looking at Python 3 improvements and not 
solely backporting stuff to Python 2.7. =)

--

___
Python tracker 

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



[issue25112] Windows installer assigns non-existent icons to Python file types

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

That is indeed what happened. The resource file for the launcher was not 
updated (or the update got lost... I was fairly sure I did it)

Attached patch fixes it.

--
assignee:  -> steve.dower
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file40465/25112_1.patch

___
Python tracker 

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



[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-09-14 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue25102] Windows installer: 'precompile standard library' option should pre-compile with -O and -OO

2015-09-14 Thread Steve Dower

Changes by Steve Dower :


--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file40466/25102_1.patch

___
Python tracker 

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



[issue24836] Consistent failure in test_email on OS X Snow Leopard buildbot for Python 3.5

2015-09-14 Thread Geoffrey Spear

Changes by Geoffrey Spear :


--
nosy: +geoffreyspear

___
Python tracker 

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



[issue25113] documentation version switcher is broken

2015-09-14 Thread Yury Selivanov

New submission from Yury Selivanov:

The dropdown that allowed to switch the Python version for docs disappeared 
with py3.5 release.

--
messages: 250700
nosy: eric.araujo, ezio.melotti, georg.brandl, larry, yselivanov
priority: high
severity: normal
status: open
title: documentation version switcher is broken
type: enhancement
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



[issue25074] Bind logger and waninigs modules for asyncio __del__ methods

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

I don't like such "hacks". IMHO It's too late to try to log errors, to execute 
code to cleanup objects, etc. 

You should try to implement something in aiohttp or even in the application to 
cleanup objects at exit. For example, it's probably wrong if you still have 
tasks when the event loop is closed. Especially if tasks are still pending. See 
this part of the doc which lists "pending tasks at exit":
https://docs.python.org/dev/library/asyncio-dev.html#chain-coroutines-correctly

For "exceptions never consumed", I proposed a different enhancement in asyncio 
directly:
https://bugs.python.org/issue24598

What do you think?

--

___
Python tracker 

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



[issue25113] documentation version switcher is broken

2015-09-14 Thread Berker Peksag

Berker Peksag added the comment:

Looks like version_switch.js is not included into HTML.

SPHINXOPTS='-A versionswitcher=1' make -C Doc/ htmlview

works for me locally on the 3.5 branch. Perhaps 3.5 docs were created manually 
or without running "make autobuild-{dev,html,stable}"?

--
nosy: +berker.peksag

___
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-14 Thread paul j3

paul j3 added the comment:

Here's a EnumType factory class, modeled on FileType.  

class EnumType(object):
"""Factory for creating enum object types
"""
def __init__(self, enumclass):
self.enums = enumclass

def __call__(self, astring):
name = self.enums.__name__
try:
return self.enums[astring.upper()]
except KeyError:
msg = ', '.join([t.name.lower() for t in self.enums])
msg = '%s: use one of {%s}'%(name, msg)
raise argparse.ArgumentTypeError(msg)

def __repr__(self):
astr = ', '.join([t.name.lower() for t in self.enums])
return '%s(%s)' % (self.enums.__name__, astr)

It would be used like:

parser=argparse.ArgumentParser()
parser.add_argument("-p", type=EnumType(CustomEnumType),
default="VAL1", help = 'type info: %(type)s')

'EnumType(CustomEnumType)' is as close as we are going to get to 'simply 
passing the enum' to the parser, given the current 'type' syntax.  This 
statement produces a callable object, the equivalent of my previous function.

By giving the class a `__repr__` it can also be used in the 'help' with the 
'%(type)s' syntax.  That's the main functionality that this factory adds to my 
previous function definition.

parser.print_help()
print(parser.parse_args([]))
print(parser.parse_args(["-p","val2"]))
print(parser.parse_args(["-p","val4"]))


produces

usage: issue25061.py [-h] [-p P]
optional arguments:
-h, --help  show this help message and exit
-p Ptype info: CustomEnumType(val1, val2, val3)

Namespace(p=)
Namespace(p=)
usage: issue25061.py [-h] [-p P]
issue25061.py: error: argument -p: CustomEnumType: use one of
{val1, val2, val3}

I was toying with writing a custom Action class that would create its own type 
and help attributes based on the enum parameter.  But since this 
EnumType.__repr__ takes care of the help angle, I don't think I'll bother.

If there's enough interest, I can imagine casting this EnumType as a formal 
patch, complete with tests and documentation.  Till then, feel free to 
experiment with and refine these ideas.

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Gregory P. Smith

Gregory P. Smith added the comment:

attaching an updated patch.

fwiw, in my own quick tests i'm not seeing a performance difference on the 
benchmark suite.  but i am not trying to run it in such an isolated quiet 
machine locked freq.  environment.

it is still a good idea regardless.  _some_ compilers really benefit from the 
manually unrolling.  any that already unrolled things themselves should not 
care.

--
Added file: http://bugs.python.org/file40467/hash8-v03-gps01.patch

___
Python tracker 

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



[issue25114] asynico: add ssl_object extra info

2015-09-14 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch adds the "ssl_object" extra information to SSL sockets. For the 
legacy SSL implementation, it's a ssl.SSLSocket instance. For the new SSL 
implementation, it's a ssl.SSLObject instance.

ssl.SSLObject and ssl.SSLSocket have a similar but different API. Both classes 
provide important methods like getpeercert().

This issue fixes a regressions of Python 3.5 compared to Python 3.4 in asyncio 
SSL sockets: it's no more possible to get the peer certificate as a binary 
object (only as text). See the issue #22768.

My patch adds also unit tests on SSL extra info. We only had poor unit tests on 
these info.

--
components: asyncio
files: ssl_object.patch
keywords: patch
messages: 250705
nosy: gvanrossum, haypo, mathieui, yselivanov
priority: normal
severity: normal
status: open
title: asynico: add ssl_object extra info
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40468/ssl_object.patch

___
Python tracker 

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



[issue25114] asynico: add ssl_object extra info

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

Workaround for Python 3.5.0: force the legacy SSL implementation. For example, 
monkey patch the asyncio module with:

asyncio.sslproto._is_sslproto_availabe=lambda: False

--

___
Python tracker 

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



[issue22768] Add a way to get the peer certificate of a SSL Transport

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

In Python 3.5, it's no more possible to get the peer certificate as binary. See 
the issue #25114 for a general fix.

--

___
Python tracker 

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



[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2015-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2015-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

Patch attached. I haven't been able to repro the issue locally without the fix, 
but it seems indisputably correct behavior.

We could also skip most of the function for an empty format string and save 
ourselves a lot of work. That would avoid the ambiguous returned "is it 
zero-length or is it an error" value.

--
keywords: +patch
Added file: http://bugs.python.org/file40469/25092_1.patch

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

(The fix is indisputably correct, is what I meant.)

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

+#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
+errno = 0;
+#endif

This code is too complex. Please remove the #if and always set errno to 0, on 
any platform!

--

___
Python tracker 

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



[issue25096] test_gdb failed to read version for gdb >= 7.10

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

Fixed by changesets 21d6b2752fe8 (2.7) and 6a8aa246485e (3.4). Thanks for your 
bug report and your patch!

--
nosy: +haypo
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue25084] remove semi-busy loop in py2.7 threading.Condition.wait(timeout=x)

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

As you noticed, this issue was correctly fixed in Python 3 by using the C timed 
acquire methods of locks, instead of polling. The problem is that Python 2 
supports a wide range of threading models:

Python/thread_atheos.h
Python/thread_beos.h
Python/thread_cthread.h
Python/thread_lwp.h
Python/thread_nt.h
Python/thread_os2.h
Python/thread_pth.h
Python/thread_pthread.h
Python/thread_sgi.h
Python/thread_solaris.h
Python/thread_wince.h

In Python 3, it was possible to use more features of OS threads because we 
dropped all implementations to only keep the 2 major implementations:

Python/thread_nt.h
Python/thread_pthread.h

Your change adds a new feature to threading.Lock in Python 2:

-.. method:: Lock.acquire([blocking])
+.. method:: Lock.acquire(blocking=True, timeout=-1)

But features cannot be added to Python 2 anymore!

The backport changes critical C code. There is a (high) risk of introducing a 
regression.

I suggest to close this issue as WONTFIX.

@Benjamin (Python 2.7 release manager): What do you think?

In 2015, it's time to upgrade to Python 3! 
https://docs.python.org/3/howto/pyporting.html

--
nosy: +benjamin.peterson, haypo

___
Python tracker 

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



[issue24391] Better repr for threading objects

2015-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue25077] Compiler warnings: initialization from incompatible pointer type

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

For ceval, it comes from pyatomic.h: see my atomic_pointer.patch attached to 
the issue #25077.

--
nosy: +haypo

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

We don't check errno on any other platform.

--

___
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-14 Thread Nick Coghlan

Nick Coghlan added the comment:

Serhiy's explanation and fix look good to me.

--

___
Python tracker 

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



[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2015-09-14 Thread Felipe

Felipe added the comment:

The attached patch implements these changes through _callable instead. This 
patch also ensures that the underlying object that staticmethod and classmethod 
wrap is a callable object as well.

--
Added file: http://bugs.python.org/file40470/issue23078.patch

___
Python tracker 

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



  1   2   >