[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-23 Thread INADA Naoki
INADA Naoki added the comment: New changeset a6296d34a478b4f697ea9db798146195075d496c by INADA Naoki in branch 'master': bpo-31095: fix potential crash during GC (GH-2974) https://github.com/python/cpython/commit/a6296d34a478b4f697ea9db798146195075d496c --

[issue31264] Import Package/Module through HTTP/S repository

2017-08-23 Thread R. David Murray
R. David Murray added the comment: Indeed, I personally can't imagine a circumstance in which I'd want to use this feature. Even inside an org. It also has security implications, which would also make it a harder sell. -- ___ Python tracker

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread R. David Murray
R. David Murray added the comment: Sometimes it does, sometimes we make the change in a feature release, often after a deprecation period. But in this case there is doubt that the behavior is incorrect in the first place. This discussion should move to the python-ideas mailing list. I'm

[issue31264] Import Package/Module through HTTP/S repository

2017-08-23 Thread Nick Coghlan
Nick Coghlan added the comment: Note that we're highly unlikely to ever accept a PEP to provide this natively, as it couples the process of runtime module loading too tightly to what should be private organisational details of the software publication process (domain names, repository names,

[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-08-23 Thread Alexander Mohr
Alexander Mohr added the comment: my vote is yes due to the defaultdict issue. We were hitting this in our prod env -- ___ Python tracker ___

[issue31266] attribute error

2017-08-23 Thread emin mamedov
emin mamedov added the comment: Thank you Peter, problem has fixed. I think, python interpreter must understand if a "temp1.py" will start in same directory with file "re.py", this is not a native module for python and interpreter can ignore re.py from user directory and etc. --

[issue26256] Fast decimalisation and conversion to other bases

2017-08-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: A couple of thoughts: * It is okay to add a couple lines to the decimal module docs noting a Cpython specific implementation detail that it uses better than expected algorithms which can payoff nicely when used with very large numbers. * Mersenne prime

[issue26256] Fast decimalisation and conversion to other bases

2017-08-23 Thread Cheryl Sabella
Cheryl Sabella added the comment: Hello, I came across this issue and was wondering if the FAQ section of the doc might be a good place to mention the presence of FFT, or actually fast number theoretic transform, as Stefan pointed out. I was also wondering if the short code snippet for the

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread Isaac Elliott
Isaac Elliott added the comment: Does backward compatibility take priority over correct behavior? What process is followed when fixing a bug causes a breaking change? -- ___ Python tracker

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread R. David Murray
R. David Murray added the comment: If you would disallow "a = [0]; [5, a][1][:] = [3]", then your proposal will not be accepted, for backward compatibility reasons if nothing else. -- versions: +Python 3.7 -Python 3.5, Python 3.6 ___ Python tracker

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread Isaac Elliott
Isaac Elliott added the comment: Yes I would disallow a script such as `a = [0]; [5, a][1][:] = [3]` (note: your example of just `[5, a][1][:] = [3]` does not run, so I assumed it must be used in a situation like this) Evaluating the target of an assignment is unnecessary, we can syntactically

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker ___ ___

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-23 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- pull_requests: +3233 ___ Python tracker ___ ___

[issue31267] threading.Timer object is affected by changes to system time

2017-08-23 Thread Thomas Keppler
New submission from Thomas Keppler: Hi, I have been playing around with threading.Timer objects as timeouts for a project and noticed that my timeouts are affected by system time changes. To test this, I have written a small demonstration script (timer_testcase.py) which you can find in the

[issue31267] threading.Timer object is affected by changes to system time

2017-08-23 Thread Thomas Keppler
Changes by Thomas Keppler : Added file: http://bugs.python.org/file47097/test_monotonic.py ___ Python tracker ___

[issue31266] attribute error

2017-08-23 Thread Peter Otten
Peter Otten added the comment: You have probably written your own re.py file which shadows the one in the standard library. Once you remove or rename your re.py the error should go away. -- nosy: +peter.otten ___ Python tracker

[issue31266] attribute error

2017-08-23 Thread emin mamedov
New submission from emin mamedov: Hello! I am just write some program with "string module", after starting my program python give me error about "re module". My program is a tutorial from DrapsTV from Youtube. Error -->> Traceback (most recent call last): File "temp1.py", line 1, in

[issue31229] wrong error messages when too many kwargs are received

2017-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Oren for your contribution. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue31229] wrong error messages when too many kwargs are received

2017-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bf9075a0c55186d2f34df63e6c8512dd6414ff4b by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31229: Fixed wrong error messages when too many keyword arguments are received. (#3180)

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-23 Thread INADA Naoki
INADA Naoki added the comment: When no change happens: $ ./py-patched -m perf timeit --compare-to `pwd`/py-default -s 'from collections import Ordedict; od = odict.fromkeys("abcdefghijklmnopqrstuvwxyz")' -- 'od.move_to_end("a", 0)'

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about move_to_end(last=False)? -- ___ Python tracker ___ ___

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-23 Thread INADA Naoki
INADA Naoki added the comment: Another idea is making "dict preserves insertion order" as language spec. There are still some difference between dict and odict: .move_to_end() and __eq__. But most use cases of odict is just keep insertion order. For example, parsing config file, json, or csv.

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-23 Thread INADA Naoki
INADA Naoki added the comment: od.move_to_end() is slower too: $ ./py-patched -m perf timeit --compare-to `pwd`/py-default -s 'from collections import OrderedDict as odict; od = odict.fromkeys("abcdefghijklmnopqrstuvwxyz")' -- 'od.move_to_end("a"); od.move_to_end("b")' py-default:

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-23 Thread INADA Naoki
INADA Naoki added the comment: I think typical usage is: get, set (incl, creating), and iterate. * get: there is no difference * set: inserting new key is little faster since no updating linked list * iterate: in typical case, new odict is faster because current odict iterator do lookup for

[issue31264] Import Package/Module through HTTP/S repository

2017-08-23 Thread R. David Murray
R. David Murray added the comment: This kind of proposal should start with a discussion on the python-ideas mailing list. You can reopen the issue if there is a consensus for moving forward...but I wouldn't be surprised if this was considered to be a PEP level proposal. -- nosy:

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread R. David Murray
R. David Murray added the comment: I'm don't have a lot of experience with parsers, but I suspect that we consider the cost of making the grammar more complex to be more significant than the benefit we'd get from catching these at compile time. And as Vedran says, defining what can be caught

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I like the idea. Actually I wanted to write such patch myself, but this is very delicate thing and needs to be very careful. The largest benefit is not just memory saving and performance, but robustness. Currently it is easy to went OrderedDict in incorrect

[issue26601] Use new madvise()'s MADV_FREE on the private heap

2017-08-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> needs patch versions: +Python 3.7 -Python 3.6 ___ Python tracker ___

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would be very careful going down this path. Regular dict ordering is not yet guaranteed and is subject to change. Its design was primarily about compaction and the ordering was a side-effect. In contrast, the data structure for

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue22536] subprocess should include filename in FileNotFoundError exception

2017-08-23 Thread Christian H
Christian H added the comment: I was also bitten by this bug, and would like to see it merged. The patch 22536-subprocess-exception-filename-2.patch looks fine to me. -- nosy: +Christian H ___ Python tracker

[issue31263] Assigning to subscript/slice of literal is permitted

2017-08-23 Thread Vedran Čačić
Vedran Čačić added the comment: There is no such thing as "sliced literal" per se. And [1,2,3] is in fact _not_ a literal (it's a _list display_, at least it was the last time I learned Python's vocabulary.) [1,2,3][0] is an expression, which is a slice. When you write [0] = 2, is evaluated,

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-23 Thread INADA Naoki
INADA Naoki added the comment: There are some failing tests remaining, and I want to discuss about some of them here. Traceback (most recent call last): File "/home/inada-n/work/python/nodebug/Lib/test/test_ordered_dict.py", line 261, in test_pop self.assertEqual(m.pop('a', default=6),

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-23 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +3232 ___ Python tracker ___ ___

[issue31265] Remove doubly-linked list from C OrderedDict

2017-08-23 Thread INADA Naoki
New submission from INADA Naoki: Since dict preserves insertion order, doubly linked list in OrderedDict can be removed. There is small performance improvement for odict creation: $ curl https://api.github.com/orgs/python/repos > repos.json $ ./py-patched -m perf timeit --compare-to

[issue31264] Import Package/Module through HTTP/S repository

2017-08-23 Thread John Torakis
New submission from John Torakis: A module presented in "https://github.com/operatorequals/httpimport; which provides functionality for package/module loading through HTTP/S, like the golang's "import github.com/someusr/somepkg/subpkg", but for any directory served with HTTP/S. I believe

[issue31244] IDLE: work around shortcuts bug in Windows' IMEs and tk

2017-08-23 Thread Constantine Ketskalo
Constantine Ketskalo added the comment: Bug is not in Python? Then where? Windows? - I assume that the alt menu shortcuts work... - NO! And I've written that before as well! Alt + combinations don't work neither with cyrillic! - Does it affect all Cyrillic IMEs? - Yes, I've written that

[issue31243] checks whether PyArg_ParseTuple returned a negative int

2017-08-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +IO nosy: +benjamin.peterson, stutzbach ___ Python tracker ___

[issue31244] IDLE: work around shortcuts bug in Windows' IMEs and tk

2017-08-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it affects all Cyrillic layouts, as well as Greek and other alphabetical systems. It also affects layouts for Western-European languages with keys for accented characters. Different Cyrillic keyboards have different characters on the same key, but I

[issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv

2017-08-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: TBH, I think this is a Sphinx problem, not a Python problem. And concerning ``Tuple`` being an actual class I think this is an implementation detail, so that I am closing this as "won't fix". -- resolution: -> wont fix stage: -> resolved status: