[issue32242] loop in loop with with 'zip'ped object misbehaves in py3.6

2017-12-07 Thread Vishu Viswanathan
Vishu Viswanathan added the comment: Thanks for the fast response and clarification. Now I can run my code made for py2.7 also run in py3.6 I should search and read documentation before reporting. Thanks On Thu, Dec 7, 2017 at 8:03 PM, Steven D'Aprano

[issue30904] Python 3 logging HTTPHandler sends duplicate Host header

2017-12-07 Thread iMath
iMath added the comment: Yes, I met with the same bug, see the post for description and bug investigation https://stackoverflow.com/questions/43185804/using-httphandler-cause-django-server-side-shows-http-400-and-invalid-http-host/47434323#47434323 -- nosy:

[issue31942] Document that support of start and stop parameters in the Sequence's index() is optional

2017-12-07 Thread Nitish
Nitish added the comment: Any comments on the PR? -- ___ Python tracker ___

[issue28197] Add start and stop parameters to the range.index() ABC method

2017-12-07 Thread Nitish
Nitish added the comment: Any comments on the PR? -- nosy: +nitishch ___ Python tracker ___

[issue32251] Add asyncio.BufferedProtocol

2017-12-07 Thread Yury Selivanov
Yury Selivanov added the comment: I've made a PR that implements the change for selector_events.py. With the change: vanilla asyncio:120-135 Mb/s vanilla asyncio/get_buffer: 220-230 Mb/s uvloop: 320-330 Mb/s uvloop/get_buffer:

[issue32251] Add asyncio.BufferedProtocol

2017-12-07 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +4658 stage: -> patch review ___ Python tracker ___

[issue8722] Documentation for __getattr__

2017-12-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Cheryl, thank you for reviving this, as it is still needed. A slightly revised example better illustrates the claim in the doc revision about when __getattr__ is called. class Foo(object): def __init__(self): self.foo = 1

[issue32251] Add asyncio.BufferedProtocol

2017-12-07 Thread Yury Selivanov
New submission from Yury Selivanov : A couple emails from async-sig for the context: 1. https://mail.python.org/pipermail/async-sig/2017-October/000392.html 2. https://mail.python.org/pipermail/async-sig/2017-December/000423.html I propose to add another Protocol base

[issue32251] Add asyncio.BufferedProtocol

2017-12-07 Thread Yury Selivanov
Change by Yury Selivanov : -- assignee: yselivanov components: asyncio nosy: asvetlov, gvanrossum, pitrou, yselivanov priority: normal severity: normal status: open title: Add asyncio.BufferedProtocol versions: Python 3.7 ___

[issue8722] Documentation for __getattr__

2017-12-07 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +needs review -patch versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker

[issue8722] Documentation for __getattr__

2017-12-07 Thread Cheryl Sabella
Change by Cheryl Sabella : -- pull_requests: +4657 stage: needs patch -> patch review ___ Python tracker ___

[issue32246] test_regrtest alters the execution environment on Android

2017-12-07 Thread STINNER Victor
STINNER Victor added the comment: > The fact that the TEMP directory is not clean already happens when running > buildbottest natively with the standard Python Makefile (no one has noticed > it yet I guess) and the directory contains a core file. The root issue is

[issue32246] test_regrtest alters the execution environment on Android

2017-12-07 Thread STINNER Victor
STINNER Victor added the comment: > The command 'adb logcat' reports a crash ("Fatal signal 11 (SIGSEGV)") during > the execution of the command. This sounds familiar :-) test_crashed() does crash on SIGGEV on purpose. It tests how regrtest behaves when a worker

[issue32193] Convert asyncio to async/await

2017-12-07 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___

[issue32250] Add loop.current_task() and loop.all_tasks() methods

2017-12-07 Thread Andrew Svetlov
New submission from Andrew Svetlov : Existing `Task.current_task()` and `Task.all_tasks()` class methods are not overridable by custom event loop implementation. The proposal is adding new optional loop methods and using them by existing task methods. --

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-07 Thread Mark Shannon
Mark Shannon added the comment: Thanks, that example shows the essence of the problem. I understand you perfectly now. -- ___ Python tracker

[issue32249] Document handler.cancelled()

2017-12-07 Thread Andrew Svetlov
New submission from Andrew Svetlov : Method was added by https://bugs.python.org/issue31943 -- components: asyncio messages: 307825 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Document handler.cancelled() versions: Python

[issue32193] Convert asyncio to async/await

2017-12-07 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +4656 stage: -> patch review ___ Python tracker ___

[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2017-12-07 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : We intend to port importlib_resources to Python 3.7 as importlib.resources, with a provisional API. There's also a ResourceReader ABC to include, along with documentation and tests. Nosying Brett and assigning to myself, but if Brett

[issue32247] shutil-copytree: Create dst folder only if it doesn't exist

2017-12-07 Thread Radostin
New submission from Radostin : shutil.copytree method always tries to create the destination directory which raises the error message "OSError: [Errno 17] File exists". This issue has been discussed here:

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-12-07 Thread STINNER Victor
STINNER Victor added the comment: The bug has been fixed in Python 2.7, 3.6 and the master branch. Thank you Nir Soffer for the bug report and the fix! -- versions: -Python 3.5, Python 3.8 ___ Python tracker

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-12-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset 830daae1c82ed33deef0086b7b6323e5be0b0cc8 by Victor Stinner (Nir Soffer) in branch '2.7': [2.7] bpo-32186: Release the GIL during fstat and lseek calls (#4651)

[issue32206] Run modules with pdb

2017-12-07 Thread Mario Corchero
Change by Mario Corchero : -- keywords: +patch pull_requests: +4654 stage: -> patch review ___ Python tracker ___

[issue32208] Improve semaphore documentation

2017-12-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset a04ca12e12b522850e7e9244c250754d3cd36f0a by Andrew Svetlov (Miss Islington (bot)) in branch '3.6': bpo-32208: update threading.Semaphore docs and add unit test (GH-4709) (#4750)

[issue32208] Improve semaphore documentation

2017-12-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset a0374dd34aa25f0895195d388b5ceff43b121b00 by Andrew Svetlov (Garrett Berg) in branch 'master': bpo-32208: update threading.Semaphore docs and add unit test (#4709)

[issue32208] Improve semaphore documentation

2017-12-07 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4653 ___ Python tracker ___

[issue32237] test_xml_etree leaked [1, 1, 1] references, sum=3

2017-12-07 Thread Neil Schemenauer
Change by Neil Schemenauer : -- keywords: +patch pull_requests: +4652 stage: -> patch review ___ Python tracker ___

[issue30862] parent logger should also check the level

2017-12-07 Thread Vinay Sajip
Vinay Sajip added the comment: basicConfig() provides default behaviour for simple cases. If you don't like the defaults it provides, you can choose your own configuration code to do exactly what you want. -- ___ Python

[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: Thanks Serhiy and Barry for your comments and reviews :-) -- ___ Python tracker ___

[issue26414] os.defpath too permissive

2017-12-07 Thread Jakub Wilk
Jakub Wilk added the comment: Linux man page for execvp(3) says: > The default search path (used when the environment does not contain > the variable PATH) shows some variation across systems. It generally > includes /bin

[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: LGTM, and thanks! -- ___ Python tracker ___ ___

[issue13420] newer() function in dep_util.py discard changes in the same second

2017-12-07 Thread Jakub Wilk
Jakub Wilk added the comment: I don't remember why I needed it. Sorry! -- ___ Python tracker ___

[issue32246] test_regrtest alters the execution environment on Android

2017-12-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: > The command 'adb logcat' reports a crash ("Fatal signal 11 (SIGSEGV)") during > the execution of the command. This sounds familiar :-) See issue #32138 and #26934. -- ___ Python tracker

[issue32246] test_regrtest alters the execution environment on Android

2017-12-07 Thread Xavier de Gaye
New submission from Xavier de Gaye : Sorry, this is a bit involved :-( BTW all the tests except this one pass (ctypes is disabled on x86_64 and arm64) on Android API 24 for x86, x86_64, armv7 and arm64 :-) Description: --- There are two different cases: 1) When

[issue6531] atexit_callfuncs() crashing within Py_Finalize() when using multiple interpreters.

2017-12-07 Thread Petr Viktorin
Change by Petr Viktorin : -- nosy: +Dormouse759, encukou ___ Python tracker ___ ___

[issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles

2017-12-07 Thread Simon Depiets
New submission from Simon Depiets : A couple of users have been having issues on console output since the Fall 2017 Creator Update on Windows 10 An OSError is triggered randomly when rewriting data on the console (typically with progress bars, for instance when you install

[issue32244] Multiprocessing: multiprocessing.connection.Listener.accept() should accept a timeout

2017-12-07 Thread Tom Cook
Tom Cook added the comment: The same goes for `Connection.recv()`, as in the sample code another case where the thread will never terminate is when a `Client` is connected to the socket but never sends any messages; in this case, the call to `recv()` will block forever.

[issue32244] Multiprocessing: multiprocessing.connection.Listener.accept() should accept a timeout

2017-12-07 Thread Tom Cook
New submission from Tom Cook : If nothing connects to it, `multiprocessing.connection.Listener.accept()` will block forever with no good way to interrupt it. Supposing that a thread implements a loop like this: def run(self): l = Listener(socket_path,

[issue32243] Tests that set aggressive switch interval hang in Cygwin on a VM

2017-12-07 Thread Erik Bray
New submission from Erik Bray : This is basically the same as #26939, but rather than Android running in an emulator it is affecting Cygwin running in a slow VM (in this case it's on my university's OpenStack infrastructure--I don't know what hypervisor they're using

[issue32242] loop in loop with with 'zip'ped object misbehaves in py3.6

2017-12-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: I decided to run the code in 3.5 and 2.7, and now that I know what I'm looking for, I can see the results buried in the Anaconda notebook. This is not a bug, zip has been changed in Python 3 to return an iterator instead of a

[issue32242] loop in loop with with 'zip'ped object misbehaves in py3.6

2017-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In Python 2 zip() returns a list. In Python 3 it returns an iterator (like itertools.izip() in Python 2). This is an intentional change. For restoring the Python 2 behavior you should wrap the result of zip() into list(): z =

[issue32242] loop in loop with with 'zip'ped object misbehaves in py3.6

2017-12-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: If the nested loop is the issue the Python 3 version behaves as expected. A difference between python2 and python3 is that the zip() builtin returns a list on python2 and an iterator on python3. This explains the difference in

[issue32242] loop in loop with with 'zip'ped object misbehaves in py3.6

2017-12-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm sorry, I have no idea how to read an Anaconda notebook file. In the browser it looks like some sort of nested dictionary. I can find the code: j = [1, 2, 3, 4] k = [5, 6, 7, 8] z = zip(j, k) for x, y in z: for m, n in z:

[issue32242] loop in loop with with 'zip'ped object misbehaves in py3.6

2017-12-07 Thread Vishu Viswanathan
New submission from Vishu Viswanathan : The file shows the results by running in Py3.6 and 2.7 In my opinion Py2.7 results matches what I expected. In this bug or the zip function behaviour is changed with some purpose -- files: py3.6_vs_py2.7.ipynb messages:

[issue32241] Add the const qualifier for char and wchar_t pointers to unmodifiable strings

2017-12-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4651 stage: -> patch review ___ Python tracker ___

[issue32241] Add the const qualifier for char and wchar_t pointers to unmodifiable strings

2017-12-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Py_SetProgramName() and Py_SetPythonHome() take a pointer to a string that shouldn't be changed for the duration of the program's execution. But the type of their arguments is "wchar_t *", therefore passing just a pointer to a

[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-07 Thread Xavier de Gaye
Change by Xavier de Gaye : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: New changeset 03031fbc7d44106d652756462db34eae67de9568 by xdegaye (Miss Islington (bot)) in branch '3.6': bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link list' (GH-4696) (#4747)

[issue32235] [2.7 regression] test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205

2017-12-07 Thread Matthias Klose
Matthias Klose added the comment: ok, I can confirm that the failures go away with an updated version. Then trying to find documentation about required external dependencies... None. While we have pointers to optimize the build, we don't have anything about requirements

[issue32235] test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205

2017-12-07 Thread Matthias Klose
Change by Matthias Klose : -- title: [2.7 regression] test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205 -> test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205 ___ Python tracker

[issue32240] Add the const qualifier for PyObject* array arguments

2017-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This change is inspired by reviewing one PR in which an input array of PyObject* was modified inplace. Even if it was correct in that particular case, it looked unsafe (actually that code was wrong for other causes). Adding

[issue32240] Add the const qualifier for PyObject* array arguments

2017-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't like "PyConstObjectArray" or any other name. I will just obfuscate the C code. "PyObject * const *args" should be clear for every C programmer, but if I see "PyConstObjectArray" I need to search the definition of it in

[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-07 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4650 ___ Python tracker ___

[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: New changeset 961dbe0548e26394b7716d41423c61b1e2e58ef7 by xdegaye in branch 'master': bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link list' (GH-4696)

[issue32238] Handle "POSIX" in the legacy locale detection

2017-12-07 Thread Jakub Wilk
Change by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32240] Add the const qualifier for PyObject* array arguments

2017-12-07 Thread STINNER Victor
STINNER Victor added the comment: I hate this "obscure" C syntax "PyObject * const *args". Technically, is it possible to define it as a type with a better name to give more context where the type would be defined? For example, "PyConstObjectArray"? --

[issue32240] Add the const qualifier for PyObject* array arguments

2017-12-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4649 stage: -> patch review ___ Python tracker ___

[issue32240] Add the const qualifier for PyObject* array arguments

2017-12-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR replaces argument declarations "PyObject **args" with "PyObject * const *args". In many cases this can be a pointer to the internal array of the tuple object. It is not safe to change it. PyEval_EvalCodeEx()

[issue32239] decimal module exception args incorrect for c module

2017-12-07 Thread Stefan Krah
Stefan Krah added the comment: This is known and was deliberate when I wrote the module. The list contains conditions that trigger the exception. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> decimal C module's exceptions

[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-07 Thread Xavier de Gaye
Xavier de Gaye added the comment: On archlinux it is easy to know precisely what patches are applied to iproute2 and how it is built (see https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/iproute2). The attached two files, archlinux-ip_link.strace and

[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-07 Thread Xavier de Gaye
Change by Xavier de Gaye : Added file: https://bugs.python.org/file47326/archlinux-ip_link.strace ___ Python tracker ___

[issue32222] pygettext doesn't extract docstrings for functions with type annotated params

2017-12-07 Thread Toby Harradine
Change by Toby Harradine : -- keywords: +patch pull_requests: +4648 stage: -> patch review ___ Python tracker ___

[issue31972] Inherited docstrings for pathlib classes are confusing

2017-12-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -4645 ___ Python tracker ___

[issue32239] decimal module exception args incorrect for c module

2017-12-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +skrah ___ Python tracker ___ ___