[issue42737] PEP 563: drop annotations for complex assign targets

2021-04-21 Thread Guido van Rossum
Guido van Rossum added the comment: Hum, there seems to be an actual bug here: even with PEP 563, the annotations for "complex targets" are evaluated. For example: from __future__ import annotations class C: x.y: z.w a: b.c The relevant parts of the disassembly of the code for the

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 139c232f3851b393798d0ea4e65f1298bfbcd9cf by Raymond Hettinger in branch 'master': bpo-40137: Move state lookups out of the critical path (GH-25492) https://github.com/python/cpython/commit/139c232f3851b393798d0ea4e65f1298bfbcd9cf

[issue43472] [security][subinterpreters] Add auditing hooks to subinterpreter module

2021-04-21 Thread miss-islington
miss-islington added the comment: New changeset 602eefef0bd0187049c2ab9071390f8573fc299a by Miss Islington (bot) in branch '3.8': bpo-43472: Ensure PyInterpreterState_New audit events are raised when called through _xxsubinterpreters module (GH-25506)

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-21 Thread STINNER Victor
STINNER Victor added the comment: New microbenchmark on the functools.lru_cache(lambda: 42) function using my 3 optimizations on _PyType_GetModuleByDef(): * commit d4aaa34798f0dd8402f412e2aa9d6fa2d6cff5fa * commit 760da626ff4124e1344fd8b7dbeb83b2c4b7c12c * commit

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2021-04-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +24231 pull_request: https://github.com/python/cpython/pull/25513 ___ Python tracker ___

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2021-04-21 Thread Steve Dower
Steve Dower added the comment: New changeset dc516ef8395d15da0ab225eb0dceb2e0581f51ca by Steve Dower in branch 'master': bpo-26227: Fixes decoding of host names on Windows from ANSI instead of UTF-8 (GH-25510) https://github.com/python/cpython/commit/dc516ef8395d15da0ab225eb0dceb2e0581f51ca

[issue12403] Mention sys.displayhook in code module docs and the compile builtin docs

2021-04-21 Thread Irit Katriel
Irit Katriel added the comment: The patch for the code module doc needs to be converted into a github PR. A new patch is needed for the compile builtin documentation: https://docs.python.org/3/library/functions.html#compile This could be added at the end of the third paragraph, where it says

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42737] PEP 563: drop annotations for complex assign targets

2021-04-21 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Hum, there seems to be an actual bug here: even with PEP 563, the annotations > for "complex targets" are evaluated. For example: Yes, that is what this issue is about. This bug only surfaced while doing other stuff and PEP 563 being the default > I

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-21 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +24223 pull_request: https://github.com/python/cpython/pull/25505 ___ Python tracker ___

[issue43472] [security][subinterpreters] Add auditing hooks to subinterpreter module

2021-04-21 Thread Steve Dower
Steve Dower added the comment: I'll need Eric to confirm, but I think the best thing to do here is to not release the thread state in _xxsubinterpreters.interp_create, but let _Py_NewInterpreter() do it. That way the existing event will be raised in interpreter-level hooks, rather than only

[issue43472] [security][subinterpreters] Add auditing hooks to subinterpreter module

2021-04-21 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +24224 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25506 ___ Python tracker ___

[issue43901] Add an empty annotations dict to all unannotated classes and modules

2021-04-21 Thread Larry Hastings
Larry Hastings added the comment: > - Is it possible to create __annotations__ lazily? (IIRC in January we came > to a conclusion about this, something like yes for modules but for classes, > or the other way around?) Maybe for modules, definitely not for classes. The problem is that best

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-21 Thread STINNER Victor
STINNER Victor added the comment: IMO we spent enough time micro-optimizing _functools and _PyType_GetModuleByDef(). I don't think that it's worth it to spend too much time trying to investigate differences between benchmarks around +- 1 ns on ~40 ns. I close the issue. Thanks Raymond for

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2021-04-21 Thread miss-islington
miss-islington added the comment: New changeset d8576b1d15155688a67baac24c15254700bdd3b7 by Miss Islington (bot) in branch '3.9': bpo-26227: Fixes decoding of host names on Windows from ANSI instead of UTF-8 (GH-25510)

[issue43908] array.array should remain immutable

2021-04-21 Thread STINNER Victor
Change by STINNER Victor : -- components: +Library (Lib) nosy: +corona10, shihai1991 ___ Python tracker ___ ___ Python-bugs-list

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2021-04-21 Thread David Felsen
Change by David Felsen : -- nosy: +davfelsen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42737] PEP 563: drop annotations for complex assign targets

2021-04-21 Thread Guido van Rossum
Guido van Rossum added the comment: The same thing happens at the module level. However in functions all is well (because inside functions annotations are never evaluated, apparently). It may be as simple as the code forgetting to check the PEP 563 bit when generating code for complex

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-21 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +24225 pull_request: https://github.com/python/cpython/pull/25507 ___ Python tracker ___

[issue43901] Add an empty annotations dict to all unannotated classes and modules

2021-04-21 Thread Larry Hastings
Larry Hastings added the comment: By the way, here's a tidbit I never got around to posting in c.l.p-d. I noted in the conversation in January that attrs is an outlier here: it *doesn't* look in the class dict for __annotations__. Instead, it has some complicated code where it asks the

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2021-04-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 11.0 -> 12.0 pull_requests: +24230 pull_request: https://github.com/python/cpython/pull/25512 ___ Python tracker

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-21 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +24222 pull_request: https://github.com/python/cpython/pull/25504 ___ Python tracker ___

[issue42737] PEP 563: drop annotations for complex assign targets

2021-04-21 Thread Saiyang Gou
Change by Saiyang Gou : -- pull_requests: +24229 pull_request: https://github.com/python/cpython/pull/25511 ___ Python tracker ___

[issue43756] About updating audit events when function gains new arguments

2021-04-21 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2021-04-21 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Commit a02cb474f9c097c83cd444a47e9fb5f99b4aaf45 fails to build in the refleak buildbots: https://buildbot.python.org/all/#/builders/75/builds/2/steps/5/logs/stdio Example failure: ❯ ./python -m test test_enum -R : 0:00:00 load avg: 1.81 Run tests

[issue28724] Add method send_io, recv_io to the socket module.

2021-04-21 Thread Saiyang Gou
Change by Saiyang Gou : -- nosy: +gousaiyang nosy_count: 7.0 -> 8.0 pull_requests: +24232 pull_request: https://github.com/python/cpython/pull/22608 ___ Python tracker ___

[issue43901] Add an empty annotations dict to all unannotated classes and modules

2021-04-21 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds like a plan, I agree that the original design misfired here (we were probably worried about million-line code bases with tens of thousands of classes having to pay the price of tens of thousands of empty dicts, but I now think that was an

[issue43901] Add an empty annotations dict to all unannotated classes and modules

2021-04-21 Thread Larry Hastings
Larry Hastings added the comment: It occurs to me that part of this work should also be a new "best practices for __annotations__" entry in the Python docs. Best practices for working with annotations, for code that requires a minimum Python version of 3.10+: Best practice is to call

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-21 Thread STINNER Victor
STINNER Victor added the comment: msg391004 benchmark comparing master with Raymond's optimization (commit 139c232f3851b393798d0ea4e65f1298bfbcd9cf) compared to Python 3.9: Mean +- std dev: [py39] 38.8 ns +- 0.5 ns -> [obj_cache] 40.3 ns +- 0.1 ns: 1.04x slower For me, these numbers make

[issue43901] Add an empty annotations dict to all unannotated classes and modules

2021-04-21 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-21 Thread STINNER Victor
STINNER Victor added the comment: New changeset 760da626ff4124e1344fd8b7dbeb83b2c4b7c12c by Victor Stinner in branch 'master': bpo-40137: Optimize _PyType_GetModuleByDef() loop (GH-25505) https://github.com/python/cpython/commit/760da626ff4124e1344fd8b7dbeb83b2c4b7c12c --

[issue43472] [security][subinterpreters] Add auditing hooks to subinterpreter module

2021-04-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +24227 pull_request: https://github.com/python/cpython/pull/25509 ___ Python tracker ___

[issue43472] [security][subinterpreters] Add auditing hooks to subinterpreter module

2021-04-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +24226 pull_request: https://github.com/python/cpython/pull/25508 ___ Python tracker

[issue43472] [security][subinterpreters] Add auditing hooks to subinterpreter module

2021-04-21 Thread Steve Dower
Steve Dower added the comment: New changeset 7b86e47617d81a4b14d929743425f448971e8c86 by Steve Dower in branch 'master': bpo-43472: Ensure PyInterpreterState_New audit events are raised when called through _xxsubinterpreters module (GH-25506)

[issue43756] About updating audit events when function gains new arguments

2021-04-21 Thread Steve Dower
Steve Dower added the comment: New changeset a32f8fe7133aad4f3cf8946534e3b79a5f2659da by Saiyang Gou in branch 'master': bpo-43756: Add new audit event for new arguments added to glob.glob (GH-25239) https://github.com/python/cpython/commit/a32f8fe7133aad4f3cf8946534e3b79a5f2659da

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2021-04-21 Thread Steve Dower
Change by Steve Dower : -- assignee: -> steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2021-04-21 Thread miss-islington
miss-islington added the comment: New changeset f7bc44170b4bdd16c46b4b6acf7673ffc24dfb19 by Miss Islington (bot) in branch '3.8': bpo-26227: Fixes decoding of host names on Windows from ANSI instead of UTF-8 (GH-25510)

[issue42737] PEP 563: drop annotations for complex assign targets

2021-04-21 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Batuhan, can you summarize the argument from the thread? What do you think > yourself? Myself, I'm not sure either way, but it seems okay to remove the > remnant bytecode. I feel like we shouldn't generate code for these annotations at all, and only

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-21 Thread STINNER Victor
STINNER Victor added the comment: New changeset d4aaa34798f0dd8402f412e2aa9d6fa2d6cff5fa by Victor Stinner in branch 'master': bpo-40137: _PyType_GetModuleByDef() doesn't check tp_flags (GH-25504) https://github.com/python/cpython/commit/d4aaa34798f0dd8402f412e2aa9d6fa2d6cff5fa --

[issue43472] [security][subinterpreters] Add auditing hooks to subinterpreter module

2021-04-21 Thread Steve Dower
Change by Steve Dower : -- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 ___ Python tracker

[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2021-04-21 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +24228 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25510 ___ Python tracker

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-21 Thread STINNER Victor
STINNER Victor added the comment: New changeset cdad2724e6f7426372901cc5dedd8a462ba046a6 by Victor Stinner in branch 'master': bpo-40137: Add pycore_moduleobject.h internal header (GH-25507) https://github.com/python/cpython/commit/cdad2724e6f7426372901cc5dedd8a462ba046a6 --

[issue43901] Add an empty annotations dict to all unannotated classes and modules

2021-04-21 Thread Larry Hastings
Larry Hastings added the comment: > * Never modify o.__annotations__. Let me revise that to: * If o.__annotations__ is a dict, never modify the contents of that dict. -- ___ Python tracker

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Can someone take a look? As per the buildbot policy (https://discuss.python.org/t/policy-to-revert-commits-on-buildbot-failure/404) we may need to revert it if is not fixed in 24 because of the risk of masking errors. --

[issue43901] Add an empty annotations dict to all classes and modules

2021-04-21 Thread Larry Hastings
New submission from Larry Hastings : The behavior of the __annotations__ member is wildly different between the three objects (function, class, module) that support it. Many of these differences are minor, but one in particular has been an awful wart for years: classes can inherit

[issue43901] Add an empty annotations dict to all unannotated classes and modules

2021-04-21 Thread Larry Hastings
Change by Larry Hastings : -- title: Add an empty annotations dict to all classes and modules -> Add an empty annotations dict to all unannotated classes and modules ___ Python tracker

[issue43901] Add an empty annotations dict to all unannotated classes and modules

2021-04-21 Thread Larry Hastings
Larry Hastings added the comment: Huh. The sample code in my thread got goofed up somewhere along the way--maybe it's my fault, maybe it was done to me by some automated process. Anyway, the example demonstrating classes inheriting annotations was meant to be formatted like this:

[issue39194] asyncio.open_connection returns a closed client when server fails to authenticate client certificate

2021-04-21 Thread Christian Heimes
Christian Heimes added the comment: I'm unassigning myself. This seems to be an asyncio-specific behavior. -- assignee: christian.heimes -> components: -SSL versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7 ___ Python

[issue43430] Exception raised when attempting to create Enum via functional API

2021-04-21 Thread Suhail S.
Suhail S. added the comment: In my usecase, I wanted to override the behaviour of __getitem__. I was able to accomplish this by subclassing EnumMeta. Having done so, I was able to work around this bug as follows. Instead of trying to access the functional API via Enum (using an enum as the

[issue43901] Add an empty annotations dict to all unannotated classes and modules

2021-04-21 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43902] ssl module: add getter for SSL_CTX* and SSL*

2021-04-21 Thread Christian Heimes
New submission from Christian Heimes : Python's ssl module exposes a limited and opinionated set of knobs to tune OpenSSL's behavior. Each new setter, getter, or function must be carefully design, tested, and documented. For each feature OpenSSL's C API must be converted into a Pythonic,

[issue43904] Documentation for argparse, missed opportunity

2021-04-21 Thread berkbayr
New submission from berkbayr : In the API reference page for argparse, the following example is used for formatter_class: ... formatter_class=argparse.RawDescriptionHelpFormatter, ... description=textwrap.dedent('''\ ... Please do not mess up this text! ...

[issue43899] separate builtin function

2021-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The drawback of that recipe of partition() is that it calls predicate twice on every element. The following implementation calls it only once for every element: def partition(pred, iterable): t1, t2 = tee((bool(pred(x)), x) for x in iterable)

[issue43898] Python fails to import .dylib but works when extension is changed to .so

2021-04-21 Thread Ellis trisk-grove
Ellis trisk-grove added the comment: This is with regards to an python extension written in zig (I believe the same behaviour would occur from C as I am just using Python.h). What happens is when I compile the library on my mac it generates myLibrary.dylib file, when testing with python the

[issue43901] Add an empty annotations dict to all unannotated classes and modules

2021-04-21 Thread Larry Hastings
Larry Hastings added the comment: Preliminary patch is 17 lines. Ah well. I must be terrible at this! -- ___ Python tracker ___

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It all works as documented. https://docs.python.org/3/library/functions.html#round -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue43846] Control stack usage in large expressions

2021-04-21 Thread Mark Shannon
Mark Shannon added the comment: I've not measured performance, as the sort of large literals it would impact are very rare, and the sort of calls it would change are almost non-existent. I'd be surprised if any performance difference could be reliably detected with our current performance

[issue43846] Control stack usage in large expressions

2021-04-21 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Olli
New submission from Olli : When rounding numbers with round(), middle values at with even base number are rounded in wrong direction. Python 3.9.1 (default, Feb 3 2021, 07:38:02) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports) macOS 11.2.3

[issue43817] Add inspect.get_annotations()

2021-04-21 Thread Larry Hastings
Larry Hastings added the comment: Just over twelve hours ago, the Python Steering Committee announced that stringized annotations would no longer be default behavior in Python 3.10. They will go back to being gated with "from __future__ import annotations". I think we still need this

[issue43817] Add inspect.get_annotations()

2021-04-21 Thread Larry Hastings
Larry Hastings added the comment: Hmm. If o.__annotations__ is None, should this function set the empty dict on the object? That seems slightly too opinionated to me. On the other hand, the user would probably expect that they could change the dict they got back. (If Python shipped with

[issue43904] Documentation for argparse, missed opportunity

2021-04-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +paul.j3, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43905] dataclasses.astuple does deepcopy on all fields

2021-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why deepcopy is used at all? It is a very specific feature which should not be used by default. If you want to make a deep copy of fields, you can call copy.deepcopy() explicitly. copy.deepcopy(dataclasses.astuple(obj)) or

[issue43905] dataclasses.astuple does deepcopy on all fields

2021-04-21 Thread Eric V. Smith
Eric V. Smith added the comment: The reason for the deep copying was to support changing a hierarchy of dataclasses into something that could be JSON serialized. But it didn't really work out. It recurses into dataclasses, namedtuples, lists, tuples, and dicts, and deep copies everything

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Olli
Olli added the comment: Just because incorrect results are documented, that doesn't mean the current implementation could not be improved. More over, Python 2.7.16 on the same machine produces expected results: Python 2.7.16 (default, Dec 21 2020, 23:00:36) [GCC Apple LLVM 12.0.0

[issue40222] "Zero cost" exception handling

2021-04-21 Thread Mark Shannon
Mark Shannon added the comment: The changes to pyc format aren't user visible so shouldn't matter, but what about the dis output? Consider this program: def f(): try: 1/0 except: return "fail" Currently it compiles to: 2 0 SETUP_FINALLY7 (to

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Eric V. Smith
Eric V. Smith added the comment: I agree this is working as designed and documented, so I'm closing this. Olli: You might want to read https://en.wikipedia.org/wiki/Rounding#Round_half_to_even -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed

[issue43817] Add inspect.get_annotations()

2021-04-21 Thread Larry Hastings
Larry Hastings added the comment: Just to round the bases: get_annotations() won't return an unmodified __annotations__ dict, but it *could* return a *consistent* dict. It could keep a cache (lru or otherwise) of all responses so far. I don't think that's what we want, I just thought I

[issue32882] SSLContext.set_ecdh_curve() not accepting x25519

2021-04-21 Thread sruester
sruester added the comment: PEP 543 was withdrawn in the meantime. Any suggestion how to proceed with this? -- versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is correct because it works as documented. Please read the documentation carefully. It was intentional change in Python 3. See https://docs.python.org/3/whatsnew/3.0.html#builtins. -- ___ Python tracker

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43817] Add inspect.get_annotations()

2021-04-21 Thread Eric V. Smith
Eric V. Smith added the comment: > If o.__annotations__ is None, should this function set the empty dict on the > object? That seems slightly too opinionated to me. On the other hand, the > user would probably expect that they could change the dict they got back. Are you saying the user

[issue43817] Add inspect.get_annotations()

2021-04-21 Thread Larry Hastings
Larry Hastings added the comment: > Are you saying the user would expect to be able to change __annotations__ my > modifying the dict they get back? As the docs are currently written, it's ambiguous. > Is it ever the case that the user can modify __annotations__ through the dict > that's

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: I concur with Eric that this should be closed. They're not "incorrect results", they are correct results, or at least *better* results. We did not invent the so-called Banker's Rounding technique, it has been the standard used by the American Society for

[issue43430] Exception raised when attempting to create Enum via functional API

2021-04-21 Thread Ethan Furman
Ethan Furman added the comment: That sounds more like the way it is intended to be used: make you base enum with all the changes you want, then use that base enum either by inheriting from it or as a function call: class MyBaseEnum(Enum, metaclass=...): ... custom stuff ...

[issue43905] dataclasses.astuple does deepcopy on all fields

2021-04-21 Thread Erik Carstensen
New submission from Erik Carstensen : It seems that the 'dataclass.astuple' function does a deepcopy of all fields. This is not documented. Two problems: 1. Dictionary keys that rely on object identity are ruined: import dataclasses @dataclasses.dataclass class Foo: key:

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-21 Thread STINNER Victor
STINNER Victor added the comment: > New changeset b0544ba77cf86074fb1adde00558c67ca75eeea1 by Pablo Galindo in > branch 'master': Copy of the NEWS entry: Revert making ``from __future__ import annotations`` the default. This follows the Steering Council decision to postpone PEP 563 changes

[issue43905] dataclasses.astuple does deepcopy on all fields

2021-04-21 Thread Eric V. Smith
Eric V. Smith added the comment: Unfortunately this can't be changed, although I suppose it should be documented. In general I think this API was a mistake, and should not have been added. There are just too many cases where it doesn't do what you want, or where it fails. I'd like to

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2021-04-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset b0544ba77cf86074fb1adde00558c67ca75eeea1 by Pablo Galindo in branch 'master': bpo-38605: Revert making 'from __future__ import annotations' the default (GH-25490)

[issue40222] "Zero cost" exception handling

2021-04-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We can add a new column for the offset or the index of the error handler. Or add pseudo-instructions (which do not correspond to any bytecode) at boundaries of the code with some error handler. -- ___ Python

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-21 Thread STINNER Victor
Change by STINNER Victor : -- title: [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 -> [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11 ___ Python tracker

[issue43904] Documentation for argparse, missed opportunity

2021-04-21 Thread Eric V. Smith
Eric V. Smith added the comment: If we're trying to be poetic, I think the last line should be "I intended it". -- nosy: +eric.smith ___ Python tracker ___

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-04-21 Thread Ethan Furman
Change by Ethan Furman : -- Removed message: https://bugs.python.org/msg391419 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-04-21 Thread Ethan Furman
Ethan Furman added the comment: False alarm, sorry. Still getting used to merging, rebasing, etc. Current tests run fine. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Ethan Furman
Change by Ethan Furman : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Ethan Furman
Change by Ethan Furman : -- pull_requests: +24219 pull_request: https://github.com/python/cpython/pull/25497 ___ Python tracker ___

[issue40222] "Zero cost" exception handling

2021-04-21 Thread Guido van Rossum
Guido van Rossum added the comment: I like Serhiy’s idea. BTW, what are the three POP_TOP op codes in a row popping? -- nosy: +Guido.van.Rossum ___ Python tracker ___

[issue43859] Improve syntax error for indentation errors

2021-04-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 56c95dfe271b1242bdc8163d4677e311552c00cb by Pablo Galindo in branch 'master': bpo-43859: Improve the error message for IndentationError exceptions (GH-25431)

[issue43859] Improve syntax error for indentation errors

2021-04-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup

2021-04-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Can someone confirm if they still have this problem on the buildbot server? -- ___ Python tracker ___

[issue43902] ssl module: add getter for SSL_CTX* and SSL*

2021-04-21 Thread Nathaniel Smith
Nathaniel Smith added the comment: Python's 'id' function exposes raw memory addresses constantly. As long as they're just integers, they can't do much harm. (In Rust, taking a pointer to a random object is considered totally safe, can be done anywhere. It's *dereferencing* a pointer where

[issue43906] turtle graphics don't work

2021-04-21 Thread Eric V. Smith
Change by Eric V. Smith : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43908] array.array should remain immutable

2021-04-21 Thread Guido van Rossum
New submission from Guido van Rossum : Hi Victor, Sorry for making this a deferred blocker. I recall that we had a brief discussion somewhere about an accidental change to the array.array type -- this is now a heap type (Py_TPFLAGS_HEAPTYPE is set), and as a consequence it is no longer

[issue40642] Cpython "pystate.h" subdirectory wrong

2021-04-21 Thread Xi Ruoyao
Xi Ruoyao added the comment: Dup of #39026. And the proposed fix is nack'ed in #39026. -- ___ Python tracker ___ ___

[issue38659] enum classes cause slow startup time

2021-04-21 Thread Ethan Furman
Ethan Furman added the comment: New changeset a02cb474f9c097c83cd444a47e9fb5f99b4aaf45 by Ethan Furman in branch 'master': bpo-38659: [Enum] add _simple_enum decorator (GH-25497) https://github.com/python/cpython/commit/a02cb474f9c097c83cd444a47e9fb5f99b4aaf45 --

[issue43907] pickle.py bytearray memoization bug with protocol 5

2021-04-21 Thread Carl Friedrich Bolz-Tereick
Change by Carl Friedrich Bolz-Tereick : -- keywords: +patch pull_requests: +24221 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25501 ___ Python tracker

[issue43902] ssl module: add getter for SSL_CTX* and SSL*

2021-04-21 Thread Steve Dower
Steve Dower added the comment: There's a working POC out there for modifying tuple elements that relies on the fact that id() returns real memory addresses, so I don't see it as a harmless thing. Also, Rust is only worrying about code that's put into its compiler, whereas Python has to

[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-21 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: PR opened against master branch. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue30069] External library behave differently when loaded by Python (maybe thread issue)

2021-04-21 Thread Irit Katriel
Irit Katriel added the comment: I'm closing this as out of date because the links no longer work and both Python 2.7/3.6 are no longer maintained. If you are still having this problem with more recent versions of Python, please create a new issue with up-to-date reproduction information.

  1   2   >