[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-30 Thread INADA Naoki
INADA Naoki added the comment: New changeset cdcac039fb447f2ab04efcacbe663751bb2cb4ec by INADA Naoki (cocoatomo) in branch 'master': bpo-29952: Use usual terminology of dict (GH-917) https://github.com/python/cpython/commit/cdcac039fb447f2ab04efcacbe663751bb2cb4ec -- nosy:

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM in general. I was going to make similar changes. While we a here, maybe add the function name to other TypeError messages specific to the function? "Required argument '%U' (pos %d) not found" and "Argument given by name ('%U') and position (%d)", but

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-30 Thread Kinebuchi Tomohiko
Changes by Kinebuchi Tomohiko : -- pull_requests: +818 ___ Python tracker ___ ___

[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-30 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- nosy: +palaviv ___ Python tracker ___ ___ Python-bugs-list

[issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree with your rationale Nick, but _Py_SET_FINALIZED is a little too long and highlight only the second function of the macro. I don't have good name. -- ___ Python tracker

[issue28810] Document bytecode changes in 3.6

2017-03-30 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +817 ___ Python tracker ___ ___

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-03-30 Thread Dominic Mayers
Dominic Mayers added the comment: On the other hand, it occurs to me that this seems way more flexible than passing the object through the server, because you share the factory with the server, not only the object. This means that you could even change the type of the handler while the server

[issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown

2017-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: I'm +1 for _Py_SET_FINALIZED with the semantics Serhiy suggests, and +0 for _Py_SET_ONCE. My rationale for that preference is that _Py_SET_ONCE is a misnomer in the presence of * multiple Py_Initialize/Py_Finalize cycles; and/or * _Py_SETREF calls that replace

[issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent

2017-03-30 Thread Kinebuchi Tomohiko
New submission from Kinebuchi Tomohiko: In the section "6.10.1. Value comparisons" [1]_:: Equality comparison of the keys and elements enforces reflexivity. would be Equality comparison of the keys and values enforces reflexivity. because we usually call an entry of dict as "key-value

[issue29944] Argumentless super() calls do not work in classes constructed with type()

2017-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: Right, there's a very similar instance-method-reuse related problem described in http://bugs.python.org/issue29270, where ctypes re-uses a class namespace is define a swapped-endianness version of the originally defined class. The easiest place to deflect

[issue29946] compiler warning "sqrtpi defined but not used"

2017-03-30 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-30 Thread INADA Naoki
INADA Naoki added the comment: https://gist.github.com/methane/8faf12621cdb2166019bbcee65987e99 This patch fixes the regression. But I think it is still larger than idiomatic. See this code: code: minused *= 2; /* Find the smallest table size > minused. */ /* XXX speed-up with

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-03-30 Thread Dominic Mayers
Changes by Dominic Mayers : -- resolution: wont fix -> status: closed -> open ___ Python tracker ___

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-03-30 Thread Dominic Mayers
Dominic Mayers added the comment: Finally, I looked around and people just use the server to pass any extra parameter. I do find it awkward, but it works and it is simple, in fact simpler than having to define a factory object. I don't close it, because I will be happy to see another opinion.

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-03-30 Thread Dominic Mayers
Dominic Mayers added the comment: One way to make the factory optional is to offer a MixIn. I attached a file with a FactoryMixIn. It's just that I find it awkward that the proposed approach is to pass the extra parameters in a subclassed server. More modern approaches should also be offered.

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-30 Thread Michael Seifert
Changes by Michael Seifert : -- pull_requests: +816 ___ Python tracker ___ ___

[issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function"

2017-03-30 Thread Michael Seifert
New submission from Michael Seifert: Some exceptions thrown by `PyArg_ParseTupleAndKeywords` refer to "function" or "this function" even when a function name was specified. For example: >>> import bisect >>> bisect.bisect_right([1,2,3,4], 2, low=10) TypeError: 'low' is an invalid keyword

[issue29533] urllib2 works slowly with proxy on windows

2017-03-30 Thread Steve Dower
Steve Dower added the comment: I think the point is that we don't want to be grabbing settings like this from other configuration locations. Ideally, there'd be a way to provide a list of "don't bypass the proxy for these names", which a caller could then read from the IE configuration if

[issue29950] Rename SlotWrapperType to WrapperDescriptorType

2017-03-30 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: The name SlotWrapperType was added in #29377 but it added the type based on the repr of the object instead of it's type as `type(object.__init__)` results in. I proposed this be named to WrapperDescriptorType to avoid and any unecessary confusion

[issue29251] Class __dict__ is only a mapping proxy

2017-03-30 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: I believe the docs defined that, usually using a bold "CPython implementation detail" sentence. It seems like it's something that would be considered an implementation detail, though, according to Raymond's answer here:

[issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad

2017-03-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: *Way* too wordy. In msg278666, I suggested minimal and terse alternatives. a. /exactly/nearly/ b. add "except that a 0 conversion flag is not ignored when a precision is given for d, i, o, u, x and X conversion types" --

[issue22392] Clarify documentation of __getinitargs__

2017-03-30 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue22392] Clarify documentation of __getinitargs__

2017-03-30 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 2ee01ecf419a392f0b6a33ca10d1f747adb6c43a by Mariatta (Mandeep Singh) in branch '2.7': [2.7] bpo-22392: Improve documentation for __getinitargs__ (GH-899) https://github.com/python/cpython/commit/2ee01ecf419a392f0b6a33ca10d1f747adb6c43a

[issue29751] PyLong_FromString documentation wrong on numbers with leading zero and base=0

2017-03-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: String arguments to int are quoted int literals. From https://docs.python.org/3/reference/lexical_analysis.html#literals 'Underscores are ignored for determining the numeric value of the literal. They can be used to group digits for enhanced readability. One

[issue29751] PyLong_FromString documentation wrong on numbers with leading zero and base=0

2017-03-30 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review versions: +Python 3.6, Python 3.7 ___ Python tracker ___

[issue29887] test_normalization doesn't work

2017-03-30 Thread STINNER Victor
STINNER Victor added the comment: Oh, Zachary reported me the following failure which is legitimate. The code doesn't handle correctly read-only library directory. The test should try to write the file in a temporary file, or simply skip the test.

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Thomas Wouters
Changes by Thomas Wouters : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29751] PyLong_FromString documentation wrong on numbers with leading zero and base=0

2017-03-30 Thread Cheryl Sabella
Cheryl Sabella added the comment: I have a pull request ready for the documentation, but I didn't understand the underscore usage, so I couldn't add that. If you explain it, then I can try to add it. -- nosy: +csabella ___ Python tracker

[issue29751] PyLong_FromString documentation wrong on numbers with leading zero and base=0

2017-03-30 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +815 ___ Python tracker ___ ___

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset d694a06206fc09b76b4507aacde5e69a248f434f by T. Wouters in branch '2.7': bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#913) https://github.com/python/cpython/commit/d694a06206fc09b76b4507aacde5e69a248f434f --

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset 9273dfe1800fc7241d69f4d523d748ebd35b3801 by T. Wouters in branch '3.5': bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#912) https://github.com/python/cpython/commit/9273dfe1800fc7241d69f4d523d748ebd35b3801 --

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset 599bb181036f724629a515317f0f39520950d51c by T. Wouters in branch '3.6': bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#911) https://github.com/python/cpython/commit/599bb181036f724629a515317f0f39520950d51c --

[issue29928] Add f-strings to Glossary

2017-03-30 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks all! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29928] Add f-strings to Glossary

2017-03-30 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 7b5b1379ac2c1e89ebf90b88b5d32457910e975e by Mariatta in branch '3.6': bpo-29928: Add f-string to the Glossary (GH-864) (GH-914) https://github.com/python/cpython/commit/7b5b1379ac2c1e89ebf90b88b5d32457910e975e --

[issue29928] Add f-strings to Glossary

2017-03-30 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +814 ___ Python tracker ___ ___

[issue29928] Add f-strings to Glossary

2017-03-30 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 33db068dac7686e37736f7ecf8abb2aee0345cf2 by Mariatta in branch 'master': bpo-29928: Add f-string to the Glossary (GH-864) https://github.com/python/cpython/commit/33db068dac7686e37736f7ecf8abb2aee0345cf2 --

[issue29941] Confusion between asserts and Py_DEBUG

2017-03-30 Thread Thomas Wouters
Thomas Wouters added the comment: Dropped the Py_DEBUG guards from the dubious asserts in the PR. -- ___ Python tracker ___

[issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. My suggestion is to rename _PY_ONCEVAR_INIT to _Py_SET_ONCE and make it returning the value. And apply this to more static and global variables. -- ___ Python tracker

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-30 Thread Jan Gosmann
Changes by Jan Gosmann : -- nosy: +jgosmann ___ Python tracker ___ ___

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-30 Thread INADA Naoki
New submission from INADA Naoki: (original thread is https://mail.python.org/pipermail/python-list/2017-March/720391.html) https://github.com/python/cpython/commit/4897300276d870f99459c82b937f0ac22450f0b6 this commit doubles sizeof set object created by set_merge(). It is used by constructor

[issue29941] Confusion between asserts and Py_DEBUG

2017-03-30 Thread Tim Peters
Tim Peters added the comment: So there's more than one issue here. First, should asserts be supported in the absence of Py_DEBUG? It seems, so far, everyone agrees they should be. Second, ...? I'm really not following your argument. It _appears_ to be something along the lines that code

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Possible workaround: use chain.from_iterable(filter(None, iterables)) instead of chain.from_iterable(iterables). But this works only when iterables are collections, not iterators. -- nosy: +serhiy.storchaka ___

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Thomas Wouters
Changes by Thomas Wouters : -- pull_requests: +811 ___ Python tracker ___ ___

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Thomas Wouters
Changes by Thomas Wouters : -- pull_requests: +812 ___ Python tracker ___ ___

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Thomas Wouters
Changes by Thomas Wouters : -- pull_requests: +813 ___ Python tracker ___ ___

[issue29935] list and tuple index methods should accept None parameters

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29935] list and tuple index methods should accept None parameters

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 079f21f873b99f9564a41c5b7f3e0d7035847ae5 by Serhiy Storchaka in branch '2.7': bpo-29935: Fixed error messages in the index() method of tuple and list (#887) (#907) (#910)

[issue29935] list and tuple index methods should accept None parameters

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8b8bde44f3912d8b2df5591ffc31d2d8c6dcca6c by Serhiy Storchaka in branch '3.5': bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887) (#907) (#909)

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Thomas Wouters
Thomas Wouters added the comment: FWIW, we ran into this in real-world cases (Youtube, I think), when we switched from using a pre-built Python interpreter to one built from source using the same optimisation and debug levels as we use for all other C/C++ code. Even so, the accompanying test

[issue29946] compiler warning "sqrtpi defined but not used"

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7a26464c6496c29244072fdd80f9b92c68174742 by Serhiy Storchaka (Louie Lu) in branch 'master': bpo-29946: Fix "sqrtpi defined but not used" (#908) https://github.com/python/cpython/commit/7a26464c6496c29244072fdd80f9b92c68174742 --

[issue29935] list and tuple index methods should accept None parameters

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +810 ___ Python tracker ___ ___

[issue29935] list and tuple index methods should accept None parameters

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +809 ___ Python tracker ___ ___

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset 5466d4af5fe76ec0a5fbc8a05675287d9e8e9d14 by T. Wouters in branch 'master': bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#889) https://github.com/python/cpython/commit/5466d4af5fe76ec0a5fbc8a05675287d9e8e9d14 --

[issue29935] list and tuple index methods should accept None parameters

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bf4bb2e43030661e568d5d4b046e8b9351cc164c by Serhiy Storchaka in branch '3.6': bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887) (#907)

[issue29941] Confusion between asserts and Py_DEBUG

2017-03-30 Thread Thomas Wouters
Thomas Wouters added the comment: What happens when you don't have the assert depends on whether the new function call raises an exception or not, and keep in mind *this is what most people see anyway*: if the new call does not raise an exception, a SystemError is raised, with the original

[issue29946] compiler warning "sqrtpi defined but not used"

2017-03-30 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +808 ___ Python tracker ___ ___ Python-bugs-list

[issue29944] Argumentless super() calls do not work in classes constructed with type()

2017-03-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: This is what I get for leaving a response up and working on it intermittently for three hours, and not rechecking: I found the same basic problem. For the record, I also found a terribly hacky way of doing this sort of rebinding manually, should you actually

[issue10030] Patch for zip decryption speedup

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29935] list and tuple index methods should accept None parameters

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +807 ___ Python tracker ___ ___

[issue10030] Patch for zip decryption speedup

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 06e522521c06671b4559eecf9e2a185c2d62c141 by Serhiy Storchaka in branch 'master': bpo-10030: Sped up reading encrypted ZIP files by 2 times. (#550) https://github.com/python/cpython/commit/06e522521c06671b4559eecf9e2a185c2d62c141 --

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-03-30 Thread Eric V. Smith
Eric V. Smith added the comment: Just a guess, but it's because this code was written at a time when subclassing was the preferred way to extend code. Now we know better :), but it's not possible to change history, unfortunately. Lots of code depends on the current behavior. If you find a

[issue29944] Argumentless super() calls do not work in classes constructed with type()

2017-03-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: It looks like this is a general problem caused by the fact that a function that is: 1. Defined in a class 2. References the name "super" (even if it's a local variable name, even if it's never called) isn't "just" a plain function. Even though Python 3

[issue29946] compiler warning "sqrtpi defined but not used"

2017-03-30 Thread Mark Dickinson
Mark Dickinson added the comment: This is almost certainly the result of #26121. +1 to moving the `sqrtpi` definition inside the relevant `#if` blocks. -- nosy: +serhiy.storchaka ___ Python tracker

[issue29935] list and tuple index methods should accept None parameters

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d4edfc9abffca965e76ebc5957a92031a4d6c4d4 by Serhiy Storchaka in branch 'master': bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887)

[issue29204] Add code deprecations in ElementTree

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The deprecation of the cElementTree module was excluded. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29935] list and tuple index methods should accept None parameters

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Raymond for your review. In any case we should first fix error messages in maintain releases. Changing signatures of methods of basic type should be discussed on the mailing lists. I don't think this needs a PEP, unless this change will be

[issue29204] Add code deprecations in ElementTree

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 762ec97ea68a1126b8855996c61fa8239dc9fff7 by Serhiy Storchaka in branch 'master': bpo-29204: Emit warnings for already deprecated ElementTree features. (#773) https://github.com/python/cpython/commit/762ec97ea68a1126b8855996c61fa8239dc9fff7

[issue29946] compiler warning "sqrtpi defined but not used"

2017-03-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +mark.dickinson, rhettinger, stutzbach ___ Python tracker ___

[issue27863] multiple issues in _elementtree module

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a6b4e1902250d6f28ca6d083ce1c8d7e9b91974b by Serhiy Storchaka in branch '3.6': bpo-27863: Fixed multiple crashes in ElementTree. (#765) (#903) https://github.com/python/cpython/commit/a6b4e1902250d6f28ca6d083ce1c8d7e9b91974b --

[issue20548] Use specific asserts in warnings and exceptions tests

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 -Python 2.7, Python 3.3, Python 3.4 ___ Python tracker

[issue29887] test_normalization doesn't work

2017-03-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 722a3af092b94983aa26f5e591fb1b45e2c2a0ff by Victor Stinner in branch 'master': bpo-29887: Test normalization now fails if download fails (#905) https://github.com/python/cpython/commit/722a3af092b94983aa26f5e591fb1b45e2c2a0ff --

[issue20548] Use specific asserts in warnings and exceptions tests

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f15c4d374a07c576c0e8349b16604f6dbad0b953 by Serhiy Storchaka in branch 'master': bpo-20548: Use specific asserts in warnings and exceptions tests (#788) https://github.com/python/cpython/commit/f15c4d374a07c576c0e8349b16604f6dbad0b953

[issue29948] DeprecationWarning when parse ElementTree with a doctype in 2.7

2017-03-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: DeprecationWarning is emitted when parse ElementTree with a doctype in 2.7. $ python2.7 -Wa Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import

[issue27863] multiple issues in _elementtree module

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since it is hard to backport the bugfix to 2.7 without test, issue15083 is a dependence. -- dependencies: +Rewrite ElementTree tests in a cleaner and safer way stage: needs patch -> backport needed ___ Python

[issue29948] DeprecationWarning when parse ElementTree with a doctype in 2.7

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Rewrite ElementTree tests in a cleaner and safer way ___ Python tracker ___

[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is hard to backport bugfixes to 2.7 since tests are too different. Due to this I backported some bugfixes without tests and omitted backporting other bugfixes. PR 906 converts doctests in 2.7 to unittests. This will help backporting bugfixes too much.

[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +806 ___ Python tracker ___ ___

[issue29944] Argumentless super() calls do not work in classes constructed with type()

2017-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: Interestingly, even `types.new_class` misbehaves in this case: ``` >>> def mydec(cls): ... return types.new_class(cls.__name__, cls.__bases__, exec_body=lambda ns: ns.update(cls.__dict__)) ... >>> @mydec ... class MyList(list): ... def insert(self, idx,

[issue29725] sqlite3.Cursor doesn't properly document "arraysize"

2017-03-30 Thread Cheryl Sabella
Cheryl Sabella added the comment: I wanted to try to work on the documentation for this, but I had some questions. I looked at: https://github.com/python/cpython/blob/master/Modules/_sqlite/cursor.c And I don't see arraysize being set to anything other than 1. I also don't see fetchall using

[issue29533] urllib2 works slowly with proxy on windows

2017-03-30 Thread Julia Dolgova
Julia Dolgova added the comment: Ok, but may be there are some Windows users, that have different opinion, who prefer to put up with this bug for the benefit of better performance. Could you leave them an opportunity to refuse this behavior of urllib? --

[issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself?

2017-03-30 Thread Dominic Mayers
New submission from Dominic Mayers: I am just curious to know if someone considered the idea of passing a factory instance that returns RequestHandlerClass instances instead of directly passing the class? It may affect existing handlers that read non local variables, but there should be a way

[issue29944] Argumentless super() calls do not work in classes constructed with type()

2017-03-30 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +ncoghlan, xiang.zhang ___ Python tracker ___ ___

[issue29945] decode string:u"\ufffd" UnicodeEncodeError

2017-03-30 Thread Eryk Sun
Eryk Sun added the comment: > windows version run success! Trying to decode a non-ASCII unicode string should raise an exception on any platform: Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or

[issue29935] list and tuple index methods should accept None parameters

2017-03-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, modifying these mature APIs is a really bad idea. They are worked well as-is of over a decade. Seeing people use None for these arguments makes the code less readable. Python has a number of APIs where the number of arguments controls the

[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-03-30 Thread Charalampos Stratakis
Changes by Charalampos Stratakis : -- nosy: +cstratak ___ Python tracker ___ ___

[issue29946] compiler warning "sqrtpi defined but not used"

2017-03-30 Thread Louie Lu
Louie Lu added the comment: I can reproduce on ArchLinux 4.10.1-1, GCC 6.3.1: /home/louielu/Python/cpython/Modules/mathmodule.c:74:21: warning: ‘sqrtpi’ defined but not used [-Wunused-const-variable=] static const double sqrtpi = 1.772453850905516027298167483341145182798; Is used by

[issue29946] compiler warning "sqrtpi defined but not used"

2017-03-30 Thread Xiang Zhang
New submission from Xiang Zhang: Ubuntu 16.10, GCC 6.2.0 /home/angwer/repos/cpython/Modules/mathmodule.c:74:21: warning: ‘sqrtpi’ defined but not used [-Wunused-const-variable=] static const double sqrtpi = 1.772453850905516027298167483341145182798; -- components: Build messages:

[issue29945] decode string:u"\ufffd" UnicodeEncodeError

2017-03-30 Thread STINNER Victor
STINNER Victor added the comment: Decoding Unicode doesn't make any sense. You should take a look at http://unicodebook.readthedocs.io/ to understand what you are doing :-) (On Python 3, Unicode strings, the str type, has no mode .decode() type.) I suggest to close the issue has NOT A BUG.

[issue29945] decode string:u"\ufffd" UnicodeEncodeError

2017-03-30 Thread webber
Changes by webber : Added file: http://bugs.python.org/file46767/windows.jpg ___ Python tracker ___ ___

[issue29945] decode string:u"\ufffd" UnicodeEncodeError

2017-03-30 Thread webber
New submission from webber: I use python on linux, version is 2.7.13: [root@localhost bin]# ./python2.7 Python 2.7.13 (default, Mar 30 2017, 00:54:08) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> a=u"\ufffd" >>>

[issue29533] urllib2 works slowly with proxy on windows

2017-03-30 Thread Paul Moore
Paul Moore added the comment: The behaviour you're describing for IE sounds like a bug to me. If you specify a host that should bypass the proxy, then that's what should happen - it shouldn't matter if you specify the host by IP address or by name. I'm -1 on Python trying to match IE bugs.

[issue29887] test_normalization doesn't work

2017-03-30 Thread STINNER Victor
STINNER Victor added the comment: Benjamin: "We should change the tests to fail if they get a 404." Good idea. Currently, the test is explicitly skipped on this case. Since "-u urlfetch" option must be explicitly passed on the command line, it makes sense to fail on that case. I proposed

[issue29887] test_normalization doesn't work

2017-03-30 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +805 ___ Python tracker ___ ___

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Mark Dickinson
Mark Dickinson added the comment: > I would have guessed that the C compiler would have automatically removed the > tail recursion I think it probably does, unless optimisation is turned off: I'm unable to reproduce except in debug builds of Python. -- nosy: +mark.dickinson

[issue29913] ipadress compare_networks does not work according to documentation

2017-03-30 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue29913] ipadress compare_networks does not work according to documentation

2017-03-30 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 16f852345bcdec1bbb15e5363fad6b33bf960912 by Xiang Zhang (s-sanjay) in branch 'master': bpo-29913: deprecate compare_networks() in documentation (GH-865) https://github.com/python/cpython/commit/16f852345bcdec1bbb15e5363fad6b33bf960912 --

[issue29942] Stack overflow in itertools.chain.from_iterable.

2017-03-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks fine. Feel free to apply and to backport this to earlier versions. I would have guessed that the C compiler would have automatically removed the tail recursion, but your experience would indicate otherwise. -- assignee: -> twouters

[issue27863] multiple issues in _elementtree module

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c90ff1b78cb79bc3762184e03fa81f11984aaa45 by Serhiy Storchaka in branch '3.5': bpo-27863: Fixed multiple crashes in ElementTree. (#765) (#904) https://github.com/python/cpython/commit/c90ff1b78cb79bc3762184e03fa81f11984aaa45 --

[issue27863] multiple issues in _elementtree module

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +804 ___ Python tracker ___ ___

  1   2   >