[issue36600] re-enable test in nntplib

2019-04-13 Thread Marcin Niemira
Marcin Niemira added the comment: Hey, Yes, it does. Closing issue and PR. Cheers! -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue36180] mboxMessage.get_payload throws TypeError on malformed content type

2019-04-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: A simplified reproducer as below. The tuple is returned from here https://github.com/python/cpython/blob/830b43d03cc47a27a22a50d777f23c8e60820867/Lib/email/message.py#L93 and perhaps is an untested code path? The charset gets a tuple value of ('utf-

[issue1402289] Allow mappings as globals (was: Fix dictionary subclass ...)

2019-04-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am willing to close it. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue31954] Don't prevent dict optimization by coupling with OrderedDict

2019-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It the pure Python implementation PyDict_GetItem also returns value, not node of linked list. > How about raising DeprecationWarning when OrderedDict is passed to PyDict_* APIs? This would violate the Liskov substitution principle and add an overhead for u

[issue36626] asyncio run_forever blocks indefinitely

2019-04-13 Thread Dan Timofte
Change by Dan Timofte : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2019-04-13 Thread Martin Panter
Martin Panter added the comment: Victor, if you run the test suite, one of the test cases should trigger the overflow. I used to compile with Undefined Behaviour Sanitizer to print messages when these errors occur; see for my setup at the time. I

[issue31954] Don't prevent dict optimization by coupling with OrderedDict

2019-04-13 Thread Inada Naoki
Inada Naoki added the comment: There are some more aggressive ideas. When Eric created C version of OrderedDict, he intended to use it for PEP 468. Unlike pure Python implementation, PyDict_GetItem returns value, not node of linked list. But now, PEP 468 is implemented in regular dict. How a

[issue36626] asyncio run_forever blocks indefinitely

2019-04-13 Thread Dan Timofte
New submission from Dan Timofte : after starting run_forever if all scheduled tasks are consumed run_once will issue a KqueueSelector.select(None) which will block indefinitely : https://www.freebsd.org/cgi/man.cgi?query=select&sektion=2&apropos=0&manpath=FreeBSD+12.0-RELEASE+and+Ports#DESCRIPT

[issue36622] Inconsistent exponent notation formatting

2019-04-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems this has tests at https://github.com/python/cpython/blob/830b43d03cc47a27a22a50d777f23c8e60820867/Lib/test/test_decimal.py#L941 . I also noticed the below. Considering this is the behavior from 2.7 is it a conscious design decision? >>> '{:.

[issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator

2019-04-13 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +alanmcintyre, serhiy.storchaka, twouters versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.9 ___ Python tracker __

[issue1402289] Allow mappings as globals (was: Fix dictionary subclass ...)

2019-04-13 Thread Inada Naoki
Inada Naoki added the comment: 13 years past from this proposed. Is this still good feature for Python? Personally, I dislike adding more dynamic flexibility to Python name space. Python is very dynamic language, and it made difficult to make Python faster. For example, PHP is not so dynamic

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-04-13 Thread Inada Naoki
Inada Naoki added the comment: Now PyGC_Head is 16byte on 64bit platform. Maybe, should we just change obmalloc in Python 3.8? How about 32bit platforms? What can we do for Python 3.7 and 2.7? -- ___ Python tracker

[issue36427] Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread

2019-04-13 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36427] Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread

2019-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 7723d0545c3369e1b2601b207c250c70ce90b75e by Pablo Galindo in branch '3.7': [3.7] bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread (GH-12541) (GH-12820) https://github.com/python/cpython

[issue36593] isinstance check fails for Mock objects with spec executed under tracing function

2019-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks @xtreak for the analysis and the quick fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue35967] Better platform.processor support

2019-04-13 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +12749 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue35967] Better platform.processor support

2019-04-13 Thread Jason R. Coombs
Jason R. Coombs added the comment: > I don't quite follow: since you are the author of the tool, you can of course have your uname.py import platform and then apply one of the above tricks. I thought I'd tried that, but failed [ref](https://github.com/jaraco/cmdix/issues/1#issuecomment-462207

[issue17267] datetime.time support for '+' and '-'

2019-04-13 Thread Martin Panter
Martin Panter added the comment: A real use case that I have had was with a protocol to activate a device with a daily schedule. The protocol takes start and end hours and minutes of the day. To test the device by activating it over the next few minutes, my ideal way would have taken the curr

[issue24417] Type-specific documentation for __format__ methods

2019-04-13 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +cheryl.sabella ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue1402289] Allow mappings as globals (was: Fix dictionary subclass ...)

2019-04-13 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: -after moratorium nosy: +inada.naoki versions: +Python 3.8 -Python 3.5 ___ Python tracker ___ ___

[issue36625] Obsolete comments in docstrings in fractions module

2019-04-13 Thread Jakub Moliński
Change by Jakub Moliński : -- keywords: +patch pull_requests: +12747 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue36625] Obsolete comments in docstrings in fractions module

2019-04-13 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue36625] Obsolete comments in docstrings in fractions module

2019-04-13 Thread Jakub Moliński
New submission from Jakub Moliński : 3 docstrings in fractions.Fraction contain comments referring to python 3.0. def __floor__(a): """Will be math.floor(a) in 3.0.""" def __ceil__(a): """Will be math.ceil(a) in 3.0.""" def __round__(self, ndigits=None): """Will be round(self, ndi

[issue30519] [threading] Add daemon argument to Timer

2019-04-13 Thread Cheryl Sabella
Change by Cheryl Sabella : -- title: Add daemon argument to Timer -> [threading] Add daemon argument to Timer ___ Python tracker ___ ___

[issue30519] Add daemon argument to Timer

2019-04-13 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +pitrou versions: +Python 3.8 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue34850] Emit a syntax warning for "is" with a literal

2019-04-13 Thread Anthony Sottile
Anthony Sottile added the comment: Should this also produce warnings for `list` / `dict` / `set` literals? ``` $ python3.8 Python 3.8.0a3 (default, Mar 27 2019, 03:46:44) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> x is [] False >>> x is {}

[issue36593] isinstance check fails for Mock objects with spec executed under tracing function

2019-04-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: An interesting thing is that there is GCC in CI that runs under coverage which also passed since this requires a Python tracing function before importing mock to trigger this as in the original report. Adding a simple tracer at the top of testmock.

[issue36593] isinstance check fails for Mock objects with spec executed under tracing function

2019-04-13 Thread miss-islington
miss-islington added the comment: New changeset f3a9d722d77753f5110e35f46bd61732c0cb81c1 by Miss Islington (bot) in branch '3.7': bpo-36593: Fix isinstance check for Mock objects with spec executed under tracing (GH-12790) https://github.com/python/cpython/commit/f3a9d722d77753f5110e35f46bd6

[issue36593] isinstance check fails for Mock objects with spec executed under tracing function

2019-04-13 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +12746 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue36593] isinstance check fails for Mock objects with spec executed under tracing function

2019-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 830b43d03cc47a27a22a50d777f23c8e60820867 by Pablo Galindo (Xtreak) in branch 'master': bpo-36593: Fix isinstance check for Mock objects with spec executed under tracing (GH-12790) https://github.com/python/cpython/commit/830b43d03cc47a27

[issue23768] assert on getting the representation of a thread in atexit function

2019-04-13 Thread Xavier de Gaye
Change by Xavier de Gaye : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue22991] test_gdb leaves the terminal in raw mode with gdb 7.8.1

2019-04-13 Thread Xavier de Gaye
Change by Xavier de Gaye : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue36608] Replace bundled pip and setuptools with a downloader in the ensurepip module

2019-04-13 Thread Pradyun Gedam
Pradyun Gedam added the comment: (Not sure how the Roundup handles email replies but I'm hoping this goes to the right place) I think it would be better if the downloading got invoked during the interpreter build process -- to download the wheels and add them to the final distribution. This le

[issue16079] list duplicate test names with patchcheck

2019-04-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: Upgrading the script to account for Python changes. This is now duplicate_code_names_3.py $ ./python ./duplicate_code_names_3.py --ignore ignored_duplicates Lib/test Duplicate method names: Lib/test/test_dataclasses.py:1406 TestCase.test_helper_asdict_builtin

[issue36427] Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread

2019-04-13 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +12745 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue36585] test_posix.py fails due to unsupported RWF_HIPRI

2019-04-13 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 ___ Python tracker ___ _

[issue36427] Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread

2019-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset fde9b33dfeedd4a4ed723b12d2330979dc684760 by Pablo Galindo in branch 'master': bpo-36427: Document that PyEval_RestoreThread and PyGILState_Ensure can terminate the calling thread (GH-12541) https://github.com/python/cpython/commit/fde9b3

[issue36585] test_posix.py fails due to unsupported RWF_HIPRI

2019-04-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +12744 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36623] Clean unused parser headers

2019-04-13 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36623] Clean unused parser headers

2019-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset f2cf1e3e2892a6326949c2570f1bb6d6c95715fb by Pablo Galindo in branch 'master': bpo-36623: Clean parser headers and include files (GH-12253) https://github.com/python/cpython/commit/f2cf1e3e2892a6326949c2570f1bb6d6c95715fb -- ___

[issue17013] Allow waiting on a mock

2019-04-13 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +12743 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue16254] Make PyUnicode_AsWideCharString() increase temporary

2019-04-13 Thread Inada Naoki
Inada Naoki added the comment: fixed by #30863 -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5 ___ Python tracker

[issue17013] Allow waiting on a mock

2019-04-13 Thread Mario Corchero
Mario Corchero added the comment: Kooning great! I would Add a test for the following (I think both fails with the proposed impl): - The mock is called BEFORE calling wait_until_called_with - I call the mock with arguments and then I call wait for call without arguments. - using keyword argum

[issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator

2019-04-13 Thread Ramsey Kant
Ramsey Kant added the comment: I would second this PR. The Win32 API that creates ZIP64 files produces ZIP64 files with the "diskno" as 0 and "disks" as 0 (instead of "1" as indicated by the spec). -- nosy: +Ramsey Kant versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8, Pyth

[issue21110] Slowdown and high memory usage when adding a new module in embedded Python 3.4 on 64bit Windows

2019-04-13 Thread MrValdez
MrValdez added the comment: Its a shame the link is now gone. Its also been a long time that I don't remember all the details. I still have my code from back when I found this bug. I can try to replicate it. > We don't support compilers other than MSVC on Windows > [...] > rubenvb is not mai

[issue36616] Optimize thread state handling in function call code

2019-04-13 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Mark, Petr, do you agree? I like the way how the reference implementation of PEP 590 improves the handling of profiling. However, that change really has little to do with PEP 590, it's something that we can do independently. -- _

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-13 Thread STINNER Victor
STINNER Victor added the comment: I tried to add constants to test.support once to identify operating systems, nbut I had to revert the change. I am not sure that there is any problem here. Leaving the code unchanged is also fine :-) -- nosy: +vstinner __

[issue21110] Slowdown and high memory usage when adding a new module in embedded Python 3.4 on 64bit Windows

2019-04-13 Thread STINNER Victor
STINNER Victor added the comment: In case of doubt, I suggest to close the issue. If the issue strikes back, it is trivial to reopen the issue or open a new one. -- ___ Python tracker ___

[issue17013] Allow waiting on a mock

2019-04-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks Mario for the feedback. > I see you inherit from Mock, should it inherit from MagicMock? yes, it can inherit from MagicMock to mock magic methods and to wait on their call. I thought some more about waiting for function call with arguments.

[issue16254] Make PyUnicode_AsWideCharString() increase temporary

2019-04-13 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue17259] Document round half to even rule for floats

2019-04-13 Thread Cheryl Sabella
Cheryl Sabella added the comment: It doesn't seem there have been other bugs reported related to this. However, if it's still agreed that the documentation should be clarified, I think a link from `locale.format_string()` (note, format() has been deprecated, hence the change in the name) to

[issue36588] change sys.platform() to just "aix" for AIX

2019-04-13 Thread Michael Felt
Michael Felt added the comment: On 12/04/2019 23:16, Michael Felt wrote: > Agreed, in case of doubt - leave alone (never change a winning team). > > And, to make it a short reply - I'll get started, and we see where it > leads us. I opened issue36624 (https://bugs.python.org/issue36624) - befo

[issue36624] cleanup the stdlib and tests with regard to sys.platform usage

2019-04-13 Thread Michael Felt
New submission from Michael Felt : Back in 2012 (issue12326 and issue12795), and just recently (issue36588) sys.platform has been modified (and documented) to not return the platform version. Additionally, the recommendation is to use the form sys.platform.startswith() - to continue to be ba

[issue18610] wsgiref.validate expects wsgi.input read to give exactly one arg

2019-04-13 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker ___

[issue18610] wsgiref.validate expects wsgi.input read to give exactly one arg

2019-04-13 Thread Cheryl Sabella
Cheryl Sabella added the comment: New changeset f8716c88f13f035c126fc1db499ae0ea309c7ece by Cheryl Sabella in branch 'master': bpo-18610: Update wsgiref.validate docstring for wsgi.input read() (GH-11663) https://github.com/python/cpython/commit/f8716c88f13f035c126fc1db499ae0ea309c7ece

[issue15035] array.array of UCS2 values

2019-04-13 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue15917] hg hook to detect unmerged changesets

2019-04-13 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue17068] peephole optimization for constant strings

2019-04-13 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue17013] Allow waiting on a mock

2019-04-13 Thread Mario Corchero
Mario Corchero added the comment: I think this is REALLY interesting!, there are many situations where this has been useful, it would greatly improve multithreading testing in Python. Q? I see you inherit from Mock, should it inherit from MagicMock? I'd say send the PR and the discussion can

[issue36594] Undefined behavior due to incorrect usage of %p in format strings

2019-04-13 Thread Stefan Krah
Stefan Krah added the comment: gcc warns with -pedantic: ptr.c: In function ‘main’: ptr.c:5:13: warning: format ‘%p’ expects argument of type ‘void *’, but argument 2 has type ‘int *’ [-Wformat=] printf ("%p", &i); It is pedantic indeed, I wonder if machines with different pointer sizes

[issue36594] Undefined behavior due to incorrect usage of %p in format strings

2019-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Are not all pointer types (except pointers to functions) automatically converted to/from void*. -- ___ Python tracker ___

[issue31743] Proportional Width Font on Generated Python Docs PDFs

2019-04-13 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +eric.araujo, ezio.melotti, mdk, willingc ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue36594] Undefined behavior due to incorrect usage of %p in format strings

2019-04-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue33922] [Windows] Document the launcher's -64 suffix

2019-04-13 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue2007] cookielib lacks FileCookieJar class for Internet Explorer

2019-04-13 Thread Inada Naoki
Inada Naoki added the comment: I don't think adding MSIE support is not worth enough for now. -- nosy: +inada.naoki resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue21110] Slowdown and high memory usage when adding a new module in embedded Python 3.4 on 64bit Windows

2019-04-13 Thread Inada Naoki
Inada Naoki added the comment: * rubenvb is not maintained. * https://forums.embarcadero.com/message.jspa?messageID=581594 is dead link. * When PY_SSIZE_T is not defined, we use intptr_t, not int. Original issue report doesn't make sense to me. But we can't confirm it for now. -- ___

[issue35734] Remove unused _BaseV4._is_valid_netmask in ipaddress

2019-04-13 Thread Inada Naoki
Inada Naoki added the comment: New changeset e59ec1b05d3e1487ca7754530d3748446c9b7dfd by Inada Naoki (Rémi Lapeyre) in branch 'master': bpo-35734: ipaddress: remove unused methods (GH-11591) https://github.com/python/cpython/commit/e59ec1b05d3e1487ca7754530d3748446c9b7dfd -- nosy: +i

[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2019-04-13 Thread Aymeric Augustin
Aymeric Augustin added the comment: A very similar issue came up here: https://github.com/aaugustin/websockets/issues/593 When raising an exception that gathers multiple sub-exceptions, it would be nice to be able to iterate the exception to access the sub-exceptions. -- nosy: +ayme

[issue19113] duplicate test names in Lib/ctypes/test/test_functions.py

2019-04-13 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue17267] datetime.time support for '+' and '-'

2019-04-13 Thread Andreas Åkerlund
Change by Andreas Åkerlund : -- nosy: -thezulk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue17013] Allow waiting on a mock

2019-04-13 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Is there still sufficient interest in this? I gave an initial try at this based on my limited knowledge of mock and Antoine's idea. I created a new class WaitableMock that inherits from Mock and accepts an event_class with threading.Event as default