[issue31662] trivial typos in Tools/msi/uploadrelease.bat

2017-10-03 Thread Ned Deily

Ned Deily  added the comment:


New changeset a51c760ddd7ad2513202e419cde90670283a6bc9 by Ned Deily (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-31662: Fix typos in uploadrelease.bat script (#3858)
https://github.com/python/cpython/commit/a51c760ddd7ad2513202e419cde90670283a6bc9


--
nosy: +ned.deily

___
Python tracker 

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



[issue31423] Error while building PDF documentation

2017-10-03 Thread Ned Deily

Ned Deily  added the comment:


New changeset a74ce09c738c3e3aa89994bf31049cb914dca389 by Ned Deily (Zachary 
Ware) in branch '3.6':
[3.6] bpo-31423: Fix building the PDF documentation (GH-3693) (GH-3699)
https://github.com/python/cpython/commit/a74ce09c738c3e3aa89994bf31049cb914dca389


--

___
Python tracker 

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



[issue31641] concurrent.futures.as_completed() no longer accepts arbitrary iterables

2017-10-03 Thread Ned Deily

Ned Deily  added the comment:


New changeset 2e3fd03796528a9f88f79d38e1d890af153c8e61 by Ned Deily (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-31641: Allow arbitrary iterables in 
`concurrent.futures.as_completed()` (GH-3830) (#3831)
https://github.com/python/cpython/commit/2e3fd03796528a9f88f79d38e1d890af153c8e61


--

___
Python tracker 

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



[issue31641] concurrent.futures.as_completed() no longer accepts arbitrary iterables

2017-10-03 Thread Ned Deily

Ned Deily  added the comment:

Cherry picked into 3.6.3 final -> closing

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



[issue31641] concurrent.futures.as_completed() no longer accepts arbitrary iterables

2017-10-03 Thread Ned Deily

Change by Ned Deily :


--
priority: release blocker -> 

___
Python tracker 

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



[issue22729] concurrent.futures `wait` and `as_completed` depend on private api

2017-10-03 Thread Ben Mather

Ben Mather  added the comment:

The patch is indeed a little outdated, but I would be happy to pick it and get 
it working again.

First we need a resolution to #22630 though.
Currently calling `cancel` will invoke callbacks, but waiters won't be 
triggered until `set_running_or_notify_cancel` is called.

If both are implemented using the same mechanism, then both will need to be 
cancelled at the same time.  This means that the behaviour of one the other 
will need to be changed in a backwards incompatible way.

Does anyone have a preference for where we should send notification of 
cancellation?
Is the breakage significant enough to kill this patch?

--

___
Python tracker 

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



[issue31589] Links for French documentation pdf is broken

2017-10-03 Thread Julien Palard

Julien Palard  added the comment:

For the record, I can reproduce the issue with this minimal test file:

mdk@windhowl$ ls -lah
total 108K
drwxr-xr-x  2 mdk  mdk  4.0K Oct  2 21:15 .
drwxrwxrwt 18 root root  96K Oct  2 21:15 ..
-rw-r--r--  1 mdk  mdk   196 Oct  2 21:13 faq.tex

mdk@windhowl$ cat faq.tex 
\documentclass[a4,10pt,french]{report}

\usepackage[utf8x]{inputenc}
\usepackage[T1,T2A]{fontenc}
\usepackage{babel}

\begin{document}
\tableofcontents
\chapter{FAQ sur Python éh}
\end{document}

mdk@windhowl$ latexmk faq 2>&1 | tail -n 15
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-0.def) [2] (./faq.aux) )
Output written on faq.dvi (2 pages, 608 bytes).
Transcript written on faq.log.
Latexmk: Log file says output to 'faq.dvi'
Rule 'latex': File changes, etc:
   Changed files, or newly in use since previous run(s):
  'faq.aux'
  'faq.toc'
Latexmk: Maximum runs of latex reached without getting stable files
Latexmk: Did not finish processing file 'faq':
   'latex' needed too many passes
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs of latex/pdflatex.
Latexmk: applying rule 'latex'...
Latexmk: All targets (faq.dvi) are up-to-date


Also, according to matrixise, it works with xelatex.

--

___
Python tracker 

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



[issue22729] concurrent.futures `wait` and `as_completed` depend on private api

2017-10-03 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
versions: +Python 3.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



[issue31589] Links for French documentation pdf is broken

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

Julien: Is there any reason why you want to use utf8x in specific?

https://tex.stackexchange.com/questions/13067/utf8x-vs-utf8-inputenc

"""
utf8x vs. utf8 (inputenc)
(...)
The simple answer is that utf8x is to be avoided if possible. It loads the ucs 
package, which for a long time was unmaintained (although there is now a new 
maintainer) and breaks various other things.
"""

--
nosy: +haypo

___
Python tracker 

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



[issue31589] Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters?

2017-10-03 Thread STINNER Victor

Change by STINNER Victor :


--
title: Links for French documentation pdf is broken -> Links for French 
documentation PDF is broken: LaTeX issue with non-ASCII characters?

___
Python tracker 

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



[issue22630] `concurrent.futures.Future.set_running_or_notify_cancel` does not notify cancel

2017-10-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

"change-docs-and-waiters.patch" looks reasonable on the principle, but I doubt 
it still applies.

Also, we use Github nowadays.  You may still upload patches if you prefer, but 
pull requests have become the recommended way to submit changes :-)

--
nosy: +pitrou

___
Python tracker 

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



[issue22729] concurrent.futures `wait` and `as_completed` depend on private api

2017-10-03 Thread Ben Mather

Ben Mather  added the comment:

@Nathaniel
RE `remove_done_callback`:  This was added as an optimisation to allow the 
`as_completed` iterator to remove callbacks for future that it has visited 
instead of having to store a separate set of visited futures and ignore them 
when their callbacks are triggered.

This matches how the private waiters mechanism works.

It might be worth submitting the core of this change without 
`remove_done_callback` and then discussing it later as a separate optimisation. 
 I will experiment.

--

___
Python tracker 

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



[issue31589] Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters?

2017-10-03 Thread Julien Palard

Julien Palard  added the comment:

I personally do not care about using utf8x, it has been introduced in:

  r74549 | benjamin.peterson | 2009-08-24 12:42:36 -0500 (Mon, 24 Aug 2009) | 1 
line
  fix pdf building by teaching latex the right encoding package

  # Get LaTeX to handle Unicode correctly
  latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}'}

I tried with utf8 instead and it yielded a different set of errors, so I did 
not tried much. But utf8-induced bugs may be easier to fix that utf8x-induced 
bugs, I don't know.

--

___
Python tracker 

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



[issue31540] Adding context in concurrent.futures.ProcessPoolExecutor

2017-10-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset e8c368df22c344183627e7ef882bea1683fe6dbe by Antoine Pitrou 
(Thomas Moreau) in branch 'master':
bpo-31540: Allow passing multiprocessing context to ProcessPoolExecutor (#3682)
https://github.com/python/cpython/commit/e8c368df22c344183627e7ef882bea1683fe6dbe


--
nosy: +pitrou

___
Python tracker 

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



[issue31589] Links for French documentation PDF is broken: LaTeX issue with non-ASCII characters?

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

(Oh sorry, I misunderstand what you wrote. I understood that Python didn't use 
utf8x yet and you proposed to start using it.)

--

___
Python tracker 

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



[issue31540] Adding context in concurrent.futures.ProcessPoolExecutor

2017-10-03 Thread Antoine Pitrou

Change by Antoine Pitrou :


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



[issue31415] Add -X option to show import time

2017-10-03 Thread INADA Naoki

Change by INADA Naoki :


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



[issue31415] Add -X option to show import time

2017-10-03 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 1a87de7fcfa3c19f08e29047337c350b4a32b259 by INADA Naoki in branch 
'master':
bpo-31415: Add `-X importtime` option (GH-3490)
https://github.com/python/cpython/commit/1a87de7fcfa3c19f08e29047337c350b4a32b259


--

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread INADA Naoki

New submission from INADA Naoki :

flags exposed by re module are IntFlag from Python 3.4.

Since it is passed to underlying sre_parse and sre_compile,
tests in loop (e.g. `flags & SRE_FLAG_IGNORECASE`) calls
IntFlag.__and__ and creates new instance everytime.

It makes re.compile() slower.

--
components: Library (Lib)
messages: 303594
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: IntFlag makes re.compile slower
versions: Python 3.7

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread INADA Naoki

Change by INADA Naoki :


--
keywords: +patch
pull_requests: +3842
stage:  -> patch review

___
Python tracker 

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



[issue31619] Strange error when convert hexadecimal with underscores to int

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 85c0b8941f0c8ef3ed787c9d504712c6ad3eb5d3 by Serhiy Storchaka in 
branch 'master':
bpo-31619: Fixed a ValueError when convert a string with large number of 
underscores (#3827)
https://github.com/python/cpython/commit/85c0b8941f0c8ef3ed787c9d504712c6ad3eb5d3


--

___
Python tracker 

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



[issue31619] Strange error when convert hexadecimal with underscores to int

2017-10-03 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +3843

___
Python tracker 

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



[issue31672] string.Template should use re.ASCII flag

2017-10-03 Thread INADA Naoki

New submission from INADA Naoki :

Currently, strings.Template uses re.IGNORECASE without re.ASCII:

idpattern = r'[_a-z][_a-z0-9]*'
flags = _re.IGNORECASE

[a-z] matches against 'ı' (0x131, DOTLESS I) and 'ſ' (0x17f, LONG S).
It is not intentional, and it makes re.compile slower.

--
components: Regular Expressions
messages: 303596
nosy: ezio.melotti, inada.naoki, mrabarnett
priority: normal
severity: normal
status: open
title: string.Template should use re.ASCII flag
versions: Python 3.7

___
Python tracker 

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



[issue31673] Fix the name of Tkinter's adderrorinfo method

2017-10-03 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

When the _tkinter module was converted to Argument Clinic in issue20168, the 
name of the adderrorinfo method was written as "adderrinfo". This error was 
left unnoticed because there are no tests for this method besides bigmem tests. 
Today I have ran bigmem tests first time (they require 64-bit system and large 
amount of memory) and have found this typo. Seems these tests are not ran on 
any buildbots.

--
assignee: serhiy.storchaka
components: Tkinter
messages: 303597
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Fix the name of Tkinter's adderrorinfo method
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue31673] Fix the name of Tkinter's adderrorinfo method

2017-10-03 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +3844

___
Python tracker 

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



[issue31674] Buildbots: random "Failed to connect to github.com port 443: Connection timed out" errors

2017-10-03 Thread STINNER Victor

New submission from STINNER Victor :

Sometimes, the "git" step fails on buildbots. ARMv7 Ubuntu 3.x just failed on 
build 1481, atTue Oct 3 11:14:22 2017:

http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.x/builds/1481/steps/git/logs/stdio

git fetch -t https://github.com/python/cpython.git master
(...)
fatal: unable to access 'https://github.com/python/cpython.git/': Failed to 
connect to github.com port 443: Connection timed out

--
components: Tests
keywords: buildbot
messages: 303598
nosy: haypo
priority: normal
severity: normal
status: open
title: Buildbots: random "Failed to connect to github.com port 443: Connection 
timed out" errors
versions: Python 3.7

___
Python tracker 

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



[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-03 Thread Serhiy Storchaka

Change 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



[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-03 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

There is a memory leak in Tkinter's methods splitlines() and split() when pass 
a string larger than 2 GiB (when encoded to UTF-8).

--
components: Tkinter
messages: 303599
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Tkinter: memory leak in splitlines() and split()
type: resource usage
versions: Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

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



[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-03 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
dependencies: +Fix the name of Tkinter's adderrorinfo method

___
Python tracker 

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



[issue31415] Add -X option to show import time

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

Thank you Naoki for this nice enhancement! Tooling always help to take smart 
decisions on optimizations.

--

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

See also issue28637. Using IntFlag in the re module impacted the Python startup 
time. This was "fixed" by getting rid of re in site.py.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

Which function? Do you mean split() and splitlist() methods of tkapp? C 
functions _tkinter_tkapp_split() and _tkinter_tkapp_splitlist().

Do you know how to reproduce the memory leak?

--
nosy: +haypo

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread STINNER Victor

Change 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



[issue30807] setitimer() can disable timer by mistake

2017-10-03 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +3845

___
Python tracker 

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



[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-03 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +3846

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, Python already accepts floating point numbers:

haypo@selma$ ./python
Python 3.7.0a1+ (heads/master-dirty:efb560eee2, Oct  3 2017, 12:15:58) 
[GCC 7.2.1 20170915 (Red Hat 7.2.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> re.compile("[a-z]", flags=re.I).match("A")
<_sre.SRE_Match object; span=(0, 1), match='A'>
>>> re.I

>>> re.compile("[a-z]", flags=2).match("A")
<_sre.SRE_Match object; span=(0, 1), match='A'>

# and now a float
>>> re.compile("[a-z]", flags=2.0).match("A")
<_sre.SRE_Match object; span=(0, 1), match='A'>

--

___
Python tracker 

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



[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Just run the bigmem tests with ulimit (after fixing issue31673).

(ulimit -v 435; ./python -m test -vuall -M4G test_tcl)

--

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

:) This is due to caching. 2.0 == 2.

--

___
Python tracker 

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



[issue31619] Strange error when convert hexadecimal with underscores to int

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset b5a630f3dd30ed628e088efe7523e650087adba2 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31619: Fixed a ValueError when convert a string with large number of 
underscores (GH-3827) (#3863)
https://github.com/python/cpython/commit/b5a630f3dd30ed628e088efe7523e650087adba2


--

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, right. Strange.

>>> re.compile("e", flags=2.0)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/haypo/prog/python/master/Lib/re.py", line 240, in compile
return _compile(pattern, flags)
  File "/home/haypo/prog/python/master/Lib/re.py", line 288, in _compile
p = sre_compile.compile(pattern, flags)
  File "/home/haypo/prog/python/master/Lib/sre_compile.py", line 747, in compile
p = sre_parse.parse(p, flags)
  File "/home/haypo/prog/python/master/Lib/sre_parse.py", line 890, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
TypeError: unsupported operand type(s) for &: 'float' and 'int'

--

___
Python tracker 

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



[issue31676] Strange failure in test_cgitb

2017-10-03 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

I have found a strange failure when run the bigmem tests.

0:20:19 load avg: 1.04 [116/407/1] test_cgitb
test test_cgitb failed -- Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_cgitb.py", line 23, in test_html
raise ValueError("Hello World")
ValueError: Hello World

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_cgitb.py", line 27, in test_html
html = cgitb.html(sys.exc_info())
  File "/home/serhiy/py/cpython/Lib/cgitb.py", line 117, in html
records = inspect.getinnerframes(etb, context)
  File "/home/serhiy/py/cpython/Lib/inspect.py", line 1483, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
  File "/home/serhiy/py/cpython/Lib/inspect.py", line 1445, in getframeinfo
lines, lnum = findsource(frame)
  File "/home/serhiy/py/cpython/Lib/inspect.py", line 780, in findsource
module = getmodule(object, file)
  File "/home/serhiy/py/cpython/Lib/inspect.py", line 739, in getmodule
f = getabsfile(module)
  File "/home/serhiy/py/cpython/Lib/inspect.py", line 708, in getabsfile
_filename = getsourcefile(object) or getfile(object)
  File "/home/serhiy/py/cpython/Lib/inspect.py", line 693, in getsourcefile
if os.path.exists(filename):
  File "/home/serhiy/py/cpython/Lib/genericpath.py", line 19, in exists
os.stat(path)
ValueError: embedded null byte

0:20:19 load avg: 1.04 [117/407/2] test_csv -- test_cgitb failed


It is not reproduced when run test_cgitb separately.

--
messages: 303608
nosy: ezio.melotti, haypo, michael.foord, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Strange failure in test_cgitb
type: behavior

___
Python tracker 

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



[issue31676] Strange failure in test_cgitb

2017-10-03 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


Added file: https://bugs.python.org/file47185/tests-bigmem.txt

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +3847

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

> :) This is due to caching. 2.0 == 2.

I proposed PR 3867 to fix the re.compile() cache: check flags type.

--

___
Python tracker 

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



[issue31669] string.Template: cods, docs and PEP all disagree on definition of identifier

2017-10-03 Thread INADA Naoki

Change by INADA Naoki :


--
superseder:  -> string.Template should use re.ASCII flag

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Victor, how large is performance regression of your patch?

--

___
Python tracker 

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



[issue31672] string.Template should use re.ASCII flag

2017-10-03 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +barry, serhiy.storchaka

___
Python tracker 

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



[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, Python splitlist() doesn't seem to be documented.

Tcl SplitList documentation: https://www.tcl.tk/man/tcl/TclLib/SplitList.htm

--

___
Python tracker 

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



[issue31677] email.header uses re.IGNORECASE without re.ASCII

2017-10-03 Thread INADA Naoki

New submission from INADA Naoki :

email.header has this pattern:

https://github.com/python/cpython/blob/85c0b8941f0c8ef3ed787c9d504712c6ad3eb5d3/Lib/email/header.py#L34-L43

# Match encoded-word strings in the form =?charset?q?Hello_World?=  
 
ecre = re.compile(r'''  
 
  =\?   # literal =?
 
  (?P[^?]*?)   # non-greedy up to the next ? is the charset
 
  \?# literal ? 
 
  (?P[qb])# either a "q" or a "b", case insensitive   
 
  \?# literal ? 
 
  (?P.*?)  # non-greedy up to the next ?= is the encoded string
 
  \?=   # literal ?=
 
  ''', re.VERBOSE | re.IGNORECASE | re.MULTILINE)


Since only 's' and 'i' has other lower case character, this is not a real bug.
But using re.ASCII is more safe.

Additionally, email.util has same pattern from 10 years ago, and it is not used 
by anywhere.
It should be removed.

--
components: Regular Expressions
messages: 303612
nosy: ezio.melotti, inada.naoki, mrabarnett
priority: normal
severity: normal
status: open
title: email.header uses re.IGNORECASE without re.ASCII
versions: Python 3.7

___
Python tracker 

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



[issue31677] email.header uses re.IGNORECASE without re.ASCII

2017-10-03 Thread INADA Naoki

Change by INADA Naoki :


--
keywords: +patch
pull_requests: +3848
stage:  -> patch review

___
Python tracker 

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



[issue31677] email.header uses re.IGNORECASE without re.ASCII

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Alternatively, re.IGNORECASE can be removed and [qb] replaced with [QqBb].

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31669] string.Template: cods, docs and PEP all disagree on definition of identifier

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

There is no contradiction. PEP 292 means Python 2 identifiers. Python 3 
documentation was changed according to changing the definition of Python 
identifiers (see issue24351).

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
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



[issue31677] email.header uses re.IGNORECASE without re.ASCII

2017-10-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

I think using re.ASCII is a good addition since RFC 2047 says:

   Generally, an "encoded-word" is a sequence of printable ASCII
   characters that begins with "=?", ends with "?=", and has two "?"s in
   between.  It specifies a character set and an encoding method, and
   also includes the original text encoded as graphic ASCII characters,
   according to the rules for that encoding method.

It's better to keep the re.IGNORECASE since the RFC also says:

   Both 'encoding' and 'charset' names are case-independent.  Thus the
   charset name "ISO-8859-1" is equivalent to "iso-8859-1", and the
   encoding named "Q" may be spelled either "Q" or "q".

--
nosy: +barry

___
Python tracker 

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



[issue31678] Incorrect C Function name for timedelta

2017-10-03 Thread Михаил Миронов

New submission from Михаил Миронов :

Documentation:

PyDateTime_DELTA_GET_MICROSECOND
https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_DELTA_GET_MICROSECOND

Should be:
PyDateTime_DELTA_GET_MICROSECONDS

--
assignee: docs@python
components: Documentation
messages: 303616
nosy: docs@python, Михаил Миронов
priority: normal
severity: normal
status: open
title: Incorrect C Function name for timedelta
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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

Serhiy: "Victor, how large is performance regression of your patch?"

I tested bm_regex_compile.py of the Python performance benchmark suite:
https://pyperformance.readthedocs.io/benchmarks.html#regex-compile

My patch has no impact on *uncached* re.compile() performances according to 
this benchmark.

haypo@selma$ ./python -m perf compare_to ref.json patch.json  
Benchmark hidden because not significant (1): regex_compile

haypo@selma$ ./python -m perf compare_to ref.json patch.json  -v
Mean +- std dev: [ref] 386 ms +- 6 ms -> [patch] 387 ms +- 6 ms: 1.00x slower 
(+0%)
Not significant!

--

On a microbenchmark on the *cache* itself, the difference is visible:

 1018  ./python -m perf timeit -s 'import re; re_compile=re.compile' 
're_compile("a", flags=2)' --duplicate=1024 -o ref.json  --inherit=PYTHONPATH -v
 1019  git co re_compile_flags_type 
 1020  make
 1021  ./python -m perf timeit -s 'import re; re_compile=re.compile' 
're_compile("a", flags=2)' --duplicate=1024 -o patch.json  --inherit=PYTHONPATH 
-v
 1022  ./python -m perf compare_to ref.json patch.json  
 1023  git diff master..

haypo@selma$ ./python -m perf compare_to ref.json patch.json  
Mean +- std dev: [ref] 364 ns +- 6 ns -> [patch] 459 ns +- 10 ns: 1.26x slower 
(+26%)

If you replace type(flags) with flags.__class__, the change has no impact on 
performances :-) But obj.__class__ can be different than type(obj).

--

___
Python tracker 

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



[issue31672] string.Template should use re.ASCII flag

2017-10-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Technically it *is* an API change since `flags` is a part of the public API.  
The documentation says:

$identifier names a substitution placeholder matching a mapping key of 
"identifier". By default, "identifier" is restricted to any case-
insensitive ASCII alphanumeric string (including underscores) that starts 
with an underscore or ASCII letter. The first non-identifier character 
after the $ character terminates this placeholder specification.

This means if someone does subclass string.Template and changes the pattern to 
accept Unicode identifiers, then with this change they will also have to modify 
flags, whereas before they didn't.

It really wasn't ever the intention to allow non-ASCII identifiers, so this is 
probably safe in practice.  OTOH, making the change for performance reasons 
might be questionable, given that the regular expressions are compiled by the 
Template's metaclass, so unlikely to contribute significantly to overall 
performance wins.

--

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread Barry A. Warsaw

Change 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



[issue31676] Strange failure in test_cgitb

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

I bisect the bug manually and using test.bisect. I identified that the bug is 
triggered when you run the following 3 tests:
---
test.test_imp.ImportTests.test_load_source
test.test_cgitb.TestCgitb.test_html
test.test_cgitb.TestCgitb.test_fonts
---

Write these tests into "tests" file and run:

./python -m test.bisect -uall -M4G test_imp test_cgitb --matchfile=tests

--

___
Python tracker 

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



[issue31676] Strange failure in test_cgitb

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

Sorry, run:

./python -m test -M4G test_imp test_cgitb --matchfile=tests

--

___
Python tracker 

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



[issue31669] string.Template: cods, docs and PEP all disagree on definition of identifier

2017-10-03 Thread Barry A. Warsaw

Change 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



[issue31676] Strange failure in test_cgitb

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

The problem is that imp.load_source() modifies __file__ of the __main__ module.

Example of a file x.py:
---
import imp
import sys
print(sys.modules[__name__])
try:
imp.load_source(__name__, __file__ + "\0")
except:
pass
print(sys.modules[__name__])
---

Output:
---


---

--

___
Python tracker 

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



[issue31567] Inconsistent documentation around decorators

2017-10-03 Thread Henk-Jaap Wagenaar

Change by Henk-Jaap Wagenaar :


--
nosy: +Henk-Jaap Wagenaar

___
Python tracker 

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



[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-03 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +brett.cannon, eric.snow, ncoghlan
title: Strange failure in test_cgitb -> 
test.test_imp.ImportTests.test_load_source has side effects
versions: +Python 3.7

___
Python tracker 

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



[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

Attached PR 3871 fixes the side effect in test_imp, but I'm not sure that it's 
the best fix. Maybe load_source() should use a "transaction" to restore 
attributes on failure?

load_source() seems to be used imp.reload() for example. Do you expect this 
function to restore the imported module to its original state on failure?

--

___
Python tracker 

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



[issue31676] test.test_imp.ImportTests.test_load_source has side effects

2017-10-03 Thread STINNER Victor

Change by STINNER Victor :


--
keywords: +patch
pull_requests: +3849
stage:  -> patch review

___
Python tracker 

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



[issue31669] string.Template: code, docs and PEP all disagree on definition of identifier

2017-10-03 Thread Thomas Jollans

Thomas Jollans  added the comment:

Should the PEP be clarified?

--
title: string.Template: cods, docs and PEP all disagree on definition of 
identifier -> string.Template: code, docs and PEP all disagree on definition of 
identifier

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-10-03 Thread Nick Coghlan

Nick Coghlan  added the comment:

No, I'm not currently working on this (to be completely honest, I entirely 
forgot we hadn't backported the What's New updates to the various branches).

They'll need to be independent updates, since they affect a different file for 
each release (although they can then be cherry-picked forward into the 
development branch)

--

___
Python tracker 

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



[issue31669] string.Template: code, docs and PEP all disagree on definition of identifier

2017-10-03 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

PEPs aren't really intended to be ongoing specs, keeping up with implementation 
changes.  The documentation is pretty clear in defining identifiers as "any 
case-insensitive ASCII alphanumeric string (including underscores) that starts 
with an underscore or ASCII letter".

--

___
Python tracker 

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



[issue31678] Incorrect C Function name for timedelta

2017-10-03 Thread Mironov Mikhail

Change by Mironov Mikhail :


--
keywords: +patch
pull_requests: +3850
stage:  -> patch review

___
Python tracker 

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



[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I don't think there is a problem which is worth to be solved by PR 3867. It is 
very unlikely that anyone uses re functions with a pattern and float flags 
which accidentally matches already cached valid pattern and integer flag. If 
float value is passed as a flag it is likely is passed the first time. 
Fractional floats are rejected in any case. This is different from the problem 
with PR 3862.

--

___
Python tracker 

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



[issue31672] string.Template should use re.ASCII flag

2017-10-03 Thread INADA Naoki

Change by INADA Naoki :


--
keywords: +patch
pull_requests: +3851
stage:  -> patch review

___
Python tracker 

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



[issue31672] string.Template should use re.ASCII flag

2017-10-03 Thread INADA Naoki

INADA Naoki  added the comment:

> This means if someone does subclass string.Template and changes the pattern 
> to accept Unicode identifiers, then with this change they will also have to 
> modify flags, whereas before they didn't.

Thank you for pointing it out.
I removed re.A flag after compilation.

> OTOH, making the change for performance reasons might be questionable, given 
> that the regular expressions are compiled by the Template's metaclass, so 
> unlikely to contribute significantly to overall performance wins.

original: import time:  2310 |   9589 | string
patched:  import time:  1420 |   8702 | string

We can save about 900 us.

--
stage: patch review -> 

___
Python tracker 

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



[issue31672] string.Template should use re.ASCII flag

2017-10-03 Thread INADA Naoki

Change by INADA Naoki :


--
stage:  -> patch review
type:  -> behavior

___
Python tracker 

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



[issue31415] Add -X option to show import time

2017-10-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This is pretty useless on Windows because you are using a clock with 15-16 
milli (not micro) second resolution on Windows.  Before Victor introduced 
time.perf_counter, with decent behavior on all systems, timeit used different 
time module functions on Windows and *nix because the two different functions 
had such different behavior on the two systems.  I believe it used time.clock 
on Windows (1 second resolution of *nix?) and time.time otherwise (.016 sec 
resolution on Windows).  

Time.monotonic seems to be based on time.time as it has the same low resolution 
on Windows.  Run something like

for i in range(1000): time.monotonic()

and you will see identical times except for 1 or 2 jumps of .016.  So the C 
equivalent or time.clock or time.perf_counter is needed on Windows.  Victor can 
advise as he knows this better than me.

An example of nearly useless output, with 15-16 millisecond resolution.

f:\dev\3x>python -X importtime -c "import idlelib.pyshell"
Running Debug|Win32 interpreter...
import time: self [us] | cumulative | imported package
import time: 0 |  0 | _codecs
import time: 0 |  0 |   codecs
import time: 0 |  0 |   encodings.aliases
import time: 15000 |  15000 | encodings
import time: 0 |  0 | encodings.utf_8
import time: 0 |  0 | _signal
import time: 0 |  0 | encodings.latin_1
import time: 0 |  0 | _weakrefset
import time: 0 |  0 |   abc
import time: 0 |  0 | io
import time: 0 |  0 |   _stat
import time: 0 |  0 | stat
import time: 0 |  0 |   genericpath
import time: 0 |  0 | ntpath
import time: 0 |  0 | _collections_abc
import time: 16000 |  16000 |   os
import time: 0 |  0 |   _sitebuiltins
import time: 0 |  0 |   sitecustomize
import time: 0 |  0 |   usercustomize
import time: 16000 |  32000 | site
import time: 0 |  0 |   idlelib
import time: 0 |  0 |   types
import time: 0 |  0 |   _collections
import time: 0 |  0 | enum
import time: 16000 |  16000 | _tkinter
import time: 0 |  0 | tkinter.constants
import time: 0 |  0 | _sre
import time: 0 |  0 |   sre_constants
import time: 0 |  0 | sre_parse
import time: 0 |  0 |   sre_compile
import time: 0 |  0 | _functools
import time: 0 |  0 | _operator
import time: 0 |  0 |   operator
import time: 0 |  0 |   keyword
import time: 0 |  0 | _heapq
import time: 0 |  0 |   heapq
import time: 0 |  0 |   itertools
import time: 15000 |  15000 |   reprlib
import time: 0 |  15000 | collections
import time: 0 |  15000 |   functools
import time: 0 |  0 |   _locale
import time: 0 |  0 |   copyreg
import time: 16000 |  31000 | re
import time: 0 |  47000 |   tkinter
import time: 0 |  0 | tkinter.commondialog
import time: 16000 |  16000 |   tkinter.messagebox
import time: 0 |  0 |   token
import time: 0 |  0 | tokenize
import time: 0 |  0 |   linecache
import time: 0 |  0 | traceback
import time: 15000 |  15000 |   __future__
import time: 0 |  15000 | codeop
import time: 0 |  15000 |   code
import time: 0 |  0 |   time
import time: 0 |  0 |   signal
import time: 0 |  0 |   warnings
import time: 0 |  0 |   errno
import time: 0 |  0 |   threading
import time: 0 |  0 |   msvcrt
import time: 0 |  0 |   _winapi
import time: 16000 |  16000 | subprocess
import time: 16000 |  32000 |   platform
import time: 0 |  0 | _socket
import time: 0 |  0 |   collections.abc
import time: 0 |  0 |   math
import time: 0 |  0 |   select
import time: 0 |  0 | selectors
import time: 15000 |  15000 |   socket
import time: 16000 |  16000 |   configparser
import time: 0 |  0 |   tkinter.font
import time: 0 |  0 |   _bootlocale
import time: 0 |  0 |   encodings.cp1252
import time: 31000 |  47000 | idlelib.config
import time: 0 |  0 |

[issue31668] "fixFirefoxAnchorBug" function in doctools.js causes navigating problem in Py3 doc in Chrome

2017-10-03 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:

Is there anything to be done in CPython? It appears to be either a bug with the 
browser or Sphinx...

--
nosy: +Mariatta

___
Python tracker 

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



[issue31657] unit test for optimization levels does not cover __debug__ case

2017-10-03 Thread Mariatta Wijaya

Mariatta Wijaya  added the comment:


New changeset 543386b7f077d210ea0722079d68beb6c066730a by Mariatta (diana) in 
branch 'master':
bpo-31657: Add test coverage for the __debug__ case (GH-3450)
https://github.com/python/cpython/commit/543386b7f077d210ea0722079d68beb6c066730a


--
nosy: +Mariatta

___
Python tracker 

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



[issue31668] "fixFirefoxAnchorBug" function in doctools.js causes navigating problem in Py3 doc in Chrome

2017-10-03 Thread fireattack

fireattack  added the comment:

Well, since it affects Python's site's functionality, I thought it's 
appropriate to report here (with components: documentation). I followed the 
instruction here: https://docs.python.org/3/bugs.html#documentation-bugs

It is not Sphinx's bug per se, since it has nothing to do with its software; 
just an ancient problematic script in template got copied here. 

It is not a Chrome bug, since that script was not intended to apply to Chrome 
to begin with.

But anyway, if anyone found it's not the right place, feel free to close it.

--

___
Python tracker 

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



[issue31679] pydot missing write, write_png, etc

2017-10-03 Thread John Brearley

New submission from John Brearley :

I have successfully installed Graphviz tool from http://graphviz.org, updated 
my PATH variable appropriately and can generate .PNG files using Python module 
Graphviz with WinPython 3.6.1. However, I cannot get anywhere using the pydot 
V1.2.3 module in the same environment. 

The online help suggests that there there are write & write_png members but I 
can find no trace of them. My sample script is attached. The error I get is:

Traceback (most recent call last):
  File "ML_ex2.py", line 109, in 
graph.write(path=out_fn, format="png")
AttributeError: 'list' object has no attribute 'write'

--
components: Extension Modules
files: ML_ex2.py
messages: 303632
nosy: jbrearley
priority: normal
severity: normal
status: open
title: pydot missing write, write_png, etc
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47186/ML_ex2.py

___
Python tracker 

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



[issue31679] pydot missing write, write_png, etc

2017-10-03 Thread Zachary Ware

Zachary Ware  added the comment:

pydot is not part of the standard library; you'll need to find their issue 
tracker (looks like maybe https://github.com/erocarrera/pydot/issues?) and open 
a ticket there.

--
nosy: +zach.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



[issue31670] Associate .wasm with application/wasm

2017-10-03 Thread R. David Murray

R. David Murray  added the comment:

We generally wait for something a bit stronger than "tentatively" before adding 
a mime type (ie: an actual submission to the relevant standards channel).

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



[issue31583] 2to3 call for file in current directory yields error

2017-10-03 Thread Jonathan Abdo

Jonathan Abdo  added the comment:

Issue also effects 3.5

--
nosy: +jabdo
versions: +Python 3.5
Added file: https://bugs.python.org/file47187/2to3bugpython.png

___
Python tracker 

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



[issue31583] 2to3 call for file in current directory yields error

2017-10-03 Thread R. David Murray

R. David Murray  added the comment:

3.5 is in security-fix-only mode, and we use versions to indicate which 
versions we plan to fix the bug in.

--
nosy: +r.david.murray
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



[issue31583] 2to3 call for file in current directory yields error

2017-10-03 Thread Jonathan Abdo

Jonathan Abdo  added the comment:

Gotcha, sorry about that. Active uses 3.5, so I guess I would take it up
with them?

On Oct 3, 2017 2:27 PM, "R. David Murray"  wrote:

>
> R. David Murray  added the comment:
>
> 3.5 is in security-fix-only mode, and we use versions to indicate which
> versions we plan to fix the bug in.
>
> --
> nosy: +r.david.murray
> versions:  -Python 3.5
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue31673] Fix the name of Tkinter's adderrorinfo method

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 929b40a601db868530d6beaafb3256822103a7fb by Serhiy Storchaka in 
branch 'master':
bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). (#3864)
https://github.com/python/cpython/commit/929b40a601db868530d6beaafb3256822103a7fb


--

___
Python tracker 

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



[issue31583] 2to3 call for file in current directory yields error

2017-10-03 Thread R. David Murray

R. David Murray  added the comment:

Yes, redistributors sometimes backport non-security fixes if they consider them 
important enough.

Note that I haven't evaluated the merits of this issue, and there is a related 
issue about how 2to3 finds its fixers that this may overlap with.

--

___
Python tracker 

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



[issue31673] Fix the name of Tkinter's adderrorinfo method

2017-10-03 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +3852

___
Python tracker 

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



[issue31673] Fix the name of Tkinter's adderrorinfo method

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset fcc832a4fafcbbaca5484ed0274935e14c9dcf6b by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). 
(GH-3864). (#3873)
https://github.com/python/cpython/commit/fcc832a4fafcbbaca5484ed0274935e14c9dcf6b


--

___
Python tracker 

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



[issue31680] Expose curses library name and version on Python level

2017-10-03 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

The name and the version of the curses library are needed for work around bugs 
in old versions or skip tests on platforms that provide broken curses library 
(like OpenBSD providing ncurses 5.7).

The curses and _curses modules provide the attribute "version" (= b'2.2'), but 
this is just a version of the module.

--
components: Extension Modules
messages: 303640
nosy: serhiy.storchaka, twouters
priority: normal
severity: normal
status: open
title: Expose curses library name and version on Python level
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-03 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +3853

___
Python tracker 

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



[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 27c623c845dd6e4b8e1782666ca3a956636da266 by Serhiy Storchaka in 
branch 'master':
bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (#3866)
https://github.com/python/cpython/commit/27c623c845dd6e4b8e1782666ca3a956636da266


--

___
Python tracker 

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



[issue31681] pkgutil.get_data() leaks open files in Python 2.7

2017-10-03 Thread Elvis Pranskevichus

New submission from Elvis Pranskevichus :

pkgutil.get_data() does this:

 def get_data(self, pathname):
return open(pathname, "rb").read()

which very obviously leaks open file descriptors.  This has been fixed in 3.x 
by https://github.com/python/cpython/commit/1ab58dfb12dedb7, but never 
backported to 2.7.

--
components: Library (Lib)
messages: 303642
nosy: Elvis.Pranskevichus
priority: normal
severity: normal
status: open
title: pkgutil.get_data() leaks open files in Python 2.7
type: resource usage
versions: Python 2.7

___
Python tracker 

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



[issue31680] Expose curses library name and version on Python level

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

How can we get the ncurses version?

--
nosy: +haypo

___
Python tracker 

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



[issue31680] Expose curses library name and version on Python level

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

On Fedora 26, /usr/include/ncurses/curses.h contains:
---
/* These are defined only in curses.h, and are used for conditional compiles */
#define NCURSES_VERSION_MAJOR 6
#define NCURSES_VERSION_MINOR 0
#define NCURSES_VERSION_PATCH 20170212

/* This is defined in more than one ncurses header, for identification */
#undef  NCURSES_VERSION
#define NCURSES_VERSION "6.0"

/*
 * Identify the mouse encoding version.
 */
#define NCURSES_MOUSE_VERSION 2
---

You want to expose such versions? Do you know if there are "curses" 
implementations different than GNU ncurses?
https://www.gnu.org/software/ncurses/

I'm asking to know how other implementations expose their versions.

--

___
Python tracker 

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



[issue31681] pkgutil.get_data() leaks open files in Python 2.7

2017-10-03 Thread Elvis Pranskevichus

Change by Elvis Pranskevichus :


--
keywords: +patch
pull_requests: +3854
stage:  -> patch review

___
Python tracker 

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



[issue31680] Expose curses library name and version on Python level

2017-10-03 Thread STINNER Victor

STINNER Victor  added the comment:

> The name and the version of the curses library are needed for work around 
> bugs in old versions or skip tests on platforms that provide broken curses 
> library (like OpenBSD providing ncurses 5.7).

If there are known issues depending on the ncurses version, it may help to 
export this version in the test.pythoninfo utility. Do you have an example of 
known bug? Do we already skip tests depending on the ncurses version?

--

___
Python tracker 

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



[issue31583] 2to3 call for file in current directory yields error

2017-10-03 Thread Jonathan Abdo

Jonathan Abdo  added the comment:

Inserting (with 12 spaces)

if not output_dir:
output_dir = "./"

at lines 83 and 84 works as a temporary workaround.  `StdoutRefactoringTool` is 
not receiving an `output_dir` from `option`, which seems to only be an issue 
when `--add-sufix` is used.

--

___
Python tracker 

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



[issue31675] Tkinter: memory leak in splitlines() and split()

2017-10-03 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset a65b2420f681c45db43e94bfe3dc50ad1dfcd03d by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() 
(GH-3866) (#3874)
https://github.com/python/cpython/commit/a65b2420f681c45db43e94bfe3dc50ad1dfcd03d


--

___
Python tracker 

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



[issue31623] Allow to build MSI installer from the official tarball

2017-10-03 Thread Zachary Ware

Zachary Ware  added the comment:

As 3.4 is in security-fix-only mode, it's up to Larry whether this can be 
merged.  The patch looks fine as far as I can tell, but I can't test it.

Note, though, that you are likely to be the only person on Earth using this 
installer, since there will be no more binary releases of 3.4, the installer 
was swapped out for 3.5, and the maintainer of the old installer has been away 
for several years now.  The new installer (in use since 3.5.0) almost certainly 
doesn't suffer from this issue.

--
nosy: +larry

___
Python tracker 

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



[issue31682] Exception: Cannot import `win32api`!

2017-10-03 Thread Monica

New submission from Monica :

Hello, I'm a newbie at Python. I am trying to download Twister to be able to 
run hardware tests, and it gives me Exception: Cannot import `win32api`!.
I downloaded 'win32_221' and added it to C:\Python27\Scripts

It is still giving me the same error.

This is what I got

TWISTER_PATH is set to 
`C:\Users\user\Documents\Twister-git_hub_branch\client\executionprocess`.

Traceback (most recent call last):
  File 
"C:\Users\user\Documents\Twister-git_hub_branch\client\executionprocess\ExecutionProcess.py",
 line 1563, in 
raise Exception('Cannot import `win32api`!\n')
Exception: Cannot import `win32api`!

--
components: Installation
messages: 303650
nosy: maolvera
priority: normal
severity: normal
status: open
title: Exception: Cannot import `win32api`!
versions: Python 2.7

___
Python tracker 

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



[issue31683] a stack overflow on windows in faulthandler._fatal_error()

2017-10-03 Thread Oren Milman

New submission from Oren Milman :

On my 64-bit Windows 10, the echo here would print -1073741571:
python -c "import faulthandler; faulthandler._fatal_error(b'a' * 2 ** 22)"
echo %errorlevel%

This is code c0fd, which windbg describes as 'Stack overflow'.
This happens because Py_FatalError() (in Python/pylifecycle.c) does the 
following
(on Windows only):
len = strlen(msg);

/* Convert the message to wchar_t. This uses a simple one-to-one
conversion, assuming that the this error message actually uses ASCII
only. If this ceases to be true, we will have to convert. */
buffer = alloca( (len+1) * (sizeof *buffer));
for( i=0; i<=len; ++i)
buffer[i] = msg[i];


Note that (IIUC) running the aforementioned cmd wouldn't cause a post-mortem
debugger to pop-up, because faulthandler_fatal_error_py()
(in Modules/faulthandler.c) first calls faulthandler_suppress_crash_report(),
and then calls Py_FatalError().

--
components: Extension Modules
messages: 303651
nosy: Oren Milman, haypo
priority: normal
severity: normal
status: open
title: a stack overflow on windows in faulthandler._fatal_error()
type: crash
versions: Python 3.7

___
Python tracker 

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



  1   2   >