[issue36051] Drop the GIL during large bytes.join operations?

2019-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please provide benchmarks that demonstrate the benefit of this change. We also need to add a test for join() which covers the new code. -- ___ Python tracker

[issue39170] Sqlite3 row_factory for attribute access: NamedRow

2019-12-30 Thread Clinton James
Change by Clinton James : -- keywords: +patch pull_requests: +17204 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17768 ___ Python tracker ___ __

[issue39170] Sqlite3 row_factory for attribute access: NamedRow

2019-12-30 Thread Clinton James
New submission from Clinton James : Currently, sqlite3 returns rows by tuple or sqlite3.Row for dict-style, index access. I constantly find myself wanting attribute access like namedtuple for rows. I find attribute access cleaner without the brackets and quoting field names. However, unlike

[issue36476] Runtime finalization assumes all other threads have exited.

2019-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: Thinking about that idea further, I don't think that change would help much, since the relevant operations should already be checking for thread termination when they attempt to reacquire the GIL. That means what we're missing is: 1. When daemon threads still

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-30 Thread Bruce Merry
Bruce Merry added the comment: If we want to be conservative, we could only drop the GIL if all the buffers pass the PyBytes_CheckExact test. Presumably that won't encounter any of these problems because bytes objects are immutable? -- ___ Python

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2019-12-30 Thread Senthil Kumaran
Change by Senthil Kumaran : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue36476] Runtime finalization assumes all other threads have exited.

2019-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: Perhaps we need a threading.throw() API, similar to the one we have for generators and coroutines? If we had that, then Py_FinalizeEx() could gain a few new features: * throw SystemExit into all daemon threads and then give them a chance to terminate before c

[issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting.

2019-12-30 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset f82e59ac4020a64c262a925230a8eb190b652e87 by Senthil Kumaran in branch '2.7': [2.7] bpo-27973 - Fix for urllib.urlretrieve() failing on second ftp transfer (#1040) https://github.com/python/cpython/commit/f82e59ac4020a64c262a925230a8eb190b652e8

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2019-12-30 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset f82e59ac4020a64c262a925230a8eb190b652e87 by Senthil Kumaran in branch '2.7': [2.7] bpo-27973 - Fix for urllib.urlretrieve() failing on second ftp transfer (#1040) https://github.com/python/cpython/commit/f82e59ac4020a64c262a925230a8eb190b652e8

[issue20443] __code__. co_filename should always be an absolute path

2019-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: With the sys.argv[0] change reverted, I think this overall issue is fixed now - code objects will get absolute paths, while sys.argv[0] will continue to reflect how __main__ was identified. -- priority: -> normal resolution: -> fixed stage: patch rev

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-30 Thread Inada Naoki
Inada Naoki added the comment: > 2. If the thread tries to change the size of the bytearrays during the join > (ba1 += b'123'), it'll die with a BufferError that wasn't previously possible Makes sense. We shouldn't drop GIL while having buffer of arbitrary objects. -- _

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Closing this for now, let's open another issue if we plan to discuss calling Py_INCREF and Py_DECREF in PyObject_RichCompare or do_richcompare in the future. Thanks to everyone involved! -- resolution: -> fixed stage: patch review -> resolved

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 53f11ba7b1498133ce3ff8173d5ae2e0182a3603 by Pablo Galindo (Dong-hee Na) in branch '3.7': [3.7] bpo-38588: Fix possible crashes in dict and list when calling P… (GH-17765) https://github.com/python/cpython/commit/53f11ba7b1498133ce3ff8173d

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 2ee87913dde038436a25f1db13ee3fddd2bcc983 by Pablo Galindo (Dong-hee Na) in branch '3.8': [3.8] bpo-38588: Fix possible crashes in dict and list when calling P… (GH-17764) https://github.com/python/cpython/commit/2ee87913dde038436a25f1db13

[issue37446] Undefined behavior in Python/hamt.c

2019-12-30 Thread miss-islington
miss-islington added the comment: New changeset a278ae19b4daa1deb11e2a8eed38838027e90ece by Miss Islington (bot) in branch '3.8': closes bpo-37446: resolve undefined behavior in Python/hamt.c (GH-17727) https://github.com/python/cpython/commit/a278ae19b4daa1deb11e2a8eed38838027e90ece --

[issue37446] Undefined behavior in Python/hamt.c

2019-12-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +17203 pull_request: https://github.com/python/cpython/pull/17767 ___ Python tracker ___ __

[issue37446] Undefined behavior in Python/hamt.c

2019-12-30 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset d0c92e81aa2171228a23cb2bed36f7dab975257d by Benjamin Peterson (Batuhan Taşkaya) in branch 'master': closes bpo-37446: resolve undefined behavior in Python/hamt.c (GH-17727) https://github.com/python/cpython/commit/d0c92e81aa2171228a23cb2bed36f

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Guido van Rossum
Guido van Rossum added the comment: This is probably an issue for the new Steering Council. -- ___ Python tracker ___ ___ Python-bu

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Inada Naoki
Inada Naoki added the comment: New changeset dfef986f12dd92bd6434117bba0db3cbb4e65243 by Inada Naoki in branch 'master': bpo-38588: Optimize list comparison. (GH-17766) https://github.com/python/cpython/commit/dfef986f12dd92bd6434117bba0db3cbb4e65243 --

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Sorry, I meant that I reviewed PR 17766. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Moving INCREF and DECREF is a huge change. It is just a future idea to > prevent same type of bugs. I think it can not be backported. Now I am wondering how many other APIs are affected by the same pattern other than PyObject_RichCompareBool

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: There are more examples on duplicate #36220. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Guido, some people would like manipulation and use of globals to work with dict subclasses as well as dicts themselves. I believe that the current restriction/optimization is at least partly your work. Do you have any quick opinion, or do you think discuss

[issue39146] too much memory consumption in re.compile unicode

2019-12-30 Thread Zhipeng Xie
Zhipeng Xie <775350...@qq.com> added the comment: Hi, I tracked it down and found that this problem was introduced in python2.7.9 by following commit: https://hg.python.org/cpython/rev/ebd48b4f650d -- nosy: +serhiy.storchaka ___ Python tracker

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: This will introduce a risk of data races that didn't previously exist. If you do: ba1 = bytearray(b'\x00') * 5 ba2 = bytearray(b'\x00') * 5 ... pass references to thread that mutates them ... ba3 = b''.join((ba1, ba2)) then two things

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Inada Naoki
Inada Naoki added the comment: >> This makes list comparison 2x slower. > > This is affected by PR 17734? or PyObject_RichCompare patched? Caused by PR 17734. > Would you like to revert PR 17734? Calling Py_INCREF and Py_DECREF in > PyObject_RichCompare or do_richcompare will take the same

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Dong-hee Na
Dong-hee Na added the comment: Master Mean +- std dev: 1.08 us +- 0.02 us Before PR-17734 Mean +- std dev: 584 ns +- 12 ns New suggested . Mean +- std dev: 578 ns +- 14 ns diff --git a/Objects/object.c b/Objects/object.c index 6fc1146..b42f41a 100644 --- a/Objects/object.

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +17202 pull_request: https://github.com/python/cpython/pull/17766 ___ Python tracker ___ _

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-30 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, here's what I measure in Python 3.8.1. (I don't use IPython or notebooks so this looks a little different.) >>> timeit.timeit('Foo()', 'class Foo: pass') 0.3763025619934 >>> timeit.timeit('Foo()', 'class Foo:\n def __new__(cls): return >>> supe

[issue39167] argparse boolean type bug

2019-12-30 Thread Josh Rosenberg
Change by Josh Rosenberg : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> ArgumentParser should support bool type according to truth values ___ Python tracker ___

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Dong-hee Na
Dong-hee Na added the comment: > This makes list comparison 2x slower. This is affected by PR 17734? or PyObject_RichCompare patched? -- nosy: +corona10 ___ Python tracker __

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > This makes list comparison 2x slower. Would you like to revert PR 17734? Calling Py_INCREF and Py_DECREF in PyObject_RichCompare or do_richcompare will take the same effect, no? -- ___ Python tracker

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Inada Naoki
Inada Naoki added the comment: $ ./python -m pyperf timeit -s 'a = ["a"]*100; b = ["a"]*100;' -- 'a == b' master : Mean +- std dev: 276 ns +- 1 ns patched: Mean +- std dev: 572 ns +- 3 ns This makes list comparison 2x slower. -- ___ Python tracker

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +17201 pull_request: https://github.com/python/cpython/pull/17765 ___ Python tracker ___ _

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > How about calling Py_INCREF and Py_DECREF in PyObject_RichCompare or > do_richcompare? Apologies, I had missed this suggestion before merging the PR :( If we decide to add the check to PyObject_RichCompare or do_richcompare we should also adapt the

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +17200 pull_request: https://github.com/python/cpython/pull/17764 ___ Python tracker ___ _

[issue38588] Use-after-free in dict/list

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 2d5bf568eaa5059402ccce9ba5a366986ba27c8a by Pablo Galindo (Dong-hee Na) in branch 'master': bpo-38588: Fix possible crashes in dict and list when calling PyObject_RichCompareBool (GH-17734) https://github.com/python/cpython/commit/2d5bf5

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > exec() params are already checked, as a seconds param, only dict or dict > subclasses are accepted. Seems like good enough contract. As I said, the documentation is considered the public API contract and again, the documentation says that dict subcl

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-30 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, you already said 3.6 and 3.8 give the same effect. But what if you add a minimal __new__() to Foo? -- ___ Python tracker ___ __

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > I agree with Terry, the moment you pass a dict subclass to exec you are out > of contract. If any, we may need to sanitize the input to exec, although I > don't think is worth paying the performance price for that. exec() params are already checked, as a

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-30 Thread Guido van Rossum
Guido van Rossum added the comment: What Python version was used for the timings? If not 3.8, please do over in 3.8. -- ___ Python tracker ___

[issue39169] TypeError: 'int' object is not callable if the signal handler is SIG_IGN

2019-12-30 Thread Ronald Li
New submission from Ronald Li : The attached script ign2ndsig.py demonstrates an attempted way to handle signals at most once and ignore any subsequent signals. SIGINT and SIGTERM are used in the demo. In Python 3.5, the subprocess would go into one of the "except KeyboardInterrupt:" or "ex

[issue34938] Fix mimetype.init() to account for from import

2019-12-30 Thread Ashley Whetter
Ashley Whetter added the comment: Yes I'm happy to make those changes as part of this. So clarify what needs to change in PR 16567: 1) Include a note in the docs for `inited` that outlines that if it is imported into the local scope, it will not be updated by calls to `init()`. Only `mimety

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > The doc for exec says globals "must be a dictionary (and not a subclass of > dictionary)" I agree with Terry, the moment you pass a dict subclass to exec you are out of contract. If any, we may need to sanitize the input to exec, although I don't t

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > The doc for exec says globals "must be a dictionary (and not a subclass of > dictionary)" Docs are full of mistakes and outdated information. Fixing STORE_GLOBAL case from https://bugs.python.org/issue36220#msg359046 would be trivial and cheap re: overhe

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Victor, Pablo, I added you two since you commented on the duplicate. I believe this should be closed as 'not a bug'. The doc for globals() says is returns a 'dictionary', meaning an instance of dict. The doc for exec says globals "must be a dictionary (and

[issue34118] Fix some class entries in 'Built-in Functions'

2019-12-30 Thread miss-islington
miss-islington added the comment: New changeset ec941568bdb25e164a87a23cf1b8870ac047b4e3 by Miss Islington (bot) in branch '3.8': bpo-34118: memoryview, range, and tuple are classes (GH-17761) https://github.com/python/cpython/commit/ec941568bdb25e164a87a23cf1b8870ac047b4e3 -- ___

[issue32615] Inconsistent behavior if globals is a dict subclass

2019-12-30 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: Some smart maintainer closed https://bugs.python.org/issue36220 as a duplicate of this one. That ticket might have more details of the underlying issues. -- nosy: +pfalcon ___ Python tracker

[issue34118] Fix some class entries in 'Built-in Functions'

2019-12-30 Thread miss-islington
miss-islington added the comment: New changeset c9c17cc933dcffb9ed7f03e3f791d8cfd7acc54a by Miss Islington (bot) in branch '3.7': bpo-34118: memoryview, range, and tuple are classes (GH-17761) https://github.com/python/cpython/commit/c9c17cc933dcffb9ed7f03e3f791d8cfd7acc54a -- nosy

[issue34118] Fix some class entries in 'Built-in Functions'

2019-12-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +17199 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17763 ___ Python tracker ___ ___

[issue34118] Fix some class entries in 'Built-in Functions'

2019-12-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: I started with the agreed-on 'function' => 'class' changes and intend to follow with a PR for text changes. -- stage: patch review -> needs patch ___ Python tracker ___

[issue34118] Fix some class entries in 'Built-in Functions'

2019-12-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset ee9ff05ec22ecd47dbffdd361967ccd55963dad2 by Terry Jan Reedy in branch 'master': bpo-34118: memoryview, range, and tuple are classes (GH-17761) https://github.com/python/cpython/commit/ee9ff05ec22ecd47dbffdd361967ccd55963dad2 --

[issue34118] Fix some class entries in 'Built-in Functions'

2019-12-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +17198 pull_request: https://github.com/python/cpython/pull/17762 ___ Python tracker ___ __

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-30 Thread Ruslan Dautkhanov
Ruslan Dautkhanov added the comment: In [12]: cProfile.run("for _ in range(100_000): Bar()") 23 function calls in 0.136 seco

[issue34118] Fix some class entries in 'Built-in Functions'

2019-12-30 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +17197 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17761 ___ Python tracker ___ ___

[issue39167] argparse boolean type bug

2019-12-30 Thread Mark Dickinson
Change by Mark Dickinson : -- Removed message: https://bugs.python.org/msg359060 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39167] argparse boolean type bug

2019-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: This looks like a duplicate of #37564. -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python

[issue38967] Improve error message in enum for member name surrounded by underscore.

2019-12-30 Thread Ethan Furman
Ethan Furman added the comment: Rubén, good idea. I wonder, though, if we should say: _sunder_ names, such as "%s", are reserved for future Enum use since `_sunder_` is used in the Enum docs and is unlikely to be confused with one's own variable name. -- assignee: -> ethan.furman

[issue39167] argparse boolean type bug

2019-12-30 Thread paul j3
paul j3 added the comment: The rejected boolean type proposal: https://bugs.python.org/issue37564 -- ___ Python tracker ___ ___ Py

[issue38870] Expose ast.unparse in the ast module

2019-12-30 Thread Batuhan
Change by Batuhan : -- pull_requests: +17196 pull_request: https://github.com/python/cpython/pull/17760 ___ Python tracker ___ ___ P

[issue38610] use-after-free in list object function

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 296d45ec10fb55532bc3fac2311a3f91299ecf59 by Pablo Galindo in branch '3.7': [3.7] bpo-38610: Fix possible crashes in several list methods (GH-17022) (GH-17759) https://github.com/python/cpython/commit/296d45ec10fb55532bc3fac2311a3f91299ec

[issue38610] use-after-free in list object function

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

[issue38610] use-after-free in list object function

2019-12-30 Thread miss-islington
miss-islington added the comment: New changeset fcaf14cd9179bb48850f8f81ce8d5cee28129745 by Miss Islington (bot) in branch '3.8': bpo-38610: Fix possible crashes in several list methods (GH-17022) https://github.com/python/cpython/commit/fcaf14cd9179bb48850f8f81ce8d5cee28129745 -- n

[issue38610] use-after-free in list object function

2019-12-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +17195 pull_request: https://github.com/python/cpython/pull/17759 ___ Python tracker ___ ___

[issue38610] use-after-free in list object function

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset d9e561d23d994e3ed15f4fcbd7ee5c8fe50f190b by Pablo Galindo (Zackery Spytz) in branch 'master': bpo-38610: Fix possible crashes in several list methods (GH-17022) https://github.com/python/cpython/commit/d9e561d23d994e3ed15f4fcbd7ee5c8fe50f

[issue38610] use-after-free in list object function

2019-12-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +17194 pull_request: https://github.com/python/cpython/pull/17758 ___ Python tracker ___ __

[issue39167] argparse boolean type bug

2019-12-30 Thread paul j3
paul j3 added the comment: Despite the name, the 'type' parameter specifies a function, not a Python class. The only string that produces False is the empty one: bool(''). So 'type=bool' is valid Python, even if it isn't useful. With `nargs='+'` there's no problem with providing strings

[issue36220] LOAD_NAME and LOAD_GLOBAL, STORE_GLOBAL handle dict subclasses for globals() differently

2019-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Closed as duplicate of issue32615. -- nosy: +pablogsal resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___

[issue24955] webbrowser broken on Mac OS X when using the BROWSER variable

2019-12-30 Thread Eitan Adler
Change by Eitan Adler : -- nosy: +eitan.adler ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue36220] LOAD_NAME and LOAD_GLOBAL, STORE_GLOBAL handle dict subclasses for globals() differently

2019-12-30 Thread ppperry
ppperry added the comment: Duplicate of issue32615 -- nosy: +ppperry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-30 Thread Ned Deily
Change by Ned Deily : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue39167] argparse boolean type bug

2019-12-30 Thread Trenton Bricken
Trenton Bricken added the comment: Thank you for your quick and helpful reply. The problem with your solution is twofold: 1. it adds some cognitive load in needing to remember whether or not the flag defaults to True or False and thus whether or not you need to add it. It is easier for me

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-30 Thread Ruslan Dautkhanov
Ruslan Dautkhanov added the comment: Python typing gives an order of magnitude slow down in this case -- ___ Python tracker ___ ___

[issue39168] Generic type subscription is a huge toll on Python performance

2019-12-30 Thread Ruslan Dautkhanov
New submission from Ruslan Dautkhanov : Reported originally here - https://twitter.com/__zero323__/status/1210911632953692162 See details here https://asciinema.org/a/290643 In [4]: class Foo: pass In [5]: %timeit -n1_000_000 Foo() 88.5 ns ± 3.44 ns per loop (mean ± std. dev. of 7 runs, 10

[issue39167] argparse boolean type bug

2019-12-30 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: It seems like this is a common problem : https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse . I guess you want to store verbose=True when --verbose is passed and verbose=False when --verbose is not passed where store_

[issue39167] argparse boolean type bug

2019-12-30 Thread Trenton Bricken
Trenton Bricken added the comment: Update: I was being dumb before, the problem still remains but my work around previously was wrong. This is the new workaround: def buildBool(arg): if arg == 'False': return False else: return True --

[issue39167] argparse boolean type bug

2019-12-30 Thread Trenton Bricken
New submission from Trenton Bricken : This is a bug with argparse. Say I have: parser.add_argument('--verbose', type=bool, action='store', nargs='+', default = [False], help='turns on verbosity') If in the command line I have "--verbose False'

[issue36220] LOAD_NAME and LOAD_GLOBAL, STORE_GLOBAL handle dict subclasses for globals() differently

2019-12-30 Thread Paul Sokolovsky
Paul Sokolovsky added the comment: > I wanted to write a sandbox for Python. Sandbox indeed, it is. class NS(dict): def __setitem__(self, k, v): if not isinstance(v, type(lambda: 0)): raise RuntimeError("Global variables considered harmful") globals = NS() exec("foo

[issue39019] Missing class getitems in standard library classes

2019-12-30 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 09c482fad11c769be38b2449f1056e264b701bb7 by Ivan Levkivskyi (Batuhan Taşkaya) in branch 'master': bpo-39019: Implement missing __class_getitem__ for SpooledTemporaryFile (GH-17560) https://github.com/python/cpython/commit/09c482fad11c769be38b24

[issue39019] Missing class getitems in standard library classes

2019-12-30 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 4dc5a9df59837446ec1dc5b7a0e6ce95ae5b5cec by Ivan Levkivskyi (Batuhan Taşkaya) in branch 'master': bpo-39019: Implement missing __class_getitem__ for subprocess classes (GH-17558) https://github.com/python/cpython/commit/4dc5a9df59837446ec1dc5b7a

[issue36220] LOAD_NAME and LOAD_GLOBAL, STORE_GLOBAL handle dict subclasses for globals() differently

2019-12-30 Thread Paul Sokolovsky
Change by Paul Sokolovsky : -- nosy: +pfalcon title: LOAD_NAME and LOAD_GLOBAL handle dict subclasses for globals() differently -> LOAD_NAME and LOAD_GLOBAL, STORE_GLOBAL handle dict subclasses for globals() differently ___ Python tracker

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-30 Thread Bruce Merry
Change by Bruce Merry : -- keywords: +patch pull_requests: +17193 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17757 ___ Python tracker ___

[issue39119] email/_header_value_parser.py:parse_message_id: UnblondLocalError

2019-12-30 Thread Drew DeVault
Drew DeVault added the comment: Sorry for the delay, was travelling for the holidays. I'll check that this is not an issue with 3.8.1. Thanks! -- ___ Python tracker ___ _

[issue39125] Type signature of @property not shown in help()

2019-12-30 Thread Nguyễn Gia Phong
Nguyễn Gia Phong added the comment: Relating to this, should there also be indication about the mode (get, set, del) the property? Currently there is no way to tell if the *attribute* is read-only, read-write or write-only. -- versions: -Python 3.9 _

[issue38314] Implement unix read_pipe.is_reading() method

2019-12-30 Thread Callum Ward
Change by Callum Ward : -- pull_requests: +17192 pull_request: https://github.com/python/cpython/pull/17755 ___ Python tracker ___ _

[issue39165] Completeness and symmetry in RE, avoid `findall(...)[0]`

2019-12-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ezio.melotti, mrabarnett, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-lis

[issue39166] Python 3.9.0a2 changed how "async for" traces its final iteration

2019-12-30 Thread Ned Batchelder
New submission from Ned Batchelder : 3.9.0a2 changed how the final iteration of "async for" is traced. The body of the loop is traced when the body is not executed. Standard "for" loops don't show the same effect. In the output below, notice that 3.9.0a2 and 3.9.0a2+ both show one last exe

[issue39165] Completeness and symmetry in RE, avoid `findall(...)[0]`

2019-12-30 Thread Juancarlo Añez
New submission from Juancarlo Añez : The problematic `findall(...)[0]` is a common anti-pattern in Python programs. The reason is lack of symmetry and completeness in the `re` module. The original proposal in `python-ideas` was to add `re.findfirst(pattern, string, flags=0, default=_mark)` wit

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2019-12-30 Thread Ned Batchelder
Ned Batchelder added the comment: BTW: this is not a regression in your fix. 3.9a2 behaved this way also. -- ___ Python tracker ___ ___

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2019-12-30 Thread Ned Batchelder
Ned Batchelder added the comment: Thanks, that fixes the original case in this issue. Here is another problem which seems related enough to append here instead of opening a new issue: --- 8< import linecache, sys def trace(frame, event, a

[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread Ned Deily
Change by Ned Deily : -- assignee: -> ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue34790] Deprecate passing coroutine objects to asyncio.wait()

2019-12-30 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 89aa7f0ede1a11c020e83f24394593c577a61509 by Andrew Svetlov (Kyle Stanley) in branch 'master': bpo-34790: Implement deprecation of passing coroutines to asyncio.wait() (GH-16977) https://github.com/python/cpython/commit/89aa7f0ede1a11c020e83f243

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2019-12-30 Thread Mark Shannon
Mark Shannon added the comment: Ned, I think this is fixed. Feel free to re-open if you disagree. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker __

[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2019-12-30 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue33777] dummy_threading: .is_alive method returns True after execution has completed

2019-12-30 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bug

[issue39037] Fix the trial order of the __exit__ and __enter__ methods in the with statement documentation

2019-12-30 Thread Géry
Change by Géry : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue39163] spam

2019-12-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- resolution: -> wont fix stage: -> resolved status: open -> closed title: Perfect Exchange Migration tool -> spam type: performance -> ___ Python tracker

[issue39163] Perfect Exchange Migration tool

2019-12-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- Removed message: https://bugs.python.org/msg359028 ___ Python tracker ___ ___ Python-bugs-li

[issue39163] Perfect Exchange Migration tool

2019-12-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : Removed file: https://bugs.python.org/file48809/exchange-migration.jpg ___ Python tracker ___ ___ Pytho

[issue39156] Break up COMPARE_OP into logically distinct operations.

2019-12-30 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +17190 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17754 ___ Python tracker ___ ___

  1   2   >