[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-05-24 Thread Mark Shannon
Changes by Mark Shannon : -- pull_requests: +1882 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

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

2017-05-24 Thread Osvaldo Santana Neto
Osvaldo Santana Neto added the comment: This is an alternative implementation using `threading.Lock()`. The main issue with this implementation relies on the fact that we've to import the `threading` module during CPython interpreter loading (currently it's not imported by default). This is c

[issue30465] FormattedValue expressions have wrong lineno and col_offset information

2017-05-24 Thread Łukasz Langa
New submission from Łukasz Langa: f-strings are computed in a separate compiler step. This makes their lineno and col_offset information wrong. This is problematic for flake8 which reports problems inside f-strings on the wrong line (typically the first one). Attached patch fixes the issue. -

[issue30465] FormattedValue expressions have wrong lineno and col_offset information

2017-05-24 Thread Łukasz Langa
Changes by Łukasz Langa : -- pull_requests: +1883 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue30466] Tutorial doesn't explain the use of classes

2017-05-24 Thread Trey Hunner
New submission from Trey Hunner: The tutorial page for classes starts with "Compared with other programming languages". While object-oriented programming and classes are popular in many programming languages, not everyone learning about Python's classes is familiar with the concept. I teach

[issue24896] It is undocumented that re.UNICODE and re.LOCALE affect re.IGNORECASE

2017-05-24 Thread Brian Ward
Brian Ward added the comment: OK, I'll look at this soon and come up with the next iteration. -- ___ Python tracker ___ ___ Python-bug

[issue30467] Propagate zipfile.py pypy issue #905 patch to CPython

2017-05-24 Thread Shubha Ramani
New submission from Shubha Ramani: PyPy had a longstanding issue : ZipFile.extractall is very slow compared to CPython 2.6 https://bitbucket.org/pypy/pypy/issues/905/zipfileextractall-is-very-slow-compared-to which has been fixed in the PyPy code base. The changes were entirely in zipfile.py (

[issue30467] Propagate zipfile.py pypy issue #905 patch to CPython 2.7

2017-05-24 Thread Shubha Ramani
Changes by Shubha Ramani : -- title: Propagate zipfile.py pypy issue #905 patch to CPython -> Propagate zipfile.py pypy issue #905 patch to CPython 2.7 ___ Python tracker ___ __

[issue30468] Propagate zipfile.py pypy issue #905 patch to CPython 3.7

2017-05-24 Thread Shubha Ramani
New submission from Shubha Ramani: PyPy had a longstanding issue : ZipFile.extractall is very slow compared to CPython 2.6 https://bitbucket.org/pypy/pypy/issues/905/zipfileextractall-is-very-slow-compared-to which has been fixed in the PyPy code base. The changes were entirely in zipfile.py (

[issue12857] Expose called function on frame object

2017-05-24 Thread Mark Shannon
Mark Shannon added the comment: I'm not too keen on this. Which frame is being executed is an implementation detail. For example, we currently push a new frame for list comprehensions, but that is an implementation detail. The language only specifies that list-comps execute in a new scope. I'

[issue30178] Indent methods and attributes of MimeTypes class

2017-05-24 Thread Stéphane Wirtel
Changes by Stéphane Wirtel : -- pull_requests: +1884 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue30439] Expose the subinterpreters C-API in the stdlib.

2017-05-24 Thread Eric Snow
Changes by Eric Snow : -- pull_requests: +1885 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue30439] Expose the subinterpreters C-API in the stdlib.

2017-05-24 Thread Eric Snow
Changes by Eric Snow : -- pull_requests: +1886 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue30460] file opened for updating cannot write after read

2017-05-24 Thread Eryk Sun
Eryk Sun added the comment: It might be simplest to close this as 3rd party since it's similar to bpo-29817. A workaround is to call f.seek(0, 1) to reset the stream state when switching between reading and writing. That said, a switch to writing at EOF should be supported. The problem is tha

[issue30469] Inconsistent Execution of Generic Descriptor Attributes

2017-05-24 Thread Ryan Morshead
New submission from Ryan Morshead: When the `__get__`, `__set__`, or `__delete__` attribute of a descriptor is not a method, and is instead a generic callable, the first argument of that callable is inconsistent: class Callable(object): def __call__(self, first, *args, **kwargs):

[issue30447] test_capi.test_subinterps() fails on ARMv7 Ubuntu 3.x

2017-05-24 Thread Eric Snow
Eric Snow added the comment: New changeset d1c3c13fedaf62b71445ccd048e395aa4a7d510f by Eric Snow in branch 'master': bpo-30447: Fix/skip the subinterpreters test on some platforms. (#1791) https://github.com/python/cpython/commit/d1c3c13fedaf62b71445ccd048e395aa4a7d510f -- __

[issue29102] Add an id field to PyInterpreterState.

2017-05-24 Thread Eric Snow
Eric Snow added the comment: I've fixed the compiler warning via d1c3c13fedaf62b71445ccd048e395aa4a7d510f. -- status: open -> closed ___ Python tracker ___ __

[issue30447] test_capi.test_subinterps() fails on ARMv7 Ubuntu 3.x

2017-05-24 Thread Eric Snow
Changes by Eric Snow : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue30466] Tutorial doesn't explain the use of classes

2017-05-24 Thread Trey Hunner
Changes by Trey Hunner : -- pull_requests: +1887 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30466] Tutorial doesn't explain the use of classes

2017-05-24 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue30368] [2.7] OpenSSL compilation fails on AMD64 Windows7 SP1 VS9.0 2.7

2017-05-24 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- pull_requests: +1888 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue30449] Improve __slots__ datamodel documentation

2017-05-24 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1889 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue30466] Tutorial doesn't explain the use of classes

2017-05-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: This particular PR seems fine. I'll review it in more detail later. In general, the tutorial is intended to be a structured overview of the language rather than a how-to-program lesson. Concepts are usually linked to the glossary or external sources and s

[issue30464] gammavariate has a wrong comment

2017-05-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue30368] [2.7] OpenSSL compilation fails on AMD64 Windows7 SP1 VS9.0 2.7

2017-05-24 Thread Jeremy Kloth
Jeremy Kloth added the comment: Submitted PR-1805 that should restore perl-less building. Also some open issues as noted in the PR. -- ___ Python tracker ___ ___

[issue30463] Add __slots__ to ABC convenience class

2017-05-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: This seems reasonable. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue30459] PyList_SET_ITEM could be safer

2017-05-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: The docs do make the claim of returning void: https://docs.python.org/3/c-api/list.html#c.PyList_SET_ITEM However, I think we should change the docs rather than changing the macro. This macro is very old and very widely used. Changing it is likely to brea

[issue30461] glob returns results in undeterministic order

2017-05-24 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue30449] Improve __slots__ datamodel documentation

2017-05-24 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue30449] Improve __slots__ datamodel documentation

2017-05-24 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- versions: +Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30368] [2.7] OpenSSL compilation fails on AMD64 Windows7 SP1 VS9.0 2.7

2017-05-24 Thread Zachary Ware
Zachary Ware added the comment: I tried out PR1805 with Perl unavailable, and it seemed to build fine with `PC\VS9.0\build.bat -e -d -p x64`. However, trying `PC\VS9.0\amd64\python_d.exe -m test.ssltests` segfaults. Can you reproduce? -- ___ Pytho

[issue30465] FormattedValue expressions have wrong lineno and col_offset information

2017-05-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for adding so many tests. -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list

[issue30469] Inconsistent Execution of Generic Descriptor Attributes

2017-05-24 Thread Ryan Morshead
Ryan Morshead added the comment: Is there a reason that `call_method` is not used in `slot_tp_descr_get` -- ___ Python tracker ___ ___

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2017-05-24 Thread Łukasz Langa
Changes by Łukasz Langa : -- pull_requests: +1890 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

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

2017-05-24 Thread chainly
Changes by chainly <1258626...@qq.com>: -- pull_requests: +1891 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30368] [2.7] OpenSSL compilation fails on AMD64 Windows7 SP1 VS9.0 2.7

2017-05-24 Thread Jeremy Kloth
Jeremy Kloth added the comment: On my VM, ssltests pass, but both the Perl and non-Perl segfault in test_ssl (and many others). My VM has just VS2008 installed, does VS2010 come with an updated SDK? -- ___ Python tracker

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

2017-05-24 Thread Catherine Devlin
Changes by Catherine Devlin : -- pull_requests: +1892 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

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

2017-05-24 Thread Catherine Devlin
Catherine Devlin added the comment: Okay, the problem is a little more specific than my last message suggested, but also a little less specific than the original report. A "PermissionError: [Errno 13] Permission denied" is thrown when expanding a tarfile to which a file had been added more tha

[issue30469] Inconsistent Execution of Generic Descriptor Attributes

2017-05-24 Thread Eryk Sun
Eryk Sun added the comment: It looks like slot_tp_descr_get bypasses call_method in order to unset tp->tp_descr_get for descriptors that don't define __get__. I don't know where that's an issue. If a class doesn't define __get__, its tp_descr_get slot should already be NULL. That said, I don

[issue30449] Improve __slots__ datamodel documentation

2017-05-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: As much as possible, please stick with the existing terse style of the data model docs. They tend to be concise, direct, and very light on examples. They don't serve as a tutorial, faq, or cover programming patterns or advice. Looking at the PR, I don't t

[issue12857] Expose called function on frame object

2017-05-24 Thread Nathaniel Smith
Nathaniel Smith added the comment: Certainly which frame is being executed is an implementation detail, and I can see an argument from that that we shouldn't have a frame introspection API at all... but we do have one, and it has some pretty important use cases, like traceback printing. Obviou

[issue12857] Expose called function on frame object

2017-05-24 Thread Yury Selivanov
Yury Selivanov added the comment: > I don't see a better way to handle my (admittedly a bit weird) control-C case > within the interpreter I'm not sure I understand how `f_func` would help to better handle Control-C in Trio. Nathaniel, could you please elaborate on that? -- _

[issue12857] Expose called function on frame object

2017-05-24 Thread Nathaniel Smith
Nathaniel Smith added the comment: > I'm not sure I understand how `f_func` would help to better handle Control-C > in Trio. Nathaniel, could you please elaborate on that? Sure. The issue is that I need to mark certain frames as "protected" from KeyboardInterrupt, in a way that my signal handl

[issue30462] urllib does not support NO_PROXY environment variable containing domain with asterisk

2017-05-24 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1894 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue12857] Expose called function on frame object

2017-05-24 Thread Yury Selivanov
Yury Selivanov added the comment: > Sure. The issue is that I need to mark certain frames as "protected" from > KeyboardInterrupt, in a way that my signal handler can see when walking the > frame stack, so it can decide whether to raise a KeyboardInterrupt > immediately or to wait until a safe

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-05-24 Thread Nathaniel Smith
Nathaniel Smith added the comment: On further thought, I think the way I'd write a test for this is: (1) add a testing primitive that waits for N instructions and then injects a SIGINT. Probably this would require tweaking the definition of Py_MakePendingCalls like I described in my previous c

[issue30470] Deprecate invalid ctypes call protection on Windows

2017-05-24 Thread Mariatta Wijaya
New submission from Mariatta Wijaya: It was proposed by Steve Dower by email to python-dev: https://mail.python.org/pipermail/python-dev/2017-May/147959.html It should be deprecated in Python 3.6.2 and removed in 3.7.0 -- assignee: docs@python components: Documentation, ctypes messages:

[issue30470] Deprecate invalid ctypes call protection on Windows

2017-05-24 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1895 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue12857] Expose called function on frame object

2017-05-24 Thread Nathaniel Smith
Nathaniel Smith added the comment: > Yes, whenever you touch frames you're disabling the JIT for the call site > (and maybe for more call sites up the stack, idk). So it doesn't matter what > you use, `f_func` or `f_locals`, the performance will suffer big time. Is > that acceptable for Trio

[issue30368] [2.7] OpenSSL compilation fails on AMD64 Windows7 SP1 VS9.0 2.7

2017-05-24 Thread Jeremy Kloth
Jeremy Kloth added the comment: OK, testing with the 7.1 SDK installed changes the crashes around, but something is really amiss. I'd like to do more testing, but it will need to wait until morning here. -- ___ Python tracker

[issue30464] gammavariate has a wrong comment

2017-05-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: I agree that the comment should be changed. While we at it, perhaps sync-up with expovariate() code and eliminate the ``u <= 1e-7`` test: Instead of: elif alpha == 1.0: # expovariate(1) u = random() while u <= 1e-

[issue30403] Running extension modules using -m switch

2017-05-24 Thread Nick Coghlan
Nick Coghlan added the comment: I just marked the associated PR as "[PEP required]", as while I'm in favour of merging this, I think we should go through the PEP process first: 1. We've been burned before by not properly advertising changes to Python's command line behaviour (while zip archive

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

2017-05-24 Thread Catherine Devlin
Catherine Devlin added the comment: My last commit to the PR includes a fix by delaying setting permission to all files, not just to directories, in .extractall(). It might be better to catch the problem during .add instead, preventing tarring multiple copies, but I found subtle difficulties w

<    1   2