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

[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: https://mail.pyt

[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) /Library/Developer/Comm

[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

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

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

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

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

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

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

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

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

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

[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

[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

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

[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

[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

[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

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

[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 Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ezio.melotti, mrabarnett, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-lis

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

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

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

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

[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) https://github.com/python/cpython/commit/4dc5a9df59837446ec1dc5b7a

[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

[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

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

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

[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

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

[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 Ned Deily
Change by Ned Deily : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[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

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

[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

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

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

[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

[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

[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 Mark Dickinson
Mark Dickinson added the comment: This looks like a duplicate of #37564. -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python

[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

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

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

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

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

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

[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

[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

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

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

[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

[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: > 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: +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 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: > This makes list comparison 2x slower. This is affected by PR 17734? or PyObject_RichCompare patched? -- nosy: +corona10 ___ Python tracker __

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

[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

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

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

[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

[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

[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

[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

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

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

[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

[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

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

  1   2   >