[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:

[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

[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 --

[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

[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

[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

[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

[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

[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

[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 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

[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 ___

[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 ___

[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)

[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)

[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)

[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 ___ ___

[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 >>>

[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 ___

[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

[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

[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

[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. --

[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

[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

[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

[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

[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 ___

[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 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 ---

[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)

[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 ___

[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

[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

[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 ___

[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 ___ ___

[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 ->

[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)

[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)

[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

[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

[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

[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,

[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

[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw
Change by anthony shaw : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw
New submission from anthony shaw : ./configure && make -j4 is returning: Failed to build these modules: _tkinter I'm running macOS 10.15.2, with the SDK installed using `xcode-select --install` (no funny business)

[issue39164] PyErr_GetExcInfo does not allow to retrieve for an arbitrary thread

2019-12-30 Thread Julien Danjou
Change by Julien Danjou : -- keywords: +patch pull_requests: +17188 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17752 ___ Python tracker ___

[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw
anthony shaw added the comment: This comes down to a logic bug in detect_tkinter_darwin(), shown in https://github.com/python/cpython/pull/17753/files#r361956102 -- ___ Python tracker

[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 ___

[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 ___ ___

[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 ___ ___

[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 ___ ___

[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

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

2019-12-30 Thread Inada Naoki
Inada Naoki added the comment: If we can not add INCREF and DECREF in the PyObject_RichCompare, we can add v == w check in the caller side. -- ___ Python tracker ___

[issue39163] Perfect Exchange Migration tool

2019-12-30 Thread georgepaul bj
New submission from georgepaul bj : EdbMails Exchange Migration tool is the perfect tool which migrates your entire mailbox items like mails, calendars, contacts etc. without any data loss. and it supports Exchange versions 2003, 2007, 2010, 2013, 2016 and 2019. The migration will be

[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw
anthony shaw added the comment: I also can't see how this condition would ever match, since macosx_sdk_root() is not in the list being iterated upon, https://github.com/python/cpython/blob/master/setup.py#L1774 -- ___ Python tracker

[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2019-12-30 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > Should not parallel tests be ran in different directories? yes, the test uses support.TESTFN which has the value of "{}_{}_tmp".format(TESTFN, os.getpid()) in the setUp [0] to create tempdir. Under parallel tests the pid value of TESTFN is

[issue39164] PyErr_GetExcInfo does not allow to retrieve for an arbitrary thread

2019-12-30 Thread Julien Danjou
Julien Danjou added the comment: Relevant python-dev thread: https://mail.python.org/archives/list/python-...@python.org/thread/QVMFP76R35SXUIM2WPPVPV5XCVMKPDEB/#TLP6MWNML4PRKFFGXHCKNEUMN6UIQ4MT -- ___ Python tracker

[issue39164] PyErr_GetExcInfo does not allow to retrieve for an arbitrary thread

2019-12-30 Thread Julien Danjou
New submission from Julien Danjou : PyErr_GetExcInfo does not allow to retrieve exception information for an arbitrary thread. As it calls `_PyThreadState_GET` itself, it's impossible to get exception information for a different thread. -- components: C API messages: 359029 nosy: jd

[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 ___ ___

[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 ___ ___

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

2019-12-30 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39156] Break up COMPARE_OP into logically distinct operations.

2019-12-30 Thread Mark Shannon
Mark Shannon added the comment: Moving work from the interpreter to the compiler is always a good idea. Performance: The compiler is run once per code unit, the interpreter thousands or millions of times. The compiler is easier to test. Just match the expected bytecode with the actual

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

2019-12-30 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: FWIW, dummy_threading and _dummy_thread were removed with 8bf08ee45b7c2341f0d0175b91892843a37c23da in Python 3.9. -- ___ Python tracker

[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw
Change by anthony shaw : -- keywords: +patch pull_requests: +17189 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17753 ___ Python tracker ___

[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 ___

[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)`

[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 ___ ___

[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 ___

[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:

[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 ___

[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

[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

[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)

[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,

[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()

[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'

[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 --

[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

[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)

[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)

[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

[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,

[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:

[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 ___

[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

[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

[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:

[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)

[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 ___

[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 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 --

[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)

[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 ___

[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 ___ ___

[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

  1   2   >