[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0cd7a3f196cf34d9bb0a52e61327f7fe289d9750 by Serhiy Storchaka in branch 'master': bpo-29104: Fixed parsing backslashes in f-strings. (#490) https://github.com/python/cpython/commit/0cd7a3f196cf34d9bb0a52e61327f7fe289d9750 -- __

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > There's no special code for list(dict), it uses regular iteration which could > probably hit the GC and then release the GIL. While there are no special code for list(dict), regular iteration over exact dict don't hit the GC. -- _

[issue30451] parse windows path error in webbrowser.get() and lead to webbrowser.Error: could not locate runnable browser

2017-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue22025. -- nosy: +georg.brandl, serhiy.storchaka ___ Python tracker ___ ___

[issue30403] Running extension modules using -m switch

2017-05-25 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks for bringing me in. The PoC implementation looks nice. Whether I'd like to support this in Cython? Absolutely. Requires some work, though, since Cython still doesn't implement PEP 489. But it shouldn't be hard, if I remember the discussions from back the

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Isn't list(dict) atomic? At least in CPython. I doubt it. There's no special code for list(dict), it uses regular iteration which could probably hit the GC and then release the GIL. > I suspect that protecting *all* accesses to _data with a lock will hit the

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Isn't list(dict) atomic? At least in CPython. I suspect that protecting *all* accesses to _data with a lock will hit the performance and invalidate the reason of using _data for caching. -- nosy: +serhiy.storchaka ___

[issue30459] PyList_SET_ITEM could be safer

2017-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it would be safer to just cast the result of the expression to void. This decreases the chance of breaking valid code, that for example uses PyList_SET_ITEM() in a comma expression. -- nosy: +haypo, serhiy.storchaka versions: +Python 3.7 -Pyt

[issue15786] IDLE code completion window can hang or misbehave with mouse

2017-05-25 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1897 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue30459] PyList_SET_ITEM could be safer

2017-05-25 Thread Espie Marc
Espie Marc added the comment: Well, there is not going to be a lot of breakage. This problem is the only instance I've encountered in the full OpenBSD ports tree. I thought python was supposed to be a clean language, and didn't shy away from removing stuff/tweaking stuff to achieve that goal ?

[issue30453] str.format() method, Rounding off wrong

2017-05-25 Thread Kazuhiro Fujie
Kazuhiro Fujie added the comment: Hi, Mark Thank you for teaching politely. I had misunderstood about format() and round() functions. I made mistakes though I already knew about floating point. I think try to take this tactics on my codes. num1 = 4.625 num2 = 4.62501 num3 = 4.625001 nu

[issue30403] Running extension modules using -m switch

2017-05-25 Thread Petr Viktorin
Petr Viktorin added the comment: Adding Stefan from the Cython project. Stefan, is this something you'd want to use? (It does require PEP 489 multi-phase initialization, so I assume it would need extra #ifdefs in Cythonized code for Python 3.5+ or 3.7+) -- nosy: +scoder __

[issue30464] gammavariate has a wrong comment

2017-05-25 Thread Leonardo De Marchi
Changes by Leonardo De Marchi : -- pull_requests: +1896 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue14111] IDLE Debugger should handle interrupts

2017-05-25 Thread Louie Lu
Louie Lu added the comment: Roger, will you convert the patch to GitHub PR? The patch runs will, there are only two point need to add: 1. user_interrupt should clear sys.settrace when step in 2. cancel_callback add a interp.write("\nKeyboardInterrupt\n") Thanks. -- _

[issue30471] "as" keyword in comprehensions

2017-05-25 Thread Dávid Nemeskey
New submission from Dávid Nemeskey: Currently, the "as" keyword in supported in import and with statements to bind an object to a name. I think it would be nice to have the same functionality in list/dict/etc. comprehensions as well. Rationale: as I understand, comprehensions are preferred ove

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm fine with a low-level lock, though as Mark says you could use _thread._RLock(). -- ___ Python tracker ___ _

[issue30438] tarfile would fail to extract tarballs with files under R/O directories (twice)

2017-05-25 Thread Lars Gustäbel
Lars Gustäbel added the comment: Actually, it is not prohibited to add the same file to the same archive more than once. -- nosy: +lars.gustaebel ___ Python tracker ___

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: @osantana: you'd need to be using the lock at least in `__setitem__` and `__delitem__` as well, else there's nothing preventing modifications to the dictionary during the `list` call. It may make sense to protect *all* accesses (read or write) to `_data`, thou

[issue25430] speed up ipaddress __contain__ method

2017-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I confirm that the proposed code is equivalent to the existing code and is faster. The largest part (~70%) of the speed up is caused by replacing int() calls with direct attribute access to _ip. I'm wondering whether it is worth to get rid of int() calls in

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-05-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: The box svn is running on is at risk of falling over any day. Plus with whatever ancient software it's running, it's surely a security risk to keep running an unmaintained svn instance. I certainly don't want to keep it running for years. I don't think we'v

<    1   2