[issue31557] tarfile: incorrectly treats regular file as directory

2017-10-03 Thread Nitish
Nitish added the comment: Try 'tar xvf test.tar'. On Linux machine at least, it is in fact producing a tree of directories. Not a single file. So - in a way what Python is reporting is correct. -- ___ Python tracker

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

2017-10-03 Thread INADA Naoki
INADA Naoki added the comment: Current pull request override `Template.flags = re.I` after class creation for backward compatibility, without any API change. But I'm not sure it's right approach. How many people who subclass string.Template expect non-ASCII match? If this change is bugfix for

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

2017-10-03 Thread INADA Naoki
INADA Naoki added the comment: > Yet one way -- make re.ASCII a local flag. Than we could just change the > idpattern attribute to r'(?a:[_a-z][_a-z0-9]*)', without touching the flags > attribute. https://docs.python.org/3.6/library/re.html#regular-expression-syntax says `(?imsx-imsx:...)` A

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

2017-10-03 Thread INADA Naoki
INADA Naoki added the comment: > When optimizing, please don't make API changes. This is not only optimization, but bugfix. Document of string.Template says: > By default, "identifier" is restricted to any case-insensitive ASCII > alphanumeric string (including underscores) that starts with

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-03 Thread Mark Dickinson
Mark Dickinson added the comment: The aim here is to capture the original Decimal value where possible, including the exponent information. (Unlike floats, trailing zeros in a `Decimal` instance are significant.) >>> from decimal import Decimal >>> Decimal('+0.000e+19') Decima

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

2017-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet one way -- make re.ASCII a local flag. Than we could just change the idpattern attribute to r'(?a:[_a-z][_a-z0-9]*)', without touching the flags attribute. -- ___ Python tracker

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-03 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +facundobatista, mark.dickinson, rhettinger, skrah ___ Python tracker ___ ___ Python-bugs-list

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

2017-10-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: When optimizing, please don't make API changes. -- nosy: +rhettinger ___ Python tracker ___ ___

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

2017-10-03 Thread INADA Naoki
INADA Naoki added the comment: New changeset bf477a99e0c85258e6573f4ee9eda68fa1f98a31 by INADA Naoki in branch 'master': bpo-31677: email: Remove re.IGNORECASE flag (GH-3868) https://github.com/python/cpython/commit/bf477a99e0c85258e6573f4ee9eda68fa1f98a31 -- ___

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

2017-10-03 Thread INADA Naoki
INADA Naoki added the comment: > 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".

[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread INADA Naoki
INADA Naoki added the comment: > When proposing to undo recent decisions, please add the people to the nosy > list who were involved in making that decision in the first place. I don't propose reverting IntFlag. I just propose convert IntFlag to int in re module, before passing it to sre_comp

[issue31671] IntFlag makes re.compile slower

2017-10-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: When proposing to undo recent decisions, please add the people to the nosy list who were involved in making that decision in the first place. -- nosy: +ethan.furman, gvanrossum, rhettinger ___ Python tracker

[issue31415] Add -X option to show import time

2017-10-03 Thread STINNER Victor
STINNER Victor added the comment: > Could we change PyTime_GetMonotonicClock implementation to use it on Windows? No. See the PEP 418 for the rationale. But we could add a _PyTime_GetPerfCounter() to Python/pytime.c. -- ___ Python tracker

[issue31415] Add -X option to show import time

2017-10-03 Thread INADA Naoki
INADA Naoki added the comment: https://github.com/python/cpython/blob/27c623c845dd6e4b8e1782666ca3a956636da266/Modules/timemodule.c#L80-L112 time module has perf_counter implementation based on QueryPerformanceCounter(). Could we change PyTime_GetMonotonicClock implementation to use it on Wind

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

2017-10-03 Thread STINNER Victor
STINNER Victor added the comment: I proposed PR 3878 to replace alloca() with a fixed buffer of 256 bytes. -- ___ Python tracker ___ ___

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

2017-10-03 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +3856 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue31686] GZip library doesn't properly close files

2017-10-03 Thread Jake Lever
New submission from Jake Lever : The attached code is designed to output compressed data to a gzip file. It creates two GzipFile objects, but only one is really used. It seems that it doesn't clean up and close the file properly. In Py2, the attached code will fail. The output file (debug.txt.

[issue31670] Associate .wasm with application/wasm

2017-10-03 Thread R. David Murray
R. David Murray added the comment: Yes, if/when it goes in it will go in to all currently maintained versions. I've adjusted 'versions' accordingly. -- versions: -Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue31670] Associate .wasm with application/wasm

2017-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, updates of the mimetype database usually are backported to 2.7. -- nosy: +serhiy.storchaka ___ Python tracker ___ _

[issue31685] Cannot connect to CE path `127.0.0.1:8010`

2017-10-03 Thread Zachary Ware
Change by Zachary Ware : -- components: -Demos and Tools type: compile error -> ___ Python tracker ___ ___ Python-bugs-list mailing

[issue31685] Cannot connect to CE path `127.0.0.1:8010`

2017-10-03 Thread Zachary Ware
Zachary Ware added the comment: This issue does not appear to have anything to do with the CPython interpreter or standard library, and this issue tracker is not a help forum. Please try python-l...@python.org for assistance, but you'll need to provide the other users of the list significant

[issue31670] Associate .wasm with application/wasm

2017-10-03 Thread Brad Nelson
Brad Nelson added the comment: Tentative might be an understatement. There was 4 browser sign-off on using that mime type within the WebAssembly CG, which has drafted the spec so far. We're in the process of handing v1 of the spec off to the WebAssembly Working Group on our way to a good and p

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

2017-10-03 Thread STINNER Victor
STINNER Victor added the comment: I suggest: curses._NCURSES_VERSION_INFO = (6, 0, 20170212) curses._NCURSES_VERSION = "6.0" curses._NCURSES_MOUSE_VERSION = 2 Similar example, the readline module uses: PyModule_AddIntConstant(m, "_READLINE_VERSION", RL_READLINE_VERSION); PyModule_AddI

[issue31685] Cannot connect to CE path `127.0.0.1:8010`

2017-10-03 Thread Monica
New submission from Monica : Is there any reason it cannot connect to CE path? C:\Users\Documents\Twister-git_hub_branch\client\executionprocess>ExecutionProcess.py -u user -e EP-name -s 127.0.0.1:8010 TWISTER_PATH is set to `C:\Users\Documents\Twister-git_hub_branch\client\executionprocess`.

[issue31557] tarfile: incorrectly treats regular file as directory

2017-10-03 Thread Joe Tsai
Joe Tsai added the comment: This bug is not platform specific. I've attached a reproduction: $ python >>> import tarfile >>> tarfile.open("test.tar", "r").next().isdir() True $ tar -tvf test.tar -rw-rw-r-- 0/0 0 1969-12-31 16:00 123456789/123456789/123456789/123456789/123456789/

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

2017-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this is what I meant. The version should be exposed as a tuple (major, minor, patch) or as a special named tuple. I don't know what to do with other implementations. NCURSES_VERSION_MAJOR is not a part of standard. One solution -- set the version to (0

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-03 Thread Aaron Meurer
New submission from Aaron Meurer : >>> '{:+.19e}'.format(0.) '+0.000e+00' >>> import decimal >>> '{:+.19e}'.format(decimal.Decimal(0)) '+0.000e+19' Note the decimal uses e+19 instead of e+00. Obviously it's still mathematically correct, but it's annoying to have

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

2017-10-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue31682] Exception: Cannot import `win32api`!

2017-10-03 Thread Zachary Ware
Zachary Ware added the comment: win32api is part of the third-party pywin32 package, which is most easily installed by running `C:\Python27\python.exe -m pip install pypiwin32`. For further assistance, please try either the comp.lang.python list at python-l...@python.org, the pywin32 list at

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

2017-10-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +3855 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[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() (

[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

[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

[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/a65b

[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 `--ad

[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

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

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

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

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

[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

[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

[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 "versio

[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/fcc832a4fafcbbaca5484ed027493

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

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

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

[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

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

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

[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

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

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

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

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

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

[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

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

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

[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

[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

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

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

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

[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

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

[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

[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

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

[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__]) ---

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

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

[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

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

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

[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() pe

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

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

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

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

[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

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

[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

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

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

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

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

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

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

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

[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/r

[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

[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

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

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

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

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

[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

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

[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

  1   2   >