[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-17 Thread STINNER Victor
STINNER Victor added the comment: Patch version 3: * pattern_hash() includes isbytes, I also shifted flags by 1 bit to not erase the isbytes bit (FYI maximum value of flags is 256) * pattern_richcompare() avoids calling PyObject_RichCompareBool() if flags or isbytes is different * unit test

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Your plan LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-17 Thread STINNER Victor
STINNER Victor added the comment: Ok, let me propose a plan for 3.5, 3.6 and 3.7: * Remove warnings.filters test on Python 3.5 from regrtest * Implement comparison for SRE_Pattern in Python 3.6 and 3.7: issue #28727 I consider that the issue #28727 is a minor enhancement and so is still good

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-17 Thread STINNER Victor
STINNER Victor added the comment: > The key is based on (action, message, category, module). I think you should > add item[4] (lineno). Oops, right! -- ___ Python tracker

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-17 Thread Martin Panter
Martin Panter added the comment: I didn’t really like adding the _add_filter() special handling in the first place, but I went ahead because I couldn’t think of a better way to avoid the problem with reloading the warnings modules. So unless anyone can suggest anything better, I am okay with

[issue28159] Deprecate isdst argument in email.utils.localtime

2016-11-17 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hi Alexander, Is the idea here to raise deprecation warning starting in 3.6 and remove it by 3.8? Thanks :) -- nosy: +Mariatta ___ Python tracker

[issue28730] __reduce__ not being called in dervied extension class from datetime.datetime

2016-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: That is because some datetime classes now define __reduce_ex__ instead of __reduce__ (see issue24773). It has higher priority. -- nosy: +belopolsky, serhiy.storchaka ___ Python tracker

[issue24764] cgi.FieldStorage can't parse multipart part headers with Content-Length and no filename in Content-Disposition

2016-11-17 Thread Bert JW Regeer
Bert JW Regeer added the comment: I've uploaded a patchset to bug #2 that fixes this issue by fixing make_file, and doesn't cause Python to throw out the content-length information. It also fixes FieldStorage for when you provide it a non-multipart form submission and there is no list in

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2016-11-17 Thread Bert JW Regeer
Bert JW Regeer added the comment: @berker.peksag: Attached is a patch with a test case that exercises this issue. Code path is that read_single() checks if the length is greater than 0, and then it reads binary, otherwise it reads it as a single line. This fixes make_file so that if

[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-17 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: 1. So, is it ok to remove the endtime parameter now? 2. Can the attached downloadfile.htm be removed? It's a spam. Thanks :) -- nosy: +Mariatta ___ Python tracker

[issue28723] tkinter, radiobutton, indicatoron=0 has no effect.

2016-11-17 Thread Simon Holland
Simon Holland added the comment: FYI, it seems that the Tk team are unable to use cocoa for this functionality so indicatoron has not worked on OSX for Radiobuttons or Checkbuttons for over 4 years. On 17 November 2016 at 18:21, Simon Holland wrote: > > Simon Holland

[issue28728] test_host_resolution in test_socket fails on duplicate assert

2016-11-17 Thread R. David Murray
R. David Murray added the comment: It might be interesting to stick a 'with subtest' in there and see which address is failing to raise. -- nosy: +r.david.murray ___ Python tracker

[issue28728] test_host_resolution in test_socket fails on duplicate assert

2016-11-17 Thread Martin Panter
Martin Panter added the comment: That’s not exactly a duplicate; one is host-by-NAME, the other host-by-ADDR -- nosy: +martin.panter ___ Python tracker

[issue28730] __reduce__ not being called in dervied extension class from datetime.datetime

2016-11-17 Thread Jeff Reback
New submission from Jeff Reback: xref to https://github.com/pandas-dev/pandas/issues/14679. pandas has had a cython extension class to datetime.datetime for quite some time. A simple __reduce__ is defined. def __reduce__(self): object_state = self.value, self.freq, self.tzinfo

[issue28729] Exception from sqlite3 adapter masked by sqlite3.InterfaceError

2016-11-17 Thread Julien Palard
Julien Palard added the comment: I missed an occurrence of this "if/else" block, and by changing it, a lot of tests are failing, typically: ```== ERROR: CheckBlob (sqlite3.test.types.SqliteTypeTests)

[issue28729] Exception from sqlite3 adapter masked by sqlite3.InterfaceError

2016-11-17 Thread Julien Palard
Julien Palard added the comment: Problems looks from `Modules/_sqlite/statement.c`: ``` if (!_need_adapt(current_param)) { adapted = current_param; } else { adapted = pysqlite_microprotocols_adapt(current_param, (PyObject*)_PrepareProtocolType, NULL); if (adapted) {

[issue28673] When using pyro4 with more than 15 threads, python 2.7.12 cores frequently

2016-11-17 Thread Michael Hu
Michael Hu added the comment: Could you please look into the core (attached into this bug) to figure out? This issue does not happen always. We are tight on resource to reproduce this. -- ___ Python tracker

[issue28729] Exception from sqlite3 adapter masked by sqlite3.InterfaceError

2016-11-17 Thread Peter Inglesby
New submission from Peter Inglesby: The following code raises `sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.` when I would expect it to raise `AssertionError: Problem in adapter`. import sqlite3 class Point: def __init__(self, x, y): self.x,

[issue28724] Add method send_io, recv_io to the socket module.

2016-11-17 Thread Julien Palard
Julien Palard added the comment: Hi, thanks for your contribution! Documentation give examples implementation of your methods: - https://docs.python.org/3/library/socket.html#socket.socket.sendmsg - https://docs.python.org/3/library/socket.html#socket.socket.recvmsg and from here, some

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2016-11-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45526/update_one_slot2-2.7.patch ___ Python tracker ___

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2016-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are updated patches with tests for 3.x and 2.7. -- components: +Interpreter Core nosy: +serhiy.storchaka stage: -> patch review versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 -Python 2.6 Added file:

[issue28684] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2016-11-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: -giampaolo.rodola ___ Python tracker ___ ___

[issue28684] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2016-11-17 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-17 Thread Matthew Barnett
Matthew Barnett added the comment: I hope you make it clear what you mean by 'equal', i.e. that it's comparing the pattern and the flags (AFAICT), so re.compile('(?x)a') != re.compile('(?x) a '). -- ___ Python tracker

[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat): write a new smtp server with asyncio

2016-11-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___

[issue25002] Deprecate asyncore/asynchat

2016-11-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___

[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett ___ Python tracker ___

[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added comments on Rietveld. -- nosy: +serhiy.storchaka stage: -> patch review ___ Python tracker ___

[issue28728] test_host_resolution in test_socket fails on duplicate assert

2016-11-17 Thread SilentGhost
New submission from SilentGhost: Commit 540a9c69c2ea introduced double assertRaises which now is failing on ubuntu 16.10 If it is necessary, then it's not obvious why and there is no comment, but here is the one-line patch that removes the duplicated line and makes the test pass for me.

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-11-17 Thread Xiang Zhang
Xiang Zhang added the comment: > Your patch looks to be introducing a number of changes to the structure of > the data being passed around between threads and even monitored/indirectly > shared across processes. That's why I say even myself don't like it. To solve an edge case some long

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-11-17 Thread Davin Potts
Davin Potts added the comment: @xiang.zhang: Your patch looks to be introducing a number of changes to the structure of the data being passed around between threads and even monitored/indirectly shared across processes. It's looking increasingly high risk to me. We already have logic for

[issue28708] Low FD_SETSIZE limit on Windows

2016-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > To implement an efficient event loop, IOCP is the way to do: the asyncio > module supports it using ProactorEventLoop. Not everyone uses asyncio, though, so it would still be nice to see the select() limit raised anyway. Implementing your own event loop

[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-17 Thread STINNER Victor
STINNER Victor added the comment: > Ten subtest in test_re fail with: TypeError: unhashable type: > '_sre.SRE_Pattern' Oops, right. Updated patch implements also hash() on patterns. -- Added file: http://bugs.python.org/file45523/pattern_compare-2.patch

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-11-17 Thread Xiang Zhang
Xiang Zhang added the comment: Here is a patch which is just a try. I don't quite like the implementation but I can not figure out a better solution. The examples in this one and #28696 seems to work and no test fails currently. -- Added file:

[issue28725] Awaiting an awaitable returned from an async function does nothing

2016-11-17 Thread Yury Selivanov
Yury Selivanov added the comment: This isn't a bug. Python doesn't magically unwind awaitables, you have to do that yourself: async def two(): await (await one()) Broadly speaking, returning awaitables from coroutines is an anti-pattern. Closing this one. Feel free to re-open or ask

[issue28726] py.exe launches wrong version

2016-11-17 Thread Pravic Ehysta
Pravic Ehysta added the comment: Well, I deleted outdated registry keys, now it works fine. Thanks for helping and I am going to close this issue since it isn't a bug. -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue28726] py.exe launches wrong version

2016-11-17 Thread Steve Dower
Steve Dower added the comment: Were Python 3.5 and 3.4 installed into the same location? That would explain some of the problems. It looks like it's finding it from the 3.4 key and then skipping the 3.5 key because the path is the same - hence "py -3.5" doesn't find it. Also, we apparently

[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-17 Thread SilentGhost
SilentGhost added the comment: Ten subtest in test_re fail with TypeError: unhashable type: '_sre.SRE_Pattern' -- nosy: +SilentGhost ___ Python tracker

[issue28726] py.exe launches wrong version

2016-11-17 Thread Pravic Ehysta
Pravic Ehysta added the comment: d:\>py -3.5 launcher build: 32bit launcher executable: Console File 'C:\Users\owle\AppData\Local\py.ini' non-existent File 'C:\Windows\py.ini' non-existent Called with command line: -3.5 locating Pythons in 64bit registry locate_pythons_for_key:

[issue26941] android: test_threading hangs on armv7

2016-11-17 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- stage: patch review -> commit review ___ Python tracker ___

[issue26940] android: test_importlib hangs on armv7

2016-11-17 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- stage: patch review -> commit review ___ Python tracker ___

[issue26939] android: test_functools hangs on armv7

2016-11-17 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- stage: patch review -> commit review ___ Python tracker ___

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-17 Thread STINNER Victor
STINNER Victor added the comment: FYI Python 2.7 is not impacted by this bug because it seems like reimporting warnings.py twice gets a new fresh list from _warnings.filters. I don't undertand how/why. -- versions: +Python 3.5, Python 3.6 ___

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-17 Thread STINNER Victor
STINNER Victor added the comment: > * Fix warnings._add_filter() to implement a custom comparator operator for > regular expression objects: compare pattern and flags Attached patch warnings_key.patch implements this. I really dislike the patch :-( -- keywords: +patch Added file:

[issue28726] py.exe launches wrong version

2016-11-17 Thread Steve Dower
Steve Dower added the comment: Can you do "set PYLAUNCH_DEBUG=1" and then run "py -3.4" again and paste the full output? Also, is there anything unusual about how you installed Python? Did you customize any settings? -- ___ Python tracker

[issue28726] py.exe launches wrong version

2016-11-17 Thread Pravic Ehysta
New submission from Pravic Ehysta: d:\>py -3.5 Requested Python version (3.5) not installed d:\>py -3.3 Requested Python version (3.3) not installed d:\>py -3.4 Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits"

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-17 Thread Eryk Sun
Eryk Sun added the comment: Thanks, Serihy. When I looked at this previously, I mistakenly assumed that any undefined codes would be decoded using the codepage's default Unicode character. But for single-byte codepages in the range above 0x9F, Windows instead maps undefined codes to the

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-17 Thread STINNER Victor
STINNER Victor added the comment: > * Implement comparision in _sre.SRE_Pattern I wrote a patch and opened the issue #28727: "Implement comparison (x==y and x!=y) for _sre.SRE_Pattern". -- ___ Python tracker

[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-17 Thread STINNER Victor
New submission from STINNER Victor: Attached patch implements rich comparison for _sre.SRE_Pattern objects created by re.compile(). Comparison between patterns is used in the warnings module to not add duplicated filters, see issue #18383: New changeset f57f4e33ba5e by Martin Panter in

[issue28725] Awaiting an awaitable returned from an async function does nothing

2016-11-17 Thread Gavin Panella
New submission from Gavin Panella: The following will sleep: async def one(): await asyncio.sleep(10) async def two(): await one() loop.run_until_complete(two()) but the following will not: async def one(): return asyncio.sleep(10) async def two(): await

[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-17 Thread STINNER Victor
STINNER Victor added the comment: Hum, this issue is a regression caused by the issue #23839. The environment warning was already fixed by the issue #18383 (duplicate: issue #26742): New changeset f57f4e33ba5e by Martin Panter in branch '3.5': Issue #18383: Avoid adding duplicate filters when

[issue28724] Add method send_io, recv_io to the socket module.

2016-11-17 Thread Shinya Okano
New submission from Shinya Okano: This patch makes it easy to pass file descriptor in using AF_UNIX. Ruby language libraries have such methods. see slso: - https://docs.ruby-lang.org/en/2.3.0/UNIXSocket.html#method-i-send_io -- components: Library (Lib) files:

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-11-17 Thread Xiang Zhang
Xiang Zhang added the comment: What's more, this case seems non-reentrant. Since there is no task in this case, the job id is always 0 which is not true. This means after the first time, we can not set even the exception. -- ___ Python tracker

[issue27945] Various segfaults with dict

2016-11-17 Thread INADA Naoki
INADA Naoki added the comment: I modified the patch to avoid incref when pair is not list, because tuple is common for such case. But I can't get back original performance. (python 2.7 is modified version of patch) inada-n@test1:~/work/bench$ ~/local/py27/bin/master -m perf timeit --rigorous

[issue28684] [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user

2016-11-17 Thread Xavier de Gaye
Xavier de Gaye added the comment: With this patch, test_asyncio runs successfully with no ResourceWarning when run on the android-24 emulator. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file45518/test_asyncio_bind.patch

[issue27945] Various segfaults with dict

2016-11-17 Thread INADA Naoki
INADA Naoki added the comment: I'm sorry, dict.fromkeys() didn't use PyDict_MergeFromSeq2(). This may be microbench for worst case: $ ~/local/py35/bin/master -m perf timeit --rigorous --python ~/local/py35/bin/patched --compare-to ~/local/py35/bin/master -s 'L = [(i,i) for i in

[issue25924] investigate if getaddrinfo(3) on OSX is thread-safe

2016-11-17 Thread A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: Here's a retelling of this bug report as a silly fantasy saga: https://engineering.mongodb.com/post/the-saga-of-concurrent-dns-in-python-and-the-defeat-of-the-wicked-mutex-troll/ -- ___ Python tracker

[issue27945] Various segfaults with dict

2016-11-17 Thread INADA Naoki
INADA Naoki added the comment: Only patch which affects to hot loop is: --- a/Objects/dictobject.c Tue Nov 15 21:21:35 2016 -0500 +++ b/Objects/dictobject.c Wed Nov 16 11:40:51 2016 + @@ -1550,11 +1550,18 @@ PyDict_MergeFromSeq2(PyObject *d, PyObje /* Update/merge with

[issue27945] Various segfaults with dict

2016-11-17 Thread INADA Naoki
INADA Naoki added the comment: I run performance 0.5.0 on Python 3.5. Since it took long time even without -b all option, I haven't run it for Python 2.7 yet. On Python 3.5: $ ./venv/cpython3.5-846d5b1f0b61/bin/python -m perf compare_to py35-master.json py35-patched.json -G Slower (14): -

[issue28723] tkinter, radiobutton, indicatoron=0 has no effect.

2016-11-17 Thread Simon Holland
Simon Holland added the comment: Thank you On 17 November 2016 at 15:29, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Works to me on Linux (identical results with Tkinter and Tk). In any case > if there is some bug on your platform, this is not

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-17 Thread Xiang Zhang
Xiang Zhang added the comment: In Py3.6, it raises error: >>> next((pool.imap(str, gen( Traceback (most recent call last): File "/opt/lib/python3.7/multiprocessing/pool.py", line 684, in next item = self._items.popleft() IndexError: pop from an empty deque During handling of the

[issue7659] Attribute assignment on object() instances raises wrong exception

2016-11-17 Thread Pascal Chambon
Pascal Chambon added the comment: I guess it can, since retrocompatibility prevents some normalization here. Or is it worth updating the doc about "AttributeError", misleading regarding the type of exception expected in this case ? -- status: pending -> open

[issue26926] test_io large file test failure on 32 bits Android platforms

2016-11-17 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue26931] android: test_distutils fails

2016-11-17 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue7659] Attribute assignment on object() instances raises wrong exception

2016-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could this issue be closed now? -- nosy: +serhiy.storchaka status: open -> pending ___ Python tracker ___

[issue28699] Imap from ThreadPool behaves unexpectedly

2016-11-17 Thread Xiang Zhang
Xiang Zhang added the comment: Hi Davin, could it be fixed like this? diff -r 05a728e1da15 Lib/multiprocessing/pool.py --- a/Lib/multiprocessing/pool.py Wed Nov 16 16:35:53 2016 -0800 +++ b/Lib/multiprocessing/pool.py Thu Nov 17 16:35:38 2016 +0800 @@ -398,7 +398,7 @@

[issue28723] tkinter, radiobutton, indicatoron=0 has no effect.

2016-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Works to me on Linux (identical results with Tkinter and Tk). In any case if there is some bug on your platform, this is not Tkinter bug, but Tk bug. Tkinter doesn't handle this option specially, it just pass it to Tk. File a bug on Tk bugtracker:

[issue26926] test_io large file test failure on 32 bits Android platforms

2016-11-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset d616304b82aa by Xavier de Gaye in branch '3.6': Issue #26926: Skip some test_io tests on platforms without large file support https://hg.python.org/cpython/rev/d616304b82aa New changeset 878f91b4ad19 by Xavier de Gaye in branch 'default': Issue

[issue26786] bdist_msi duplicates directories with names in ALL CAPS to a bogus location

2016-11-17 Thread Ivan Pozdeev
Changes by Ivan Pozdeev : -- versions: +Python 3.7 ___ Python tracker ___ ___

[issue28712] Non-Windows mappings for a couple of Windows code pages

2016-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Eryk. That is what I want. I just missed that code_page_decode() returns a tuple. Seems Windows maps undefined codes to Unicode characters if they are in the range 0x80-0x9f and makes an error if they are outside of this range. But if the code

[issue26931] android: test_distutils fails

2016-11-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset cea3b621973f by Xavier de Gaye in branch '3.6': Issue 26931: Skip the test_distutils tests using a compiler executable https://hg.python.org/cpython/rev/cea3b621973f New changeset 99d69fd1b24e by Xavier de Gaye in branch 'default': Issue 26931: