[issue42238] Deprecate suspicious.py?

2022-02-09 Thread Julien Palard
Julien Palard added the comment: New changeset b878b3af0b3a9e3ab3ffcaf90a4066dfb3bb7cac by Julien Palard in branch 'main': bpo-42238: [doc] moving from rstlint.py to sphinx-lint. (GH-31097) https://github.com/python/cpython/commit/b878b3af0b3a9e3ab3ffcaf90a4066dfb3bb7cac --

[issue45393] help() on operator precedence has confusing entries "await" "x" and "not" "x"

2022-02-09 Thread Zackery Spytz
Zackery Spytz added the comment: I have created a patch for this issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45393] help() on operator precedence has confusing entries "await" "x" and "not" "x"

2022-02-09 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +29415 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31246 ___ Python tracker

[issue21910] [doc] File protocol should document if writelines must handle generators sensibly

2022-02-09 Thread Stanley
Change by Stanley : -- keywords: +patch pull_requests: +29414 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31245 ___ Python tracker

[issue46705] Memory optimization for set.issubset

2022-02-09 Thread Raymond Hettinger
Change by Raymond Hettinger : Added file: https://bugs.python.org/file50615/instrument_issubset.py ___ Python tracker ___ ___

[issue46705] Memory optimization for set.issubset

2022-02-09 Thread Raymond Hettinger
Change by Raymond Hettinger : Removed file: https://bugs.python.org/file50614/instrument_issubset.py ___ Python tracker ___ ___

[issue46705] Memory optimization for set.issubset

2022-02-09 Thread Raymond Hettinger
Change by Raymond Hettinger : Removed file: https://bugs.python.org/file50613/instrument_issubset.py ___ Python tracker ___ ___

[issue46705] Memory optimization for set.issubset

2022-02-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've run a few more experiments and this looks like a net win more often than not. Go ahead and submit a PR so we can evaluate it further. -- Added file: https://bugs.python.org/file50614/instrument_issubset.py

[issue46705] Memory optimization for set.issubset

2022-02-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: We care more about the running speed than the memory usage. Since sets only store pointers to data, they are typically smaller than the data they refer to. I've attached some instrumentation code for running experiments to verify the workload under

[issue45923] Improve performance of sys.settracing based tools.

2022-02-09 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher nosy_count: 3.0 -> 4.0 pull_requests: +29413 pull_request: https://github.com/python/cpython/pull/31244 ___ Python tracker ___

[issue46707] Parser hanging on stacked { tokens

2022-02-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks Anthony for the report! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue46707] Parser hanging on stacked { tokens

2022-02-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 9b23f8f78fdb0d7eba016616ae7a97abbfc65aa6 by Pablo Galindo Salgado in branch '3.10': [3.10] bpo-46707: Avoid potential exponential backtracking in some syntax errors (GH-31241). (GH-31242)

[issue46707] Parser hanging on stacked { tokens

2022-02-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46705] Memory optimization for set.issubset

2022-02-09 Thread Raymond Hettinger
Change by Raymond Hettinger : -- versions: -Python 3.10, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue46705] Memory optimization for set.issubset

2022-02-09 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46707] Parser hanging on stacked { tokens

2022-02-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +29412 pull_request: https://github.com/python/cpython/pull/31242 ___ Python tracker ___

[issue46707] Parser hanging on stacked { tokens

2022-02-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset b71dc71905ab674ccaa4a56230d17a28f61c325c by Pablo Galindo Salgado in branch 'main': bpo-46707: Avoid potential exponential backtracking in some syntax errors (GH-31241)

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-02-09 Thread Gregory Beauregard
Gregory Beauregard added the comment: I wrote a PR that fixes the underlying issue here, but I'm leaving it as a draft while the discussion plays out. I think the stuff currently in the patch should be okay regardless of the discussion decision, because the underlying issue is that P.args

[issue46707] Parser hanging on stacked { tokens

2022-02-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +29411 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31241 ___ Python tracker

[issue46707] Parser hanging on stacked { tokens

2022-02-09 Thread anthony shaw
Change by anthony shaw : -- versions: +Python 3.10, Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46707] Parser hanging on stacked { tokens

2022-02-09 Thread anthony shaw
New submission from anthony shaw : Providing an (invalid) input to the parser causes an exponentially-slow DoS to the Python executable in 3.10. e.g. python3.10 -c "{:" takes ~2 seconds python3.10 -c ":" takes ~22 seconds Tested this all the

[issue46704] Parser API not checking for null-terminator

2022-02-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The contract of that interface is to receive null-terminated strings, so I am a bit clueless on how this could receive a non-null terminated string. Notice that calling PyRun_StringFlags with a non-null terminated string is out of contract.

[issue46704] Parser API not checking for null-terminator

2022-02-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg412970 ___ Python tracker ___ ___ Python-bugs-list

[issue46704] Parser API not checking for null-terminator

2022-02-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The contract of that interface is to receive null-terminated strings, so I am a bit clueless on how this could receive a non-null terminated string. Notice that calling CompileCode with a non-null terminated string is out of contract. --

[issue46704] Parser API not checking for null-terminator

2022-02-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Could you please provide an example input to reproduce this? -- ___ Python tracker ___

[issue46703] boolean operation issue (True == False == False)

2022-02-09 Thread Eryk Sun
Eryk Sun added the comment: > True == False == False is really True == False and False == False > wich is False and True which is False Moreover, since the left-hand comparison is `True == False`, which evaluates to False, the right-hand comparison doesn't even get evaluated. In the

[issue46706] AxelRacer

2022-02-09 Thread Dennis Sweeney
New submission from Dennis Sweeney : I'm closing this -- if you found a bug in Python, please be sure to describe thoroughly what bug you found, steps to reproduce the bug, and what behavior you expected. -- nosy: +Dennis Sweeney resolution: -> not a bug stage: -> resolved status:

[issue46705] Memory optimization for set.issubset

2022-02-09 Thread Dennis Sweeney
Change by Dennis Sweeney : -- nosy: +rhettinger, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46706] AxelRacer

2022-02-09 Thread claude-alexandre cabana
Change by claude-alexandre cabana : -- components: Build nosy: claudealexcabana priority: normal severity: normal status: open title: AxelRacer type: performance versions: Python 3.11 ___ Python tracker

[issue46705] Memory optimization for set.issubset

2022-02-09 Thread Jack Nguyen
New submission from Jack Nguyen : I noticed that the set.issubset cpython implementation casts its iterable argument to a set. In some cases, casting the whole iterable to a set is unnecessary (see https://bugs.python.org/issue18032). Although the latter suggestion is to perform early

[issue46704] Parser API not checking for null-terminator

2022-02-09 Thread anthony shaw
New submission from anthony shaw : In tokenizer.c, the translate_newlines() function does a `strlen()` on the input string, if the string is not null-terminated, e.g. '\xbe' this leads to a heap-buffer-overflow. The overflow is not exploitable, but if there are further changes to the parser,

[issue46703] boolean operation issue (True == False == False)

2022-02-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is not a bug. Please check the docs on the ternary operator: https://docs.python.org/3/reference/expressions.html#comparisons In particular: Comparisons can be chained arbitrarily, e.g., x < y <= z is equivalent to x < y and y <= z, except that

[issue46703] boolean operation issue (True == False == False)

2022-02-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg412963 ___ Python tracker ___ ___ Python-bugs-list

[issue46703] boolean operation issue (True == False == False)

2022-02-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is not a bug. Please check the docs on the ternary operator: https://docs.python.org/3/reference/expressions.html#comparisons In particular: Comparisons can be chained arbitrarily, e.g., x < y <= z is equivalent to x < y and y <= z, except that

[issue46702] Specialize UNPACK_SEQUENCE

2022-02-09 Thread Brandt Bucher
Brandt Bucher added the comment: (I also plan on looking into an adaptive super-duper-instruction for UNPACK_SEQUENCE_TWO_TUPLE__STORE_FAST__STORE_FAST after the current PR has landed). -- ___ Python tracker

[issue46703] boolean operation issue (True == False == False)

2022-02-09 Thread jung mo sohn
New submission from jung mo sohn : In python 3.6.8, 3.7.3, 3.7.4, 3.7.5, 3.7.12, 3.8.8 versions, the output is False as shown below. Python 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more

[issue46702] Specialize UNPACK_SEQUENCE

2022-02-09 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +29410 pull_request: https://github.com/python/cpython/pull/31240 ___ Python tracker ___

[issue46702] Specialize UNPACK_SEQUENCE

2022-02-09 Thread Brandt Bucher
New submission from Brandt Bucher : UNPACK_SEQUENCE already has fast paths for tuples and lists, which make up (literally) 99% of unpackings in the benchmark suite. What's more, two-element tuples make up about two-thirds of all unpackings (though I actually suspect it's even higher, since

[issue46691] sysconfig.get_platform() raises ValueError on macOS if '-arch' is present in CFLAGS but doesn't refer to the '-arch' compiler flag

2022-02-09 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg412958 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue46691] sysconfig.get_platform() raises ValueError on macOS if '-arch' is present in CFLAGS but doesn't refer to the '-arch' compiler flag

2022-02-09 Thread Ned Deily
Ned Deily added the comment: Thanks for the report; I don't recall this coming up before. Of course, the easy workaround is to avoid using "-arch" in CFLAGS paths and the like, but we should fix this. -- ___ Python tracker

[issue46691] sysconfig.get_platform() raises ValueError on macOS if '-arch' is present in CFLAGS but doesn't refer to the '-arch' compiler flag

2022-02-09 Thread Ned Deily
Ned Deily added the comment: Thanks for the report; I don't recall this coming up before. Of course, the easy workaround is to avoid using "arch" in CFLAGS paths and the like, but we should fix this. -- components: +macOS nosy: +ned.deily, ronaldoussoren type: crash -> compile error

[issue36876] [subinterpreters] Global C variables are a problem

2022-02-09 Thread Eric Snow
Eric Snow added the comment: New changeset cb68788dcadf43b47292bab7816a5ed9efa69730 by Eric Snow in branch 'main': bpo-36876: Minor cleanup to c-analyzer "ignored" data.' (gh-31239) https://github.com/python/cpython/commit/cb68788dcadf43b47292bab7816a5ed9efa69730 --

[issue40255] Fixing Copy on Writes from reference counting and immortal objects

2022-02-09 Thread Eric Snow
Eric Snow added the comment: @Eddie, what can I do to push this forward? FYI, in addition to the python-dev thread a few weeks back, I've brought the matter up with the steering council. [1] Also, if we can get back to performance-neutral (currently at about 4% slower) then there would be

[issue46701] cannot use typographical quotation marks in bug description

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: Please report bug tracker bugs at https://github.com/python/bugs.python.org Although to be honest I doubt this will be fixed, since we're moving to Github issues. -- nosy: +eric.smith resolution: -> third party stage: -> resolved status: open ->

[issue36876] [subinterpreters] Global C variables are a problem

2022-02-09 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +29409 pull_request: https://github.com/python/cpython/pull/31239 ___ Python tracker ___

[issue46528] Simplify the VM's stack manipulations

2022-02-09 Thread Brandt Bucher
Change by Brandt Bucher : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46528] Simplify the VM's stack manipulations

2022-02-09 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset 78ae4cc6dc949e8bc39fab25fea5efe983dc0ad1 by Brandt Bucher in branch 'main': bpo-46528: Attempt SWAPs at compile-time (GH-30970) https://github.com/python/cpython/commit/78ae4cc6dc949e8bc39fab25fea5efe983dc0ad1 --

[issue46643] typing.Annotated cannot wrap typing.ParamSpec args/kwargs

2022-02-09 Thread Gregory Beauregard
Change by Gregory Beauregard : -- keywords: +patch pull_requests: +29408 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31238 ___ Python tracker

[issue46701] cannot use typographical quotation marks in bug description

2022-02-09 Thread mirabilos
New submission from mirabilos : When trying to use typographical quotation marks (U+201C, U+201D) in the Comment field trying to submit a bug here, I get a red-background error message saying: Error: 'utf8' codec can't decode bytes in position 198-199: invalid continuation byte --

[issue46700] wrong nomenclature (options vs. arguments) in argparse

2022-02-09 Thread mirabilos
New submission from mirabilos : The argparse documentation and tutorial as well as its default option groups speak of "positional arguments" and "optional arguments". These are not used correctly, though. Elements of the argument vector (past item #0) are distinguished as options and

[issue46693] dataclass generated __str__ does not use overridden member __str__

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: I'll close it. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue46697] _ctypes_simple_instance returns inverted logic

2022-02-09 Thread Eryk Sun
Change by Eryk Sun : -- stage: -> patch review versions: -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue46697] _ctypes_simple_instance returns inverted logic

2022-02-09 Thread hydroflask
hydroflask added the comment: I place that patch into the public domain, I claim no ownership over that patch. The patch is attached purely for demonstration purposes. -- ___ Python tracker

[issue46697] _ctypes_simple_instance returns inverted logic

2022-02-09 Thread hydroflask
New submission from hydroflask : `_ctypes_simple_instance` in _ctypes.c returns the opposite logic of what its documentation claims. It is supposed to return true when the argument (a type object) is a direct subclass of `Simple_Type` (`_SimpleCData` in Python code). However it returns false

[issue43532] Add keyword-only fields to dataclasses

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Henry Schreiner! -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46696] socketmodule add Linux SO_INCOMING_CPU constant

2022-02-09 Thread David CARLIER
New submission from David CARLIER : Adding Linux's SO_INCOMING_CPU constant for setsockopt. -- components: +Library (Lib) keywords: +patch message_count: None -> 1.0 pull_requests: +29407 stage: -> patch review title: socketmodule add Linux SO_INCOMING_CPU constasn -> socketmodule add

[issue46696] socketmodule add Linux SO_INCOMING_CPU constasn

2022-02-09 Thread David CARLIER
Change by David CARLIER : -- nosy: devnexen priority: normal severity: normal status: open title: socketmodule add Linux SO_INCOMING_CPU constasn ___ Python tracker ___

[issue43532] Add keyword-only fields to dataclasses

2022-02-09 Thread miss-islington
miss-islington added the comment: New changeset 7445949a4399ab19fbdd5a0b0aca53a690c3251b by Miss Islington (bot) in branch '3.10': bpo-43532: add version added to KW_ONLY (GH-31235) https://github.com/python/cpython/commit/7445949a4399ab19fbdd5a0b0aca53a690c3251b --

[issue43532] Add keyword-only fields to dataclasses

2022-02-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +29406 pull_request: https://github.com/python/cpython/pull/31236 ___ Python tracker ___

[issue43532] Add keyword-only fields to dataclasses

2022-02-09 Thread miss-islington
miss-islington added the comment: New changeset 5a3f97291eea96037cceee097ebc00bba44bc9ed by Henry Schreiner in branch 'main': bpo-43532: add version added to KW_ONLY (GH-31235) https://github.com/python/cpython/commit/5a3f97291eea96037cceee097ebc00bba44bc9ed -- nosy:

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-09 Thread hydroflask
hydroflask added the comment: For reference, here are MSDN, Linux, OpenBSD, and GCC docs on alloca: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/alloca?view=msvc-170 https://www.man7.org/linux/man-pages/man3/alloca.3.html https://man.openbsd.org/alloca.3

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-09 Thread STINNER Victor
STINNER Victor added the comment: I failed to find the doc about alloca(0). It seems like the existing _ctypes_callproc() function *can* call alloca(0) if argtuple is empty and pIunk is 0 (pIunk is specific to Windows). -- ___ Python tracker

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-09 Thread hydroflask
hydroflask added the comment: @corona10 I really hope I am not being annoying at this point :) One final nit, in this line: https://github.com/python/cpython/pull/31224/files#diff-706e65ee28911740bf638707e19578b8182e57c6a8a9a4a91105d825f95a139dR168 You do not have to check if nargs > 0.

[issue43532] Add keyword-only fields to dataclasses

2022-02-09 Thread Henry Schreiner
Change by Henry Schreiner : -- nosy: +Henry Schreiner nosy_count: 9.0 -> 10.0 pull_requests: +29405 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31235 ___ Python tracker

[issue46528] Simplify the VM's stack manipulations

2022-02-09 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset 46328d8ae6529db916ccaabb9247fb0327ce0c1e by Brandt Bucher in branch 'main': bpo-46528: Check PyMem_Malloc for NULL (GH-30998) https://github.com/python/cpython/commit/46328d8ae6529db916ccaabb9247fb0327ce0c1e --

[issue46694] isdigit/isnumeric vs int()

2022-02-09 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46694] isdigit/isnumeric vs int()

2022-02-09 Thread Mark Dickinson
Mark Dickinson added the comment: This is by design: int looks for characters with the Unicode Decimal (De) numeric type, corresponding to str.isdecimal(), rather than for the Digit (Di) or Numeric (Nu) numeric types. >>> "²".isdecimal() False -- nosy: +mark.dickinson

[issue46072] Unify handling of stats in the CPython VM

2022-02-09 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29404 pull_request: https://github.com/python/cpython/pull/31234 ___ Python tracker ___

[issue46430] intern strings in deepfrozen modules

2022-02-09 Thread Guido van Rossum
Guido van Rossum added the comment: We discussed that and found that a lot of errors are ignored during interning anyway. But it's not too late to change if you want to (sending a PR would probably be quicker than arguing :-). -- ___ Python

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-09 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset d18120cd67b4297f78bfc9bf7b36774cf0bf15f2 by Dong-hee Na in branch 'main': bpo-46323: Reduce stack usage of ctypes python callback function. (GH-31224) https://github.com/python/cpython/commit/d18120cd67b4297f78bfc9bf7b36774cf0bf15f2 --

[issue46695] _io_TextIOWrapper_reconfigure_impl errors out too early

2022-02-09 Thread mirabilos
New submission from mirabilos : The following is not possible: with open('/tmp/x.ssv', 'r', newline='\n') as f: f.readline() # imagine a library call boundary here if hasattr(f, 'reconfigure'): f.reconfigure(newline='\n') The .reconfigure() call would not do anything, but

[issue46694] isdigit/isnumeric vs int()

2022-02-09 Thread Nonsense
New submission from Nonsense : When typing in "²".isdigit() or "²".isnumeric() it gives True but when typing in int("²") it errors out: ValueError: invalid literal for int() with base 10: '²' -- components: Interpreter Core messages: 412934 nosy: smtplukas.tanner.test priority: normal

[issue45413] Add install scheme for virtual environments

2022-02-09 Thread Filipe Laíns
Filipe Laíns added the comment: I don't think the proposal is incompatible with what I discussed. I haven't been super clear on my opinions on the implementation, so let me try to clarify them. - I think that we should use a static scheme, accessible on all platforms. - If this scheme needs

[issue45863] tarfile zeroes ustar header fields unnecessarily

2022-02-09 Thread STINNER Victor
STINNER Victor added the comment: Thanks Joshua Root for the bug report and the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue45863] tarfile zeroes ustar header fields unnecessarily

2022-02-09 Thread miss-islington
miss-islington added the comment: New changeset b0517a12179a9fe444ca6ce1f31c307883e81c0c by Miss Islington (bot) in branch '3.9': bpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693) https://github.com/python/cpython/commit/b0517a12179a9fe444ca6ce1f31c307883e81c0c

[issue45863] tarfile zeroes ustar header fields unnecessarily

2022-02-09 Thread miss-islington
miss-islington added the comment: New changeset 42f87d435ebe4f2834c8fd0b4ce38f0b1627f3ed by Miss Islington (bot) in branch '3.10': bpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693) https://github.com/python/cpython/commit/42f87d435ebe4f2834c8fd0b4ce38f0b1627f3ed

[issue46693] dataclass generated __str__ does not use overridden member __str__

2022-02-09 Thread Bruce Eckel
Bruce Eckel added the comment: Oops. That does in fact work. How do I remove the bug report? *Bruce Eckel* HappyPathProgramming.com SummerTechForum.com MindViewLLC.com Blog: BruceEckel.com EvolveWork.co WinterTechForum.com OnJava8.com

[issue46693] dataclass generated __str__ does not use overridden member __str__

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: I believe dataclasses uses repr() of the members, not str(). Can you try using specifying __repr__ in Teacup? Just __repr__ = __str__ should work. -- nosy: +eric.smith ___ Python tracker

[issue46693] dataclass generated __str__ does not use overridden member __str__

2022-02-09 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46693] dataclass generated __str__ does not use overridden member __str__

2022-02-09 Thread Bruce Eckel
New submission from Bruce Eckel : When creating a dataclass using members of other classes that have overridden their __str__ methods, the __str__ method synthesized by the dataclass ignores the overridden __str__ methods in its component members. Demonstrated in attached file. --

[issue46689] `list(FunctionType(a.gi_code, {})(0))` crashes Python

2022-02-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue36956 -- nosy: +xtreak ___ Python tracker ___

[issue46494] Mention typing_extensions in the typing documentation

2022-02-09 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Welcome to this project, Meer! That looks pretty good, feel free to submit a PR. We can then perhaps get feedback from more people to improve the wording. -- ___ Python tracker

[issue46692] match case does not support regex

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: Good catch, @xtreak. I think something like the discussed (but not implemented) custom matching protocol would be required here. __match_args__ won't work, because it's a special attribute only checked on classes, not instances. Of course, I'm still not sure

[issue45863] tarfile zeroes ustar header fields unnecessarily

2022-02-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +29403 pull_request: https://github.com/python/cpython/pull/31233 ___ Python tracker ___

[issue45863] tarfile zeroes ustar header fields unnecessarily

2022-02-09 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +29402 pull_request: https://github.com/python/cpython/pull/31232 ___ Python tracker

[issue45863] tarfile zeroes ustar header fields unnecessarily

2022-02-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset bf2d44ffb06e8f49aacc6b1c140a6717df5cf897 by Joshua Root in branch 'main': bpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693) https://github.com/python/cpython/commit/bf2d44ffb06e8f49aacc6b1c140a6717df5cf897 --

[issue46430] intern strings in deepfrozen modules

2022-02-09 Thread Christian Heimes
Christian Heimes added the comment: I noticed that the new interning code lacks proper error reporting. There are only asserts. _PyCode_New() checks the return value of intern_strings. -- nosy: +christian.heimes ___ Python tracker

[issue46690] create_autospec() doesn't respect configure_mock style kwargs

2022-02-09 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46692] match case does not support regex

2022-02-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > There were ideas for exotic matchers such as IsInstance(), InRange(), > RegexMatchingGroup() and so on. https://www.python.org/dev/peps/pep-0622/#custom-matching-protocol The PEP has some mention about a similar use case in custom match protocol

[issue46430] intern strings in deepfrozen modules

2022-02-09 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset c0a5ebeb1239020f2ecc199053bb1a70d78841a1 by Kumar Aditya in branch 'main': bpo-46430: Intern strings in deep-frozen modules (GH-30683) https://github.com/python/cpython/commit/c0a5ebeb1239020f2ecc199053bb1a70d78841a1 --

[issue46532] Improve efficiency of PRECALL/CALL instructions

2022-02-09 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +29401 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31231 ___ Python tracker ___

[issue46532] Improve efficiency of PRECALL/CALL instructions

2022-02-09 Thread Mark Shannon
Change by Mark Shannon : -- title: Improve effeciency of PRECALL/CALL instructions -> Improve efficiency of PRECALL/CALL instructions ___ Python tracker ___

[issue44289] tarfile.is_tarfile() and tarfile.open() when used with file object may cause tarfile operations to fail

2022-02-09 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 128ab092cad984b73a117f58fa0e9b4105051a04 by Andrzej Mateja in branch 'main': bpo-44289: Keep argument file object's current position in tarfile.is_tarfile (GH-26488)

[issue46638] Inconsistent registry virtualization in Windows Store package

2022-02-09 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46686] [venv / PC/launcher] issue with a space in the installed python path

2022-02-09 Thread Kesh Ikuma
Kesh Ikuma added the comment: > a file named "C:\Program". Now the venv launcher won't be able to execute This is exactly what happened on my PC, and the behavior was triggered by Microsoft Visual C++ 2015-2022 Redistributable installer. The installer left a log file "C:\Users\Kesh" with my

[issue45789] Python execution broken after update via Windows Store

2022-02-09 Thread firewave
firewave added the comment: Actually "Process Explorer" finds the handle as well. No idea why it didn't come up in my last search. -- ___ Python tracker ___

[issue45789] Python execution broken after update via Windows Store

2022-02-09 Thread firewave
firewave added the comment: I figured it out. I tried to delete the files using PowerShell and I got the following: Remove-Item : Cannot remove item C:\Users\Username\AppData\Local\Microsoft\WindowsApps\python.exe: The process cannot access the file

[issue46494] Mention typing_extensions in the typing documentation

2022-02-09 Thread Meer Suri
Meer Suri added the comment: (First time contributor looking for guidance) Is this diff okay? I'm not sure if the package name should be typing-extensions, or if the formatting is okay diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 94a46b01a1..c0fe656c1c 100644 ---

[issue46692] match case does not support regex

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: Looking at PEP 634, the obvious way to add support for this is to have the re.Match object specify Py_TPFLAGS_MAPPING. But I tried that, and then I get this error when using an re.Match object in a match statement: case {'one': x, 'two': y}:

[issue46685] Add additional tests for new features in `typing.py`

2022-02-09 Thread miss-islington
miss-islington added the comment: New changeset bde3765a3fd21e2ecf595a57998b285e3045f744 by Miss Islington (bot) in branch '3.9': bpo-46685: cover `TypeError` of `ForwardRef(1)` in `test_typing` (GH-31223) https://github.com/python/cpython/commit/bde3765a3fd21e2ecf595a57998b285e3045f744

  1   2   >