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

2019-04-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur that this should be closed. We have a decade of evidence that no one really needs this. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2019-04-14 Thread Steve Dower
Steve Dower added the comment: I don't recall where I got the empty string from, but it's certainly what I've used there for a while. Maybe it's required in register_namespace() to set the default namespace? -- ___ Python tracker

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

2019-04-14 Thread ppperry
ppperry added the comment: See also issue32615 -- nosy: +ppperry ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32782] memoryview & ctypes: incorrect itemsize for empty array

2019-04-14 Thread Eric Wieser
Eric Wieser added the comment: > Revising the code example to use an empty array I think you mean >>> import array >>> memoryview(array.array('H', [])).itemsize 2 Your example is an array containing 0, not an empty array - but the conclusion is the same. > It is technically un-necessary

[issue36619] when is os.posix_spawn(setsid=True) safe?

2019-04-14 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +nanjekyejoannah, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32782] memoryview & ctypes: incorrect itemsize for empty array

2019-04-14 Thread Stefan Krah
Stefan Krah added the comment: I agree that it is a ctypes issue, itemsize should be equal to struct.calcsize(fmt), which is never 0 for normal PEP-3118 types like the one in the example. [Pedantically, I think that the grammar would allow for an empty record "T{}" that would have

[issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs

2019-04-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Fixing one case is better than fixing no cases. -- nosy: +skrah, terry.reedy ___ Python tracker ___

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

2019-04-14 Thread Michael Felt
Michael Felt added the comment: On 14/04/2019 18:04, Michael Felt wrote: > Is this a good way to get started? So, as an example - seems to be many attributes in test/support/__init__.py diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 5bd15a2..e20567f 100644 ---

[issue32782] memoryview & ctypes: incorrect itemsize for empty array

2019-04-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: https://docs.python.org/3/library/stdtypes.html#typememoryview says "itemsize The size in bytes of each element of the memoryview" Revising the code example to use an empty array: >>> import array, struct >>> m = memoryview(array.array('H', [0]) >>> m.itemsize

[issue32782] memoryview & ctypes: incorrect PEP3118 itemsize for empty array

2019-04-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is actually about memoryview.itemsize within ctypes. -- components: +ctypes title: memoryview gives incorrect PEP3118 itemsize for empty array -> memoryview & ctypes: incorrect PEP3118 itemsize for empty array

[issue32782] ctypes: memoryview gives incorrect PEP3118 itemsize for array of length zero

2019-04-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: This issue is about the itemsize attribute of instances of the built-in memoryview class. Ctypes in only involved in providing format information. Hence the nosy additions. On Win10 with 3.8, ctypes has no uint attributes. Using 'c_int32' instead, I see

[issue32782] memoryview gives incorrect PEP3118 itemsize for empty array

2019-04-14 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: ctypes: memoryview gives incorrect PEP3118 itemsize for array of length zero -> memoryview gives incorrect PEP3118 itemsize for empty array ___ Python tracker

[issue30840] Contrary to documentation, relative imports cannot pass through the top level

2019-04-14 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- keywords: +patch pull_requests: +12756 stage: -> patch review ___ Python tracker ___ ___

[issue27326] SIGSEV in test_window_funcs of test_curses

2019-04-14 Thread Xavier de Gaye
Xavier de Gaye added the comment: Cannot reproduce the crash with Python 3.7.3 on ncurses 6.1. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue36630] failure of test_colors_funcs in test_curses with ncurses 6.1

2019-04-14 Thread Xavier de Gaye
New submission from Xavier de Gaye : ncurses version: 6.1 TERM: screen-256color $ ./python -m test -u curses test_curses Run tests sequentially 0:00:00 load avg: 0.55 [1/1] test_curses test test_curses failed -- Traceback (most recent call last): File "/path/to/Lib/test/test_curses.py", line

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 3c5a858ec6a4e5851903762770fe526a46d3c351 by Stefan Behnel in branch 'master': bpo-30485: Re-allow empty strings in ElementPath namespace mappings since they might actually be harmless and unused (and thus went undetected previously). (#12830)

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: The script seems to generally assume that "" is a good representation for "no prefix", i.e. the default namespace, although that is IMHO more correctly represented as None. It's not very likely that this is the only script out there that makes that

[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2019-04-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Test that your fix does not break the case of 8-bit non-ascii docstring. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2019-04-14 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: The relevant line is at https://github.com/python/cpython/blob/cd466559c4a312b3c1223a774ad4df19fc4f0407/PC/layout/support/appxmanifest.py#L407 . I guess it's something related to build artifacts for Windows and Steve can have a better answer over

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: Interesting. Thanks for investigating this. It looks like the script "appxmanifest.py" uses an empty string as prefix for a lookup: File "D:\a\1\s\PC\layout\support\appxmanifest.py", line 407, in get_appxmanifest node = xml.find("m:Identity", NS) I

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2019-04-14 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +12755 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs

2019-04-14 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2019-04-14 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am not sure but this commit seems to have broken Azure CI on master for Windows. The build checks were green when the PR while merging. I can see the ValueError added in e9927e1820caea01e576141d9a623ea394d43dad raised in the below CI log and

[issue16079] list duplicate test names with patchcheck

2019-04-14 Thread miss-islington
miss-islington added the comment: New changeset 9f9e029bd2223ecba46eaefecadf0ac252d891f2 by Miss Islington (bot) in branch '3.7': bpo-16079: fix duplicate test method name in test_gzip. (GH-12827) https://github.com/python/cpython/commit/9f9e029bd2223ecba46eaefecadf0ac252d891f2 --

[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2019-04-14 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This is still an issue with latest 2.7. I went ahead and created PR based on Victor's suggestion in msg121294. I am not sure of the correct way to test this I have used cStringIO.StringIO as the stream for a test case with a unicode description

[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2019-04-14 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +12754 stage: test needed -> patch review ___ Python tracker ___

[issue16079] list duplicate test names with patchcheck

2019-04-14 Thread Gregory P. Smith
Change by Gregory P. Smith : -- type: enhancement -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16079] list duplicate test names with patchcheck

2019-04-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +12753 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16079] list duplicate test names with patchcheck

2019-04-14 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset cd466559c4a312b3c1223a774ad4df19fc4f0407 by Gregory P. Smith in branch 'master': bpo-16079: fix duplicate test method name in test_gzip. (GH-12827) https://github.com/python/cpython/commit/cd466559c4a312b3c1223a774ad4df19fc4f0407 --

[issue16079] list duplicate test names with patchcheck

2019-04-14 Thread Gregory P. Smith
Change by Gregory P. Smith : -- components: +Tests ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16079] list duplicate test names with patchcheck

2019-04-14 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +easy versions: +Python 3.7, Python 3.8 -Python 3.3, Python 3.4 ___ Python tracker ___

[issue16079] list duplicate test names with patchcheck

2019-04-14 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +12752 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing

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

2019-04-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I proposed to move bundled pip and setuptools to the external repository and download them at build time like Tcl and other dependencies on Windows. -- ___ Python tracker

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

2019-04-14 Thread Michael Felt
Michael Felt added the comment: I took a peak at test.support. a) I see that while many tests import test.support, or from test.support import - not all tests use this. b) I see that only 35 .py files in Lib/test have the string sys.platform.startswith, and there are 76 files that have

[issue36626] asyncio run_forever blocks indefinitely

2019-04-14 Thread Dan Timofte
Dan Timofte added the comment: i will provide a patch, i'll make a pull request next week. a call to self._write_to_self() should also be added to create_task() before it returns . i'll make the correction for this as well. -- ___ Python tracker

[issue36629] imaplib test fails with errno 101

2019-04-14 Thread Marat Sharafutdinov
Marat Sharafutdinov added the comment: I see this error on my local Bamboo CI (runs on CentOS 7). -- ___ Python tracker ___ ___

[issue36629] imaplib test fails with errno 101

2019-04-14 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Did you see this failure somewhere in CI or is it in local machine? The imaplib test has below comment : if hasattr(errno, 'EADDRNOTAVAIL'): # socket.create_connection() fails randomly with # EADDRNOTAVAIL on Travis CI.

[issue36628] Enhancement: i-Strings

2019-04-14 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Some discussions in the past and the common suggestion/idiom is to use textwrap.dedent. I agree with @SilentGhost that it should be first brought up in python-ideas and also addressing the concerns for similar proposal in the past if they are

[issue36629] imaplib test fails with errno 101

2019-04-14 Thread Marat Sharafutdinov
New submission from Marat Sharafutdinov : == FAIL: test_imap4_host_default_value (test.test_imaplib.TestImaplib) -- Traceback (most recent call last): File

[issue13127] xml.dom.Attr.name is not labeled as read-only

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: The intended interface seems to be to change .name rather than .localName, so yes, that should be documented somewhere. The implementation seems a bit funny in that a "self._localName", if set, takes precedence, but there doesn't seem to be an official way

[issue36628] Enhancement: i-Strings

2019-04-14 Thread SilentGhost
SilentGhost added the comment: This type of enhancements should be in the first place discussed on python-ideas mailing list and a PEP would probably be needed at the second stage. Not that I think it's likely this suggestion has much chance. What you're desiring can already be implemented

[issue35967] Better platform.processor support

2019-04-14 Thread Jason R. Coombs
Jason R. Coombs added the comment: In PR 12824 (https://github.com/python/cpython/pull/12824), I've developed a test that should assure the current output from uname().processor. I've merged those changes with PR 12239, which if the tests pass, should illustrate the values returned are

[issue36628] Enhancement: i-Strings

2019-04-14 Thread Aditya Shankar
New submission from Aditya Shankar : Problem: multiline strings are a pain to represent (other than of-course in docstrings), representing a multiline string inside a function looks something like this - def foo(): # some code ... ... # some code text = """abc meta alpha

[issue13927] Document time.ctime format

2019-04-14 Thread Harmandeep Singh
Harmandeep Singh added the comment: I have updated the PR, this time I have kept it really simple, and have added examples showing both the cases. -- ___ Python tracker ___

[issue13127] xml.dom.Attr.name is not labeled as read-only

2019-04-14 Thread Cheryl Sabella
Cheryl Sabella added the comment: Stefan, Do you think this should be documented? -- nosy: +cheryl.sabella, scoder ___ Python tracker ___

[issue35278] [security] directory traversal in tempfile prefix

2019-04-14 Thread Oliver Bestwalter
Oliver Bestwalter added the comment: I am not sure if this justifies a new issue so I add this here. The suffix parameter can also be used for a traversal attack. It is possible to completely clobber anything in dir and prefix (at least on Windows). e.g. calling mkdtemp or

[issue36626] asyncio run_forever blocks indefinitely

2019-04-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: Callin `self._write_to_self()` from `loop.stop()` should fix your problem. Would you provide a patch? -- ___ Python tracker ___

[issue36626] asyncio run_forever blocks indefinitely

2019-04-14 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36627] composing generator expression doesn't work as expected

2019-04-14 Thread SilentGhost
SilentGhost added the comment: I probably won't be able to better explain the issue then Benjamin did in the referenced issue. Just to note, that (...) in your code are called generator expressions. -- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open ->

[issue36231] no "proper" header files on macOS 10.14 Mojave

2019-04-14 Thread Dmitrii Pasechnik
Dmitrii Pasechnik added the comment: In case,I have opened PR https://github.com/python/cpython/pull/12825 to provide our solution to this issue. -- ___ Python tracker ___

[issue36231] no "proper" header files on macOS 10.14 Mojave

2019-04-14 Thread Dmitrii Pasechnik
Change by Dmitrii Pasechnik : -- pull_requests: +12750 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36627] composing filter() doesn't work as expected

2019-04-14 Thread Tsvika Shapira
New submission from Tsvika Shapira : the following code: ``` lists_to_filter = [ ['a', 'exclude'], ['b'] ] # notice that when 'exclude' is the last element, the code returns the expected result for exclude_label in ['exclude', 'something']: lists_to_filter = (labels_list for

[issue31658] xml.sax.parse won't accept path objects

2019-04-14 Thread Stefan Behnel
Change by Stefan Behnel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31658] xml.sax.parse won't accept path objects

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks for your contribution. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue31658] xml.sax.parse won't accept path objects

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset 929b70473829f04dedb8e802abcbd506926886e1 by Stefan Behnel (Mickaël Schoentgen) in branch 'master': bpo-31658: Make xml.sax.parse accepting Path objects (GH-8564) https://github.com/python/cpython/commit/929b70473829f04dedb8e802abcbd506926886e1

[issue31658] xml.sax.parse won't accept path objects

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: PR looks good to me. Doesn't look critical enough for a backport, though. -- nosy: +scoder versions: -Python 3.6, Python 3.7 ___ Python tracker

[issue17013] Allow waiting on a mock

2019-04-14 Thread László Kiss Kollár
Change by László Kiss Kollár : -- nosy: +lkollar ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36625] Obsolete comments in docstrings in fractions module

2019-04-14 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed that these should be fixed. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36622] Inconsistent exponent notation formatting

2019-04-14 Thread Mark Dickinson
Mark Dickinson added the comment: FWIW, here's where that "at least two digits" is encoded in the CPython source: https://github.com/python/cpython/blob/bf94cc7b496a379e1f604aa2e4080bb70ca4020e/Python/pystrtod.c#L1227 *If* we wanted to, it would be an easy change to get rid of the extra

[issue36622] Inconsistent exponent notation formatting

2019-04-14 Thread Mark Dickinson
Mark Dickinson added the comment: Indeed it's deliberate. When the Decimal type was introduced, the "at least two exponent digits" behaviour of float formatting was already long established. But the specification that the Decimal type was based on (and the extensive test cases from the same

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: Thank you for you contribution. -- components: +XML resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: I've merged the PR. It matches the implementation that has been released in lxml almost two years ago. -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 ___

[issue30485] Element.findall(path, dict) doesn't insert null namespace

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset e9927e1820caea01e576141d9a623ea394d43dad by Stefan Behnel in branch 'master': bpo-30485: support a default prefix mapping in ElementPath by passing None as prefix (#1823)

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset ffca16e25a70fd44a87b13b379b5ec0c7a11e926 by Stefan Behnel (Bernt Røskar Brenna) in branch 'master': bpo-36227: ElementTree.tostring() default_namespace and xml_declaration arguments (GH-12225)

[issue36622] Inconsistent exponent notation formatting

2019-04-14 Thread Stefan Krah
Stefan Krah added the comment: Yes, I'd think the decisions are deliberate. Floats follow printf(), this is from the manual for 'e': "The exponent always contains at least two digits; if the value is zero, the exponent is 00." And decimal follows the specification at

[issue36600] re-enable test in nntplib

2019-04-14 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-14 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

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

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

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

2019-04-14 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

[issue36626] asyncio run_forever blocks indefinitely

2019-04-14 Thread Dan Timofte
Change by Dan Timofte : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-04-14 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