[issue36490] Modernize function signature format in Archiving section of shutil doc

2019-03-31 Thread Inada Naoki
Inada Naoki added the comment: I don' think they are modern-style vs legacy-style. When explicit default value is present, the default value is documented in signature like `param=42`. On the other hand, when default value is not explicit (just an placeholder), the parameter is expressed

[issue34160] ElementTree not preserving attribute order

2019-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Stefan, as the module maintainer, you get to make the final decision on this. What you've proposed makes sense in light of the prior discussion and the python-dev discussion. Unless you think something new will come along to change your mind, just mark

[issue36466] Adding a way to strip annotations from compiled bytecode

2019-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here are some quick measurements on a single module¹ that uses typing. It shows about a 7% space savings between the baseline and patched versions: -rw-r--r-- 1 raymond staff 3490 Mar 31 15:07 kmeans.cpython-38.opt-2.pyc -rw-r--r-- 1 raymond staff

[issue36484] Can't reorder TLS 1.3 ciphersuites

2019-03-31 Thread Eman Alashwali
Eman Alashwali added the comment: Thanks. Just to clarify regarding your comment: "Applications shouldn't modify the cipher suites any more.": I use python to develop scripts for running experiments, which requires me to simulate specific clients precisely including their TLS 1.3 ciphers

[issue36493] Add math.midpoint(a,b) function

2019-03-31 Thread Christian Heimes
Christian Heimes added the comment: What's the argument for midpoint(inf, -inf) == 0? This feels wrong to me. I'm certainly not an expert on math, but I still remember that there are different kinds of infinities. For examples 'n**n' approaches infinity 'faster' than '-(2**n)'. --

[issue36484] Can't reorder TLS 1.3 ciphersuites

2019-03-31 Thread Christian Heimes
Christian Heimes added the comment: I don't have plans to implement cipher suite selection for TLS 1.3 any time soon, maybe not at all. TLS 1.3 changed cipher selection a lot, making the API more complicated. The signature algorithm and key agreement groups are handled as separate

Re: Syntax for one-line "nonymous" functions in "declaration style"

2019-03-31 Thread Ian Kelly
On Sun, Mar 31, 2019 at 1:09 PM Alexey Muranov wrote: > > On dim., Mar 31, 2019 at 6:00 PM, python-list-requ...@python.org wrote: > > On Sat, Mar 30, 2019, 5:32 AM Alexey Muranov > > > > wrote: > > > >> > >> On ven., Mar 29, 2019 at 4:51 PM, python-list-requ...@python.org > >> wrote: > >> > >

Re: Syntax for one-line "nonymous" functions in "declaration style"

2019-03-31 Thread Alexey Muranov
On dim., Mar 31, 2019 at 6:00 PM, python-list-requ...@python.org wrote: On Sat, Mar 30, 2019, 5:32 AM Alexey Muranov wrote: On ven., Mar 29, 2019 at 4:51 PM, python-list-requ...@python.org wrote: > > There could perhaps be a special case for lambda expressions such > that, > when

[issue32538] Multiprocessing Manager on 3D list - no change of the list possible

2019-03-31 Thread Berker Peksag
Change by Berker Peksag : -- components: +Library (Lib) -Interpreter Core ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32538] Multiprocessing Manager on 3D list - no change of the list possible

2019-03-31 Thread Berker Peksag
Berker Peksag added the comment: I'm a bit late to reply, but I think you are using the API wrong. Please try the following snippet: from multiprocessing import Manager manager = Manager() data = manager.list([manager.list([manager.list(['', '', '', '', '', '', '', '', '', '', '',

[issue36150] Possible assertion failures due to _ctypes.c's PyCData_reduce()

2019-03-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36150] Possible assertion failures due to _ctypes.c's PyCData_reduce()

2019-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5e233951d931acc0e927100c51e9a27a2791b6a5 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-36150: Fix possible assertion failures due to _ctypes.c's PyCData_reduce(). (GH-12106) (GH-12642)

[issue36150] Possible assertion failures due to _ctypes.c's PyCData_reduce()

2019-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a110817c080ca3c2f3262350b5d7e0c0582527e6 by Serhiy Storchaka (Zackery Spytz) in branch '2.7': bpo-36150: Fix possible assertion failures due to _ctypes.c's PyCData_reduce(). (GH-12106) (GH-12643)

[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it is. Thank you Karthikeyan! -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Non-informative error message in index() and remove() functions ___ Python tracker

[issue30587] Mock with spec object does not ensure method call signatures

2019-03-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- pull_requests: -4411 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30587] Mock with spec object does not ensure method call signatures

2019-03-31 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am slightly concerned if spec should gain more responsibility than just validating attribute access which is mentioned in the docs. With the linked PR spec below would also validate the signature which is not done in Python 3.7 so this might

[issue36496] Local variables can be used uninitialized in _PyPreConfig_Read()

2019-03-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36496] Local variables can be used uninitialized in _PyPreConfig_Read()

2019-03-31 Thread Brad Larsen
Change by Brad Larsen : -- keywords: +patch pull_requests: +12576 stage: -> patch review ___ Python tracker ___ ___

[issue36496] Local variables can be used uninitialized in _PyPreConfig_Read()

2019-03-31 Thread Brad Larsen
New submission from Brad Larsen : In bpo-36301, in commit f72346c47537657a287a862305f65eb5d7594fbf, a couple possible uses of uninitialized variables were introduced into Python/preconfig.c. In particular, in _PyPreConfig_Read(), along an error-handling path, the `init_utf8_mode` and

[issue36150] Possible assertion failures due to _ctypes.c's PyCData_reduce()

2019-03-31 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +12575 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-31 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > And seems that this issue is a duplicate of an old issue with a long > discussion and an unfinished patch, but currently I cannot find that issue. possibly duplicate of issue13349 which was rejected ? -- nosy: +xtreak

[issue36466] Adding a way to strip annotations from compiled bytecode

2019-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: > So as long as we have a separate mechanism to disable this I'm not worried Having a separate mechanism is a good solution. -- ___ Python tracker

[issue30587] Mock with spec object does not ensure method call signatures

2019-03-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30587] Mock with spec object does not ensure method call signatures

2019-03-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +cjw296, mariocj89, michael.foord versions: +Python 3.8 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue36150] Possible assertion failures due to _ctypes.c's PyCData_reduce()

2019-03-31 Thread miss-islington
Change by miss-islington : -- pull_requests: +12574 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36150] Possible assertion failures due to _ctypes.c's PyCData_reduce()

2019-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5f2c50810a67982b0c80f6d3258fee3647f67005 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-36150: Fix possible assertion failures due to _ctypes.c's PyCData_reduce(). (GH-12106)

[issue35947] Update libffi_msvc to current version of libffi

2019-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 48600c72c1afe1096c2412a135a43f8cdd895195 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-35947: Fix a compiler warning in _ctypes.c's StructUnionType_paramfunc(). (GH-12629)

[issue32531] gdb.execute can not put string value.

2019-03-31 Thread Berker Peksag
Change by Berker Peksag : -- hgrepos: -377 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32531] gdb.execute can not put string value.

2019-03-31 Thread Berker Peksag
Berker Peksag added the comment: gdb.execute() is part of GDB's Python API and maintained by GDB maintainers. This tracker is for issues with Python interpreter and its standard library. -- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> closed

[issue36442] Different ValueError for the same operation in List and Tuple

2019-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thus is definitely is not related to Argument Clinic. And seems that this issue is a duplicate of an old issue with a long discussion and an unfinished patch, but currently I cannot find that issue. -- components: -Argument Clinic type: behavior

[issue36466] Adding a way to strip annotations from compiled bytecode

2019-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: There's a similar thing with docstrings though. Some code depend on docstrings (e.g. David Beazley's parser generator). help() of course also depends on it. And yet we have a way to disable it. (Same with asserts, plenty of code depends on them even

From parsing a class to code object to class to mappingproxy to object (oh my!)

2019-03-31 Thread adam . preble
I have been mimicking basic Python object constructs successfully until I started trying to handle methods as well in my hand-written interpreter. At that point, I wasn't sure where to stage all the methods before they get shuffled over to an actual instance of an object. I'm having to slap

[issue36494] bdb.Bdb.set_trace: should set f_trace_lines = True

2019-03-31 Thread daniel hahler
Change by daniel hahler : -- components: +Library (Lib) title: bdb: should set f_trace_lines = True -> bdb.Bdb.set_trace: should set f_trace_lines = True type: -> behavior ___ Python tracker

[issue35272] sqlite3 get the connected database url

2019-03-31 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36495] Out-of-bounds array reads in Python/ast.c

2019-03-31 Thread SilentGhost
Change by SilentGhost : -- nosy: +gvanrossum versions: -Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36495] Out-of-bounds array reads in Python/ast.c

2019-03-31 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +12573 stage: -> patch review ___ Python tracker ___ ___

[issue36495] Out-of-bounds array reads in Python/ast.c

2019-03-31 Thread Brad Larsen
New submission from Brad Larsen : There are currently 2 places in Python/ast.c on master where an out-of-bounds array read can occur. Both were introduced with the merge of of typed_ast into CPython in commit dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c (bpo-35766, GH-11645). In both places, the

[issue28559] Unclear error message when raising wrong type of exceptions

2019-03-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36494] bdb: should set f_trace_lines = True

2019-03-31 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +12572 stage: -> patch review ___ Python tracker ___ ___

[issue36494] bdb: should set f_trace_lines = True

2019-03-31 Thread daniel hahler
New submission from daniel hahler : bdb.Bdb.set_trace should set "f_trace_lines = True" on frames explicitly. Otherwise they might be skipped if something else has set it to False already, e.g. via a suggested change for coverage.py to set this for performance reasons

[issue36440] more helpful diagnostics for parser module

2019-03-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.8 -Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36253] Use after free in ctypes test suite

2019-03-31 Thread Brad Larsen
Brad Larsen added the comment: I was just going to submit a patch for this, then I found this issue. I can confirm; I see the same use-after-free without the fix. -- nosy: +blarsen ___ Python tracker

[issue36493] Add math.midpoint(a,b) function

2019-03-31 Thread Stefan Behnel
New submission from Stefan Behnel : I recently read a paper¹ about the difficulty of calculating the most exact midpoint between two floating point values, facing overflow, underflow and rounding errors. The intention is to assure that the midpoint(a,b) is - actually within the interval [a,b]

[issue28718] '*' matches entire path in fnmatch

2019-03-31 Thread Toon Verstraelen
Toon Verstraelen added the comment: Just for reference, here are a few more implementations of the same idea, next to pywildcard, sometimes combined with other useful features: - https://github.com/LawfulHacker/fnmatch2 - https://github.com/demurgos/py-pathmatch -

[issue36485] Add a way to clear all caches

2019-03-31 Thread Ma Lin
Ma Lin added the comment: > My initial idea was to add a lightweight module cachesreg with two functions: > register() and clear_caches(). If it only has two functions, it could be a sub-module sys.cachesreg Or a lifecycle module, as the name, dedicated to such kind of functions. Register

[issue36485] Add a way to clear all caches

2019-03-31 Thread Anders Hovmöller
Anders Hovmöller added the comment: I think this is a great idea. We would have needed this many times for tests over the years. -- nosy: +Anders.Hovmöller ___ Python tracker

[issue18233] SSLSocket.getpeercertchain()

2019-03-31 Thread Hiroaki Kawai
Change by Hiroaki Kawai : -- nosy: +Hiroaki.Kawai ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36473] dictkeysobject: Add maximum iteration check for .values() and .items()

2019-03-31 Thread Thomas Perl
Thomas Perl added the comment: Repurposing this as per: https://github.com/python/cpython/pull/12619#issuecomment-478076996 -- title: Detect all dictionary changes during iteration -> dictkeysobject: Add maximum iteration check for .values() and .items()

[issue34160] ElementTree not preserving attribute order

2019-03-31 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks to the discussion that rhettinger triggered on python-dev, it seems that there is a majority accordance for considering the previous ordering "undefined but deterministic" rather than "sorted", and for making the change from "arbitrarily sorted" to

[issue36485] Add a way to clear all caches

2019-03-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +12571 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36485] Add a way to clear all caches

2019-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My initial idea was to add a lightweight module cachesreg with two functions: register() and clear_caches(). PR 12639 implements it. But I like Brett's idea more, because it is simpler. The only disadvantage of it is that if you make a typo in

[issue27181] Add geometric mean to `statistics` module

2019-03-31 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +12570 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36485] Add a way to clear all caches

2019-03-31 Thread Ma Lin
Ma Lin added the comment: I suggest the documentation be written in more detail. For example, in __clearcache__'s section, state explicitly that this magic function is for module-level cache, and it will be invoked by sys.clear_caches(). Maybe also introduce the background: some caches may

[issue36492] Deprecate passing some conflicting arguments by keyword

2019-03-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +12569 stage: -> patch review ___ Python tracker ___ ___

[issue36492] Deprecate passing some conflicting arguments by keyword

2019-03-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36492] Deprecate passing some conflicting arguments by keyword

2019-03-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : As Steve mentioned in the discussion about PEP 570 [1], some changes of parameters to positional-only are breaking (although there is no breaks in the stdlib code). Before making parameters positional-only we should add a deprecation warning for passing

[issue36491] sum function's start optional parameter documented in help but not implemented

2019-03-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- superseder: -> Make *start* usable as a keyword argument for sum(). ___ Python tracker ___

[issue36491] sum function's start optional parameter documented in help but not implemented

2019-03-31 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36491] sum function's start optional parameter documented in help but not implemented

2019-03-31 Thread Stefan Behnel
Stefan Behnel added the comment: Yes, duplicate of issue34637. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36490] Modernize function signature format in Archiving section of shutil doc

2019-03-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +giampaolo.rodola, tarek ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36491] sum function's start optional parameter documented in help but not implemented

2019-03-31 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Is this about sum not accepting start as keyword argument? It's fixed with issue34637. The help function in the report is that start could only be a positional argument with start appearing before '/' in "sum(iterable, start=0, /)" . This has been

[issue36491] sum function's start optional parameter documented in help but not implemented

2019-03-31 Thread Stefan Behnel
Stefan Behnel added the comment: It's currently implemented as a positional argument, not a keyword argument. Thus the "/" at the end of the signature in the help text. That also suggests that it was a conscious decision, not an oversight. Personally, I'd also prefer it if it was available

[issue36491] sum function's start optional parameter documented in help but not implemented

2019-03-31 Thread Camion
New submission from Camion : >>> help(sum) Help on built-in function sum in module builtins: sum(iterable, start=0, /) Return the sum of a 'start' value (default: 0) plus an iterable of numbers When the iterable is empty, return the start value. This function is intended