[issue44820] subprocess hungs when processing value from mariadb

2021-08-03 Thread jb
New submission from jb : I am doing an insert in mariadb databases. For example, INSERT INTO t (a, b, c) VALUES (1, 3, None) RETURNING a, b. Upon execution, I get the value as (, ). When accessing the zero element, my subroutine hangs. -- components: Interpreter Core messages: 398862

[issue43468] functools.cached_property incorrectly locks the entire descriptor on class instead of per-instance locking

2021-08-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here's the latest effort: --- def __get__(self, instance, owner=None): if instance is None: return self if self.attrname is None: raise TypeError(

[issue44819] assertSequenceEqual does not use _getAssertEqualityFunc

2021-08-03 Thread Jack DeVries
Jack DeVries added the comment: Brian, can you be more specific about what problem is caused by the fact that assertSequenceEqual does not use _getAssertEqualityFunc? Also, I'm not sure what your example is trying to demonstrate. Can you provide a minimal example that shows the problem, but

[issue44019] operator.call/operator.__call__

2021-08-03 Thread Antony Lee
Antony Lee added the comment: Actually, upon further thought, the semantics I suggested above should go into `operator.caller` (cf. `operator.methodcaller`), and `operator.call`/`operator.__call__` should instead be defined as `operator.call(f, *args, **kwargs) == f(*args, **kwargs)`, so

[issue32397] textwrap output may change if you wrap a paragraph twice

2021-08-03 Thread Andrei Kulakov
Andrei Kulakov added the comment: I've added an initial draft PR: https://github.com/python/cpython/pull/27587/files I will add docs and news if this looks good in general. -- ___ Python tracker

[issue32397] textwrap output may change if you wrap a paragraph twice

2021-08-03 Thread Andrei Kulakov
Change by Andrei Kulakov : -- pull_requests: +26089 pull_request: https://github.com/python/cpython/pull/27587 ___ Python tracker ___

[issue44772] Regression in memory use of instances due to dictionary ordering

2021-08-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: ISTM this was mostly a net win. We get compactness and sharing most of the time, and lose sharing only in cases like this where different instances of the same class happen to have different attributes. Personally, I would not have expected sharing to

[issue43532] Add keyword-only fields to dataclasses

2021-08-03 Thread jack1142
jack1142 added the comment: Does this change deserve an entry in the What's New in Python document in addition to the changelog entry? -- ___ Python tracker ___

[issue42524] [doc] pdb access to return value

2021-08-03 Thread Irit Katriel
Change by Irit Katriel : -- Removed message: https://bugs.python.org/msg398854 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42524] [doc] pdb access to return value

2021-08-03 Thread Irit Katriel
Irit Katriel added the comment: I just noticed your PR. Would you like to continue working on this? I think we should update the documentation of retval (in the doc and in the function's doctring) to say: """ retval Print the return value for the last return of a function. Alternatively,

[issue42524] [doc] pdb access to return value

2021-08-03 Thread Irit Katriel
Irit Katriel added the comment: I just noticed your PR. Would you like to continue working on this? I think we should update the documentation of retval (in the doc and in the functions' doctring) to say: """ retval Print the return value for the last return of a function. Alternatively,

[issue42524] pdb access to return value

2021-08-03 Thread Irit Katriel
Irit Katriel added the comment: It actually is in the locals, and it's called __return__. So you can access it with locals()['__return__'] I'll try to see where that can be documented. -- nosy: +iritkatriel ___ Python tracker

[issue20703] RuntimeError caused by lazy imports in pdb

2021-08-03 Thread Irit Katriel
Irit Katriel added the comment: Closing as this is not a problem with pdb, it's a general problem with iterating sys.modules while doing things that can cause imports. -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-08-03 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44819] assertSequenceEqual does not use _getAssertEqualityFunc

2021-08-03 Thread Brian
New submission from Brian : Like the title says, TestCase.assertSequenceEqual does not behave like TestCase.assertEqual where it uses TestCase._getAssertEqualityFunc. Instead, TestCase.assertSequenceEqual uses `item1 != item2`. That way I can do something like this: ``` def

[issue44037] Broad performance regression from 3.10a7 to 3.10b2 with python.org macOS binaries

2021-08-03 Thread Ned Deily
Ned Deily added the comment: Summary: With the 3.10.0rc1 release, this performance regression in the var_access_benchmark starting with the 3.10.0b1 binaries in the python.org macOS universal2 installer is now resolved. With the rc1 release, the performance of this micro benchmark has

[issue43874] argparse crashes on subparsers with no dest/metava

2021-08-03 Thread Terence Honles
Terence Honles added the comment: Closing as a duplicate of https://bugs.python.org/issue29298 (which was recently merged and caused conflicts with my patch) -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___

[issue44801] Type expression is coerced to a list of parameter arguments in substitution of ParamSpec

2021-08-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26088 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27585 ___ Python tracker

[issue44756] In ./Doc, "make html" and "make build" should depend on "make venv"

2021-08-03 Thread Jack DeVries
Jack DeVries added the comment: Actually, I tested out that idea (https://github.com/python/cpython/compare/main...jdevries3133:bpo-44756-doc-make), and I don't think its as nice of a solution. I think it is valuable for new contributors to be able to type "make html" and have it work. Look

[issue32397] textwrap output may change if you wrap a paragraph twice

2021-08-03 Thread Andrei Kulakov
Andrei Kulakov added the comment: Note that I'm not handling a single '\r' because that was before Mac OS X; but it is handled by the following line (i.e. by the old logic): text = text.translate(self.unicode_whitespace_trans) -- ___

[issue32397] textwrap output may change if you wrap a paragraph twice

2021-08-03 Thread Andrei Kulakov
Andrei Kulakov added the comment: Irit: I assume you mean r' \r?\n', that's a great idea, it's much faster than adding a separate replacement step. Latest version I came up with is this: if re.search(r' \r?\n', text): text = re.sub(r' \r?\n', ' ', text)

[issue41886] PyType_Type is documented incorrectly

2021-08-03 Thread Ammar Askar
Ammar Askar added the comment: Thank you for spotting this and the patch da-woods! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.9 ___ Python tracker

[issue41886] PyType_Type is documented incorrectly

2021-08-03 Thread miss-islington
miss-islington added the comment: New changeset 952aa31c89f70d3c53596449bd2ed9a4817a2364 by Miss Islington (bot) in branch '3.10': bpo-41886: Fix documented type of PyType_Type (GH-22454) https://github.com/python/cpython/commit/952aa31c89f70d3c53596449bd2ed9a4817a2364 --

[issue41886] PyType_Type is documented incorrectly

2021-08-03 Thread miss-islington
miss-islington added the comment: New changeset f26fec4f74ae7da972595703bc39d3d30b8cfdf9 by Miss Islington (bot) in branch '3.9': bpo-41886: Fix documented type of PyType_Type (GH-22454) https://github.com/python/cpython/commit/f26fec4f74ae7da972595703bc39d3d30b8cfdf9 --

[issue44801] Type expression is coerced to a list of parameter arguments in substitution of ParamSpec

2021-08-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ken Jin. So the problem is the __args__ (x, str) is interpreted differently depending on x, and after substituting x the interpretation can be changed. If x was ParamSpec, it was interpreted in one way, but if it becomes int, it is now

[issue41886] PyType_Type is documented incorrectly

2021-08-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +26087 pull_request: https://github.com/python/cpython/pull/27584 ___ Python tracker ___

[issue41886] PyType_Type is documented incorrectly

2021-08-03 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +26086 pull_request: https://github.com/python/cpython/pull/27583 ___ Python tracker

[issue41886] PyType_Type is documented incorrectly

2021-08-03 Thread Ammar Askar
Ammar Askar added the comment: New changeset ac811f9b5a68ce8756911ef2c8be83b46696018f by da-woods in branch 'main': bpo-41886: Fix documented type of PyType_Type (GH-22454) https://github.com/python/cpython/commit/ac811f9b5a68ce8756911ef2c8be83b46696018f -- nosy: +ammar2

[issue41886] PyType_Type is documented incorrectly

2021-08-03 Thread Ammar Askar
Change by Ammar Askar : -- versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

[issue44756] In ./Doc, "make html" and "make build" should depend on "make venv"

2021-08-03 Thread Jack DeVries
Jack DeVries added the comment: @petr.viktorin a whatsnew entry was added, what more notice could have been provided? I have an idea for an alternative that might be better. What if ``make clean`` deletes and restores the venv only if it already existed in the first place? --

[issue32397] textwrap output may change if you wrap a paragraph twice

2021-08-03 Thread Irit Katriel
Irit Katriel added the comment: You should be able to do them in one re, something like text = re.sub(r' ?\n', ' ', text) -- nosy: +iritkatriel ___ Python tracker ___

[issue44816] PEP 626 does not explain the handling of constants, at all.

2021-08-03 Thread Brandt Bucher
Brandt Bucher added the comment: Thanks for clarifying. I'm worried, though, that the PEP's emphasis on "*all* lines of code executed and *only* for lines of code that are executed" could be problematic for other optimizations we perform. Consider: if ( # <-- True # <-- ): pass

[issue43468] functools.cached_property incorrectly locks the entire descriptor on class instead of per-instance locking

2021-08-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > It should use "(id(instance), instance)" rather than just "instance" as the > key. It should use a dict with id(instance) as a key and instance as value. An instance can be non-hashable. -- ___ Python

[issue32397] textwrap output may change if you wrap a paragraph twice

2021-08-03 Thread Andrei Kulakov
Andrei Kulakov added the comment: I think fix to make `drop_whitespace=False` stable, can be as simple as adding two lines in `_munge_whitespace()`: +text = re.sub(r' \n', ' ', text) +text = re.sub(r'\n ', ' ', text) text =

[issue44817] os.path.realpath fails with WinError 161

2021-08-03 Thread Eryk Sun
Eryk Sun added the comment: It should also ignore ERROR_BAD_NETPATH (53). -- nosy: +eryksun ___ Python tracker ___ ___

[issue44301] Is there a way to provide destructor for module written using C API?

2021-08-03 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +26085 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27581 ___ Python tracker ___

[issue44818] '\t' (tab) support

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

[issue44816] PEP 626 does not explain the handling of constants, at all.

2021-08-03 Thread Mark Shannon
Mark Shannon added the comment: This isn't a bug. Although PEP 626 is not at all clear about this. The key word in the PEP is "executed". Because compound and multi-line constants are constants, the parts of them are not "executed", but computed at compile time. Having re-read the PEP, this

[issue20703] RuntimeError caused by lazy imports in pdb

2021-08-03 Thread Irit Katriel
Irit Katriel added the comment: Can we make sys.modules automatically return an iterator that has a copy of its contents? Otherwise it's an odd API - it's iterable but we tell people not to iterate it. -- ___ Python tracker

[issue20703] RuntimeError caused by lazy imports in pdb

2021-08-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My concern about importing readline at the top of the module is that importing readline has a side effect. The only module which imports it unconditionally at the top is rlcompleter. In all other places it is imported lazily. And importing readline ahead

[issue34782] Pdb raises exception when code is executed in a mapping that does not define `__contains__`

2021-08-03 Thread Irit Katriel
Irit Katriel added the comment: I think we should close this. It's not a problem you will come across if you're not looking for trouble, so there's no point trying to make the error message a little nicer. -- resolution: -> not a bug stage: patch review -> resolved status: open ->

[issue44817] os.path.realpath fails with WinError 161

2021-08-03 Thread Eryk Sun
Change by Eryk Sun : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 ___ Python tracker

[issue34782] Pdb raises exception when code is executed in a mapping that does not define `__contains__`

2021-08-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You cannot expect that running code under debugger does not have any effect. Otherwise there would not be any meaning in debugger. Running code under debugger has some side effects, and setting locals __return__ and __exception__ is one of them. If it

[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2021-08-03 Thread Ken Jin
Ken Jin added the comment: > Just chiming in to say that this is still broken for me on Python 3.9.6 >From what I understand, the patch landed on 2021-07-02, 4 days after Python >3.9.6's release date of 2021-06-28, so it wasn't included. It should come in 3.9.7, which should be out on

[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2021-08-03 Thread Stephen Carboni
Stephen Carboni added the comment: Just chiming in to say that this is still broken for me on Python 3.9.6, Win10/64: https://pastebin.com/64F2iKaj But, works for 3.10.0b4. -- nosy: +stephen.entropy ___ Python tracker

[issue44756] In ./Doc, "make html" and "make build" should depend on "make venv"

2021-08-03 Thread Petr Viktorin
Petr Viktorin added the comment: I'm one of those who disagree with "make html" suddenly downloading code from the internet and running it, but I guess I'm in a minority. I'll switch to using `sphinx-build` directly. Still, I'd have appreciated a heads-up notice. -- nosy:

[issue44301] Is there a way to provide destructor for module written using C API?

2021-08-03 Thread Petr Viktorin
Petr Viktorin added the comment: You are missing m_free. The clear function is used to break reference counts. In this case, there are no reference counts to be broken, so it is not called. Your custom_clear function is idempotent, so you can use it in both free and clear and let Python

[issue44808] test_inspect fails in refleak mode

2021-08-03 Thread miss-islington
miss-islington added the comment: New changeset bc2841c7a9fe2b05ef77ebdf77701188dc83b2ce by Miss Islington (bot) in branch '3.10': bpo-44808: fixes test for interactive inspect getsource of a class (GH-27571) https://github.com/python/cpython/commit/bc2841c7a9fe2b05ef77ebdf77701188dc83b2ce

[issue44808] test_inspect fails in refleak mode

2021-08-03 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44808] test_inspect fails in refleak mode

2021-08-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 58325971de0faf330c9c38269dae8315a0746e59 by andrei kulakov in branch 'main': bpo-44808: fixes test for interactive inspect getsource of a class (GH-27571) https://github.com/python/cpython/commit/58325971de0faf330c9c38269dae8315a0746e59

[issue44808] test_inspect fails in refleak mode

2021-08-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +26084 pull_request: https://github.com/python/cpython/pull/27578 ___ Python tracker ___

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-08-03 Thread miss-islington
miss-islington added the comment: New changeset 84494db41902774ea6ac72e5b308b429850bbf71 by Miss Islington (bot) in branch '3.10': bpo-41737: expand doc for NotADirectoryError (GH-27471) https://github.com/python/cpython/commit/84494db41902774ea6ac72e5b308b429850bbf71 --

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-08-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset b5f026112768eb0a06622263bdea86d7d85981c5 by Miss Islington (bot) in branch '3.9': bpo-41737: expand doc for NotADirectoryError (GH-27471) (GH-27577) https://github.com/python/cpython/commit/b5f026112768eb0a06622263bdea86d7d85981c5 --

[issue18255] CPython setup.py problems

2021-08-03 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is no longer relevant now that distutils is deprecated. -- stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-08-03 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +26082 pull_request: https://github.com/python/cpython/pull/27576 ___ Python tracker

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-08-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset f7c23a99cd4f8179b6ba2cffaeb78b852c0f6488 by andrei kulakov in branch 'main': bpo-41737: expand doc for NotADirectoryError (GH-27471) https://github.com/python/cpython/commit/f7c23a99cd4f8179b6ba2cffaeb78b852c0f6488 -- nosy: +lukasz.langa

[issue41737] Improper NotADirectoryError when opening a file in a fake directory

2021-08-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +26083 pull_request: https://github.com/python/cpython/pull/27577 ___ Python tracker ___

[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2021-08-03 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2021-08-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 8c9f847997196aa76500d1ae104cbe7fe2a467ed by Serhiy Storchaka in branch 'main': bpo-27275: Change popitem() and pop() methods of collections.OrderedDict (GH-27530) https://github.com/python/cpython/commit/8c9f847997196aa76500d1ae104cbe7fe2a467ed

[issue39091] _PyErr_CreateException() must check that the result is an exception (CPython Segfault in 5 lines of code)

2021-08-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 0b551db04a99a97abb1e44a071c688c3ca704b67 by Miss Islington (bot) in branch '3.9': bpo-39091: Fix segfault when Exception constructor returns non-exception for gen.throw. (GH-17658) (GH-27573)

[issue39091] _PyErr_CreateException() must check that the result is an exception (CPython Segfault in 5 lines of code)

2021-08-03 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 8ce7f2f4ef04e19209f1dfd2a0cf50ddcd0e999f by Miss Islington (bot) in branch '3.10': bpo-39091: Fix segfault when Exception constructor returns non-exception for gen.throw. (GH-17658) (GH-27572)

[issue44818] '\t' (tab) support

2021-08-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: I don't understand what you mean by "Python can't use '\t' character." Can you demonstrate an example? It works for me. -- nosy: +steven.daprano ___ Python tracker

[issue44818] '\t' (tab) support

2021-08-03 Thread Pooia
New submission from Pooia : Python can't use '\t' character. if I want fix it I will work a long time but a shorter fashion is replacing '\t' character with 4 space (by first clause of pep: 8) -- components: Parser messages: 398815 nosy: Pooia, lys.nikolaou, pablogsal priority: