[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2016-02-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 81dba6e392c3 by Serhiy Storchaka in branch '2.7': Issue #25698: Importing module if the stack is too deep no longer replaces https://hg.python.org/cpython/rev/81dba6e392c3 New changeset 1c2de3b0a474 by Serhiy Storchaka in branch '3.5': Issue #25698:

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > That seems fine except you might as well just put the GetWithError prototype > in the header file. Yes, of course. It was temporary placed here to avoid rebuilding all sources. Thank you Barry and Benjamin for investigating this issue. -- assignee

[issue25985] Use sys.version_info instead of sys.version

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses SilentGhosts comments. -- Added file: http://bugs.python.org/file41880/use_version_info_3.patch ___ Python tracker ___

[issue25985] Use sys.version_info instead of sys.version

2016-02-10 Thread SilentGhost
SilentGhost added the comment: No further comments from me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26289] Optimize floor division for ints

2016-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: A couple more observations: 1. I think you're missing the final multiplication by Py_SIZE(b) in the fast_mod code. Which is odd, because your tests should catch that. So either you didn't run the tests, or that code path isn't being used somehow. 2. Talking o

[issue25994] File descriptor leaks in os.scandir()

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Martins comments. -- Added file: http://bugs.python.org/file41881/scandir_close_4.patch ___ Python tracker ___ ___

[issue26320] Web documentation for 2.7 has unreadable highlights in Table of Contents

2016-02-10 Thread Georg Brandl
Georg Brandl added the comment: That's possible. I'll have a look. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue25994] File descriptor leaks in os.scandir()

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: scandir_close_4.patch LGTM, I just added a comment on test_os.py, you may factorize the code. -- ___ Python tracker ___ ___

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: > The test suite can be run directly from the source tree. The test suite > includes timing information for individual tests and for the the entire test. > Sample invocation: I extracted the slowest test (test_polyroots_legendre) and put it in a loop of 5 ite

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Victor proposed in issue25994 to use special context manager to check that no ResourceWarning is emitted. I think that this helper can be useful in other tests. It saves 3 lines for every use. Proposed patch adds it in test.support. -- components:

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Oh, I didn't expect that so many existing test already use the same pattern to check for ResourceWarning. Nice patch! I added a comment: we must be careful in the documentation of the helper. -- ___ Python tracker

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Martin Panter
Martin Panter added the comment: I was about to suggest adding this to test.support as well. Patch looks good to me. -- nosy: +martin.panter ___ Python tracker ___ _

[issue26326] Named entity "vertical line" missed in 2.7 htmlentitydefs.py

2016-02-10 Thread Andreas Röhler
New submission from Andreas Röhler: Shouldn't a named entity "vbar" or "vline" be part of dict in htmlentitydefs.py? Thanks, Andreas -- messages: 260003 nosy: andreas.roehler priority: normal severity: normal status: open title: Named entity "vertical line" missed in 2.7 htmlentityd

[issue24015] timeit should start with 1 loop, not 10

2016-02-10 Thread Tamás Bence Gedai
Tamás Bence Gedai added the comment: I don't know what happened to this issue, but it looks good to me. So here is a patch for it as Joachim suggested. $ time ./python -m timeit "import time; time.sleep(1.0)" 1 loops, best of 3: 1 sec per loop real0m4.134s user0m0.116s sys 0m0.004s

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Addressed Victor's comments. This pattern is not widely used. Usually only raising ResourceWarning is tested, but not non-raising. -- Added file: http://bugs.python.org/file41885/test_support_check_no_resource_warning_2.patch __

[issue26320] Web documentation for 2.7 has unreadable highlights in Table of Contents

2016-02-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5715a6d9ff12 by Georg Brandl in branch '2.7': Closes #26320: fix stylesheet after Sphinx update. https://hg.python.org/cpython/rev/5715a6d9ff12 -- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed __

[issue26320] Web documentation for 2.7 has unreadable highlights in Table of Contents

2016-02-10 Thread Georg Brandl
Georg Brandl added the comment: Should be fixed now (a rebuild of the online docs will be done within a few hours). Thanks for the report! -- ___ Python tracker ___

[issue26327] File > Save in IDLE shell window not working

2016-02-10 Thread Sebastian Bank
New submission from Sebastian Bank: Under Python 2.7.11 (Win 7), saving of the IDLE shell output produces no file if the output contains non-ASCII characters, e.g. after doing (before this, it does work): >>> print u'sp\xe4m' späm >>> When saving (generally), the cursor also moves to the nex

[issue26328] shutil._copyxattr() function shouldn't fail if setting security.selinux xattr fails

2016-02-10 Thread Laurent Bigonville
New submission from Laurent Bigonville: Hi, In the _copyxattr() function from the shutil module, the function throw an exception as soon as the copy of an attribute is failing. But setting the "security.selinux" xattr will likely fail if selinux is enforcing more. If this function is suppose

[issue24015] timeit should start with 1 loop, not 10

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that only one loop is not enough to get reliable result. The first loop often has an overhead. -- nosy: +serhiy.storchaka ___ Python tracker

[issue26326] Named entity "vertical line" missed in 2.7 htmlentitydefs.py

2016-02-10 Thread Kevin Dwyer
Kevin Dwyer added the comment: The docs describe the entitydefs mapping as "A dictionary mapping XHTML 1.0 entity definitions to their replacement text in ISO Latin-1". Neither 'vbar' nor 'vline' seem to be part of the xhtml entity definitions (https://www.w3.org/TR/xhtml1/dtds.html). The ent

[issue17956] add ScheduledExecutor

2016-02-10 Thread Tin Tvrtković
Tin Tvrtković added the comment: It's a shame this has been stuck in review for 2.5 years, I could really use something like this right now. neologix, why don't you put this up on PyPI for a while, at least? -- nosy: +tinchester ___ Python tracker

[issue26328] shutil._copyxattr() function shouldn't fail if setting security.selinux xattr fails

2016-02-10 Thread Laurent Bigonville
Laurent Bigonville added the comment: SELinux would block setting the "security.selinux" attribute with EACCES not EPERM, so another solution could be to add errono.EACCES to the list -- ___ Python tracker ___

[issue24015] timeit should start with 1 loop, not 10

2016-02-10 Thread Tamás Bence Gedai
Tamás Bence Gedai added the comment: Then maybe the docs should be clarified. "If -n is not given, a suitable number of loops is calculated by trying successive powers of 10 (starting from 10) until the total time is at least 0.2 seconds." -- ___

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2016-02-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks for digging deeply and fixing this! -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Fred Rolland
New submission from Fred Rolland: Hi, os.path.normpath("//") returns '//' I would expect to be '/' >>> os.path.normpath("//") '//' >>> os.path.normpath("///") '/' >>> os.path.normpath("") '/' -- components: Library (Lib) messages: 260016 nosy: Fred Rolland priority: normal severit

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': On Python 3.4, Windows 7: >>> import shutil, os >>> path = 'psuugxik1s0è' >>> os.stat(path) os.stat_result(st_mode=33206, st_ino=6755399441249628, st_dev=3158553679, st_nlink=1, st_uid=0, st_gid=0, st_size=27136, st_atime=1455 116789, st_mtime=1455116789,

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: >total, free = nt._getdiskusage(path) > NotADirectoryError: [WinError 267] The directory name is invalid The underlying C function is GetDiskFreeSpaceEx(): https://msdn.microsoft.com/fr-fr/library/windows/desktop/aa364937%28v=vs.85%29.aspx It takes a lpDire

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread STINNER Victor
Changes by STINNER Victor : -- assignee: -> docs@python components: +Documentation, Windows nosy: +docs@python, paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Emanuel Barry
Changes by Emanuel Barry : -- assignee: -> serhiy.storchaka nosy: +ebarry, serhiy.storchaka stage: -> needs patch type: -> behavior ___ Python tracker ___

[issue26289] Optimize floor division for ints

2016-02-10 Thread Yury Selivanov
Yury Selivanov added the comment: Attaching an updated patch. > 1. I think you're missing the final multiplication by Py_SIZE(b) in the > fast_mod code. Which is odd, because your tests should catch that. So either > you didn't run the tests, or that code path isn't being used somehow. Thanks

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: You are right, my bad. I'll fix doc mentioning that on Windows "path" can only be a directory (on UNIX it can also be a file). -- ___ Python tracker ___

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: > You are right, my bad. No problem. I read the doc before replying, and it is not said that the path must exist or must be a directory: https://docs.python.org/dev/library/shutil.html#shutil.disk_usage > I'll fix doc mentioning that on Windows "path" can only

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Different but kind of related, disk_usage() is not able to accept bytes: >>> shutil.disk_usage(b'.') Traceback (most recent call last): File "", line 1, in File "C:\python34\lib\shutil.py", line 989, in disk total, free = nt._getdiskusage(path) TypeE

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: > Different but kind of related, disk_usage() is not able to accept bytes: On Python 3, I don't think that it's a big issue: bytes filenames are deprecated. See the current thread on python-dev: https://mail.python.org/pipermail/python-dev/2016-February/143150.

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue636648. This is intended behavior. It was introduced in changeset 01d5b80a3c03. >From the POSIX Specification [1]: """ A pathname consisting of a single shall resolve to the root directory of the process. A null pathname shall n

[issue26289] Optimize floor division for ints

2016-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the updates! No further comments from me - the patch looks good as far as I'm concerned. -- ___ Python tracker ___ _

[issue26289] Optimize floor division for ints

2016-02-10 Thread Yury Selivanov
Changes by Yury Selivanov : Added file: http://bugs.python.org/file41887/fast_divmod_6.patch ___ Python tracker ___ ___ Python-bugs-list maili

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

2016-02-10 Thread Erik Purins
Changes by Erik Purins : -- nosy: +epu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Georg Brandl
New submission from Georg Brandl: As discussed on python-ideas: https://mail.python.org/pipermail/python-ideas/2016-February/038354.html The rules are: Underscores are allowed anywhere in numeric literals, except: * at the beginning of a literal (obviously) * at the end of a literal * directl

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2016-02-10 Thread Justin Mayfield
Justin Mayfield added the comment: Alexander, That sounds unrelated. I'd treat it as a new issue until you have concrete evidence to the contrary. Also on face value it sounds like it might just be your operating systems open file limit. On OSX I think the default open file limit is in the

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: serhiy.storchaka -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25228] Regression in cookie parsing with brackets and quotes

2016-02-10 Thread Collin Anderson
Collin Anderson added the comment: The issue I'm currently running into, is that although browsers correctly ignore invalid Set-Cookie values, they allow 'any CHAR except CTLs or ";"' in cookie values set via document.cookie. So, if you say document.cookie = 'key=va"lue; path=/', the browser w

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I prefer simpler and more strict rule: * Underscores are allowed only between digits in numeric literals. Thus 1__2, 12_, 1_.2, 1_e2, 1e_2, 1_j, 0x_12 are not allowed. It is easier to make the rule more lenient later if it will be needed. -- nosy: +

[issue26332] OSError: exception: access violation writing <...> (Windows 10 x64, Python 3.5.1)

2016-02-10 Thread JK
New submission from JK: Hi! I came across this mysterious bug the other week, and I haven't yet found any resolution to it. In my case, I am using a proprietary 3rd party C/C++ DLL for functionality within Python, however I've come across a few others who have run into the same issue with an

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Georg Brandl
Georg Brandl added the comment: It sure is more strict, but I don't think it's simpler (and it's definitely not simpler to implement). (Also 1_j is pretty nice, I wouldn't want to lose that.) We can also check what other languages do. * Rust: very much like this, but trailing underscores allo

[issue26333] Multiprocessing imap hangs when generator input errors

2016-02-10 Thread Aaron Halfaker
New submission from Aaron Halfaker: multiprocessing.imap will hang and not raise an error if an error occurs in the generator that is being mapped over. I'd expect the error to be raised and/or the process to fail. For example, run the following code in python 2.7 or 3.4: from multipro

[issue26333] Multiprocessing imap hangs when generator input errors

2016-02-10 Thread SilentGhost
Changes by SilentGhost : -- nosy: +jnoller, sbt versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: * Java: only between digits. [1] * Julia: only between digits. [2] (not well specified) * C# 7.0 (proposal): only between digits, but adjacent underscores allowed. [3] * Ada: only between digits. [4] (strong but very simple rules) * D: very much like proposed p

[issue26334] bytes.translate() doesn't take keyword arguments; docs suggests it does

2016-02-10 Thread Nicholas Chammas
New submission from Nicholas Chammas: The docs for `bytes.translate()` [0] show the following signature: ``` bytes.translate(table[, delete]) ``` However, calling this method with keyword arguments yields: ``` >>> b''.translate(table='la table', delete=b'delete') Traceback (most recent call la

[issue26334] bytes.translate() doesn't take keyword arguments; docs suggests it does

2016-02-10 Thread SilentGhost
SilentGhost added the comment: I don't think docs suggest that in any way. The keyword arguments are typically described like this: https://docs.python.org/3/library/stdtypes.html#str.split bytes.translate has a typical signature of a function with optional positional arguments. -- no

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Yury Selivanov
Yury Selivanov added the comment: > I prefer simpler and more strict rule: > * Underscores are allowed only between digits in numeric literals. +1. But in any case we need a PEP for this change. -- nosy: +yselivanov ___ Python tracker

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: C++14 uses the same strict rule as Ada, but uses apostrphes instead of underscores. [1] Thus there are two groups of languages, implementing strict or lenient rules: * Strict: Ada, C++, Java, C#, Ruby, Julia, Perl (as documented), Swift (textual description

[issue25228] Regression in cookie parsing with brackets and quotes

2016-02-10 Thread Martin Panter
Martin Panter added the comment: To move forward on this, I would like someone else (hopefully Antoine? :) to confirm my theory about the cookie injection attack, or otherwise explain why the patch won’t (re)open any security holes. Also, I would like to add some more test cases based on Serge

[issue26334] bytes.translate() doesn't take keyword arguments; docs suggests it does

2016-02-10 Thread Nicholas Chammas
Nicholas Chammas added the comment: So you're saying if `bytes.translate()` accepted keyword arguments, its signature would look something like this? ``` bytes.translate(table, delete=None) ``` I guess I was under the mistaken assumption that argument names in the docs always matched keyword

[issue17956] concurrent.futures: add ScheduledExecutor

2016-02-10 Thread STINNER Victor
Changes by STINNER Victor : -- title: add ScheduledExecutor -> concurrent.futures: add ScheduledExecutor ___ Python tracker ___ ___ Py

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: test_support_check_no_resource_warning_2.patch LGTM, thanks. -- ___ Python tracker ___ ___ Python-bu

[issue25994] File descriptor leaks in os.scandir()

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: > I just added a comment on test_os.py, you may factorize the code. Ah, Serhiy created the issue #26325 for that. Nice. It's up to you to commit this change, or #26325 first, both are good now ;) -- ___ Python track

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2016-02-10 Thread Alexander Mohr
Alexander Mohr added the comment: sorry for disruption! ends up our router seems to be doing some kind of QoS limits on # of connections :( -- ___ Python tracker ___ __

[issue25985] Use sys.version_info instead of sys.version

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Review: LGTM, with a minor comment. -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mail

[issue26318] `io.open(fd, ...).name` returns numeric fd instead of None

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Hum, I don't think that it can be changed today. io.open(int).name is an int since Python 2.6. Changing it may break applications for a little benefit. > `io.open(fd, ...).name` returns numeric fd instead of None. This lead to some > nasty bugs. Why do you t

[issue26315] Optimize mod division for ints

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Is this patch is a subset of issue #26289 patch? -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Georg Brandl
Georg Brandl added the comment: PEP 515 is written up and posted to python-dev. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25295] functools.lru_cache raises KeyError

2016-02-10 Thread Peter Brady
Peter Brady added the comment: Yes. The patch you suggested restores the old behavior of the lru_cache. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue26200] SETREF adds unnecessary work in some cases

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 3084914245d2 by Raymond Hettinger in branch 'default': > Issue #26200: The SETREF macro adds unnecessary work in some cases. > https://hg.python.org/cpython/rev/3084914245d2 The code using Py_DECREF() doesn't look to be vulnerable to the bug des

[issue26312] Raise SystemError on programmical errors in PyArg_Parse*()

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Yeah, I also expect SystemError from C functions (of the Python C API) badly used. RuntimeError is more used in programming bugs at Python level. pyarg_parse_error.patch LGTM. -- nosy: +haypo ___ Python tracker

[issue26316] Probable typo in Arg Clinic’s linear_format()

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Go ahead. -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue24916] In sysconfig, don't rely on sys.version format

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: @Serhiy: Can you please take a look since this issue now depends on your issue #25985? -- nosy: +haypo, serhiy.storchaka ___ Python tracker ___

[issue26314] interned strings are stored in a dict, a set would use less memory

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Why did you remove _Py_ReleaseInternedStrings()? It looks like a big memory leak when Python is embedded. -- nosy: +haypo ___ Python tracker __

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2016-02-10 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2016-02-10 Thread Charles-François Natali
Changes by Charles-François Natali : -- stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-l

[issue26335] Make mmap.write return the number of bytes written like other write methods

2016-02-10 Thread Jakub Stasiak
New submission from Jakub Stasiak: Since mmap objects are said to "behave like both bytearray and like file objects" I believe it's appropriate for the mmap.write() method to return the number of bytes written like write() of other file objects/interfaces I could find in the standard library f

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2016-02-10 Thread Jim Jewett
Jim Jewett added the comment: Does (did?) the utf8 special case allow for a much faster startup time, by not requiring all of the codecs machinery? -- nosy: +Jim.Jewett ___ Python tracker _

[issue23992] multiprocessing: MapResult shouldn't fail fast upon exception

2016-02-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1ba0deb52223 by Charles-François Natali in branch 'default': Issue #23992: multiprocessing: make MapResult not fail-fast upon exception. https://hg.python.org/cpython/rev/1ba0deb52223 -- nosy: +python-dev ___

[issue26324] sum() incorrect on negative zeros

2016-02-10 Thread Jim Jewett
Jim Jewett added the comment: Even if Ethan's argument about an explicit start value were not convincing, Mark + Raymond would count as authoritative for floats. Anyone can reopen if needed; I just don't want the issue to languish forever if there is at least grudging agreement. -- no

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Petr Viktorin
Petr Viktorin added the comment: Regarding the patch: if trailing underscores are not allowed, `0 if 1_else 1` should be illegal. -- nosy: +encukou ___ Python tracker ___ __

[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid -> process mapping.

2016-02-10 Thread Charles-François Natali
Charles-François Natali added the comment: Anyone opposed to me committing the patch I submitted? It slves a real problem, and is fairly straight-forward (and conceptually more correct). -- ___ Python tracker

[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()

2016-02-10 Thread Srikanth Viswanathan
Changes by Srikanth Viswanathan : -- nosy: +srikanth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue26312] Raise SystemError on programmical errors in PyArg_Parse*()

2016-02-10 Thread Jim Jewett
Jim Jewett added the comment: It feels a bit odd to say that I've performed a triage review given the three people already involved -- but I did, and I think it is ready to commit. I believe it is a bug fix, but too subtle a bug to justify backporting. The only question is whether there should

[issue24916] In sysconfig, don't rely on sys.version format

2016-02-10 Thread Martin Panter
Martin Panter added the comment: I just added the dependency to reflect that the patch here will need updating. The main concern here is Thomas’s question: does it matter that py_version loses prerelease info? -- ___ Python tracker

[issue24303] OSError 17 due to _multiprocessing/semaphore.c assuming a one-to-one Pid -> process mapping.

2016-02-10 Thread Mike Frysinger
Mike Frysinger added the comment: i don't feel strongly about either version -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue26296] colorys rgb_to_hls algorithm error

2016-02-10 Thread Jim Jewett
Jim Jewett added the comment: The modulus fixes it for exact numbers. It doesn't produce exactly the same result with floats, because of rounding. Is that a problem? -- nosy: +Jim.Jewett ___ Python tracker _

[issue26314] interned strings are stored in a dict, a set would use less memory

2016-02-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: Because it was only called from within an "#ifdef __INSURE__" which we weren't using. I called it an "example" patch for a reason. Updating that function to deal with the set instead of dict seems wise. Ironically... a few days after we did this we may hav

[issue26312] Raise SystemError on programmical errors in PyArg_Parse*()

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: > The only question is whether there should be a "What's New?" entry for the > change. I don't think so. It's low level and nobody should see this exception anyway :-) It's an obvious bug in a C extension. -- ___ P

[issue25639] open 'PhysicalDriveN' on windows fails (since python 3.5) with OSError: [WinError 1] Incorrect function

2016-02-10 Thread Eryk Sun
Eryk Sun added the comment: I'm closing this as a duplicate of issue 25717. Martin's patch fixes this problem since it's just another case of _Py_fstat failing for a valid file. In this case the problem is volume and disk files (e.g. r"\\.\C:" and r"\\.\PhysicalDrive1") that don't support quer

[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2016-02-10 Thread Ned Deily
Ned Deily added the comment: Martin, thanks for updating the patch. I've left some review comments on Rietveld. After reviewing it, I think Garrett's original specification is correct: there is a need for four options to preserve current expected behavior although the default is slightly more

[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2016-02-10 Thread Ned Deily
Ned Deily added the comment: That said, it *might* be OK to change the default behavior to just remove the "and on OS X" condition: enable building readline with GNU readline if found on the search paths, possibly modified by CPPFLAGS and LDFLAGS, and, if not found, use editline if found on t

[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-02-10 Thread Eryk Sun
Eryk Sun added the comment: > There is a problem with os.chdir(): It doesn't work with > \\?\ notation. The process current directory is part of the Windows API, so it's subject to the MAX_PATH limit [1]. See SetCurrentDirectory [2]. Python can't do anything about this. As to shutil.rmtree,

[issue22121] IDLE should start with HOME as the initial working directory

2016-02-10 Thread Eryk Sun
Eryk Sun added the comment: > What we want seems to be a normal thing to do, and achieved by > some, but perhaps by a post installation script. It would help to have a couple of the bdist_wininst functions available for a post-install script: create_shortcut (CreateShortcut) get_speci

[issue12463] Calling SocketServer.shutdown() when server_forever() was not called will hang

2016-02-10 Thread Martin Panter
Martin Panter added the comment: Michael’s patch looks like it adds some backwards compatibility problems. The forking server overwrites a signal handler, and shutdown() no longer seems to wait at all. It seems that people want shutdown() to do different things. Mark doesn’t want it to wait f

[issue13749] socketserver can't stop

2016-02-10 Thread Martin Panter
Martin Panter added the comment: For stopping a single-threaded server from a request handler, perhaps see my patch for Issue 23430, which should allow calling sys.exit() or raising exceptions like SystemExit that do not inherit Exception. It seems to me that shutdown() can only sensibly be us

[issue26336] Expose regex bytecode as attribute of compiled pattern object

2016-02-10 Thread Jonathan Goble
New submission from Jonathan Goble: Once a regular expression is compiled with `obj = re.compile()`, it would be nice to have access to the raw bytecode, probably as `obj.code` or `obj.bytecode`, so it can be explored programmatically. Currently, regex bytecode is only stored in a C struct and

[issue24916] In sysconfig, don't rely on sys.version format

2016-02-10 Thread Ned Deily
Ned Deily added the comment: My understanding is that the "+" is added to the PY_VERSION in Include/patchlevel.h by the release management process after any tagged release, whether pre-release or final. So '+" is supposed to be set whenever CPython is built from anything other than an officia

[issue26308] Solaris 10 build issues

2016-02-10 Thread Ned Deily
Changes by Ned Deily : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue26337] Bypass imghdr module determines the type of image

2016-02-10 Thread Ramin Farajpour Cami
New submission from Ramin Farajpour Cami: import imghdr imghdr.what('phppng.png') output : 'png' if you set javascript script in file .png or .jpg , output : ValueError: invalid \x escape Hexdump: root@Ramin:~# hexdump -C phppng.png 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52

[issue26200] SETREF adds unnecessary work in some cases

2016-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Most of the SETREFs in the next() functions in the itertools module should also be restored to there former state. They look to have been correct before the change, so there was no improvement, only degradation. Much of that code had been finely tuned and

[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-02-10 Thread Jens Diemer
Jens Diemer added the comment: I have made https://github.com/jedie/pathlib_revised to address this, see: https://github.com/jedie/pathlib_revised#windows-max_path The idea is to add a property (I call it 'extended_path') and this will add the \\?\ prefix on all absolute path under windows. Un