[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2021-04-05 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43728] Change the exception message raised when _curses is not found.

2021-04-05 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Ned. This is why I'm not sure it’s worth changing the message: googling gives good information, and the exact thing to do in order resolve this (if it’s even possible) is dependent on a number of factors that the code raising the exception

[issue43728] Change the exception message raised when _curses is not found.

2021-04-05 Thread Eric V. Smith
Eric V. Smith added the comment: @shreyanavigyan: Thank you for your efforts to improve Python! -- resolution: -> wont fix ___ Python tracker <https://bugs.python.org/issu

[issue43176] Dataclasses derived from empty frozen bases skip immutability checks

2021-04-05 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.or

[issue43176] Dataclasses derived from empty frozen bases skip immutability checks

2021-04-06 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 8a34a0793bcb830350dac675524310bb285e5e4f by Miss Islington (bot) in branch '3.9': bpo-43176: Fix processing of empty dataclasses (GH-24484) (GH-25205) https://github.com/python/cpython/commit/8a34a0793bcb830350dac675524310

[issue43176] Dataclasses derived from empty frozen bases skip immutability checks

2021-04-06 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: +23953 pull_request: https://github.com/python/cpython/pull/25215 ___ Python tracker <https://bugs.python.org/issue43

[issue43176] Dataclasses derived from empty frozen bases skip immutability checks

2021-04-06 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 1744c96ebc98b240f2564f75191097704b37244f by Eric V. Smith in branch 'master': Fix blurb for bpo-43176. (GH-25215) https://github.com/python/cpython/commit/1744c96ebc98b240f2564f75191097

[issue43176] Dataclasses derived from empty frozen bases skip immutability checks

2021-04-06 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 2df971afd5f29574be3bb44f2d8569cc240b800d by Miss Islington (bot) in branch '3.9': Fix blurb for bpo-43176. (GH-25215) (GH-25217) https://github.com/python/cpython/commit/2df971afd5f29574be3bb44f2d8569

[issue43759] StreamHandler does not print to sys.stderr immediately

2021-04-07 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: fixed -> not a bug ___ Python tracker <https://bugs.python.org/issue43759> ___ ___ Python-bugs-list mailing list Un

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-07 Thread Eric V. Smith
Eric V. Smith added the comment: Turning off the generation of __match_args__ should be a separate issue. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-07 Thread Eric V. Smith
Eric V. Smith added the comment: What's the situation where having __match_args__ is actually harmful in some way? I understand that if the generated version is wrong, you'd want to specify it yourself. But what's the use case for not having __match_args__ at all?

[issue43769] ipaddress module takes bytes input as valid ip address

2021-04-07 Thread Eric V. Smith
Eric V. Smith added the comment: The reproducer is: >>> ipaddress.IPv4Address(b"PING") IPv4Address('80.73.78.71') -- components: +Library (Lib) -Unicode nosy: +eric.smith ___ Python tracker <ht

[issue43769] ipaddress module takes bytes input as valid ip address

2021-04-07 Thread Eric V. Smith
Eric V. Smith added the comment: This is documented behavior. See https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Address "The following constitutes a valid IPv4 address: ... An integer packed into a bytes object of length 4 (most significant octet first). "

[issue43661] api-ms-win-core-path-l1-1.0.dll, redux of 40740 (which has since been closed)

2021-04-08 Thread Eric V. Smith
Eric V. Smith added the comment: Closing as a duplicate. Any discussion should be on the original issue. -- nosy: +eric.smith resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Missing api-ms-win-core-path-l1-1.0.dll for python-3.9.0

[issue43747] Can't create new interpreter in multi thread

2021-04-08 Thread Eric V. Smith
Eric V. Smith added the comment: You might have more luck asking on the capi-sig mailing list: https://mail.python.org/mailman3/lists/capi-sig.python.org/ I'm going to close this, because it looks like a usage question and not a bug. If it turns out to be a bug, please re-open this

[issue43746] Weird typing annotation closure behavior

2021-04-08 Thread Eric V. Smith
Eric V. Smith added the comment: Can you put together an example we can actually run? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43

[issue43746] Weird typing annotation closure behavior

2021-04-08 Thread Eric V. Smith
Change by Eric V. Smith : -- Removed message: https://bugs.python.org/msg390548 ___ Python tracker <https://bugs.python.org/issue43746> ___ ___ Python-bugs-list m

[issue43746] Weird typing annotation closure behavior

2021-04-08 Thread Eric V. Smith
Eric V. Smith added the comment: Can you put together an example we can run? Either from a single file, or multiple modules in the current directory? The "..." import makes it complicated to reproduce. -- ___ Python track

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-09 Thread Eric V. Smith
Eric V. Smith added the comment: init=False is used to make sure there's no __init__ defined, because there's a difference between a class with an __init__ and one without. If there was a difference between __match_args__ being not present and __match_args__=(), then I'd supp

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-09 Thread Eric V. Smith
Eric V. Smith added the comment: I do think it's worth mentioning that __match_args__ is automatically generated by @dataclass (if the class doesn't already define __match_args__). That seems like behavior that's very specific to @dataclass. Where else would you find out tha

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-09 Thread Eric V. Smith
Eric V. Smith added the comment: Hmm, good point on the inheritance case. I'd forgotten that this is where init=False and others would come in handy. Although I'm having a hard time figuring out why you'd want a derived class that adds fields but wants to use the parent'

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-10 Thread Eric V. Smith
Eric V. Smith added the comment: > Do you need anything from me here? No, I don't think so. Thanks. -- ___ Python tracker <https://bugs.python.org

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Eric V. Smith
Eric V. Smith added the comment: > So, should we reopen this ad add the flag to suppress __match_args__ > generation after all? I think so, although I'm still contemplating it. I can't decide if we should also add match_arg=False to field(). Or is it good enough to just

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Eric V. Smith
Eric V. Smith added the comment: Okay, I'll re-open this to just add @dataclass(match_args=False). -- resolution: rejected -> stage: resolved -> needs patch status: closed -> open ___ Python tracker <https://bugs.pyth

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Eric V. Smith
Eric V. Smith added the comment: Here's a question. If __init__ is not being generated, either because the user supplied one to this class, or if init=False is specified, should __match_args__ be generated? I think the answer should be no, since the code has no idea what the paramete

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Eric V. Smith
Eric V. Smith added the comment: > Are there other cases where suppressing one thing affects others? Only the complex interactions among the unsafe_hash, eq, and frozen parameters. It feels like if __init__ is not being generated, then the @dataclass code would have no idea what it sho

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Eric V. Smith
Eric V. Smith added the comment: I can go either way. It's easy enough for the user to add their own __match_args__, so I won't link them. Here's what I have for the documentation, which is why the issue came up: - ``match_args``: If true (the default is

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +24072 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25337 ___ Python tracker <https://bugs.python.org/issu

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 750f484752763fe9ac1d6455780aabcb67f25508 by Eric V. Smith in branch 'master': bpo-43764: Add match_args=False parameter to dataclass decorator and to make_dataclasses function. (GH-25337) https://github.com/python/cpyt

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-10 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43808] Add .isfloat() method to str

2021-04-11 Thread Eric V. Smith
Eric V. Smith added the comment: Wouldn't the next thing you do be to convert it to a float, so you'd call float() twice? I think you'd be better off just catching the exception yourself, and using the result of float(). I'm opposed to such a simple function being a mem

[issue43815] documentation for types.new_class() mention misleading default for exec_body

2021-04-12 Thread Eric V. Smith
New submission from Eric V. Smith : https://github.com/python/cpython/blob/3.8/Lib/types.py The documentation says "If no callback is provided, it has the same effect as passing in lambda ns: ns." I read this as saying that the callback should return the namespace, but in reality

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-12 Thread Eric V. Smith
Eric V. Smith added the comment: These files were probably added as part of str.format() or short float repr. I think the fact that they've been moved to Include/cpython means that user code shouldn't be using them. See https://bugs.python.org/issue35134 and https://vstinner.githu

[issue43820] Remove namespace copy from dataclasses.make_dataclass()

2021-04-12 Thread Eric V. Smith
New submission from Eric V. Smith : In make_dataclasses(), the "namespace" argument is copied because it is mutated. This isn't really necessary: the callback passed to types.new_class() could just update its "ns" parameter with "namespace" and with the

[issue43820] Remove namespace copy from dataclasses.make_dataclass()

2021-04-12 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +24105 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25372 ___ Python tracker <https://bugs.python.org/issu

[issue43835] Dataclasses don't call base class __init__

2021-04-13 Thread Eric V. Smith
Eric V. Smith added the comment: dataclasses doesn't know the signature of the base class's __init__, so it can't know how to call it. I realize you've given an example that would accept any parameters, but that isn't typical. What if the base class was: @datacl

[issue43080] pprint for dataclass instances

2021-04-13 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 11159d2c9d6616497ef4cc62953a5c3cc8454afb by Lewis Gaul in branch 'master': bpo-43080: pprint for dataclass instances (GH-24389) https://github.com/python/cpython/commit/11159d2c9d6616497ef4cc62953a5c

[issue43080] pprint for dataclass instances

2021-04-13 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for all of the work, LewisGaul. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43835] Dataclasses don't call base class __init__

2021-04-13 Thread Eric V. Smith
Eric V. Smith added the comment: > The dataclass doesn't need to know what arguments the parent __init__ > accepts. It should consume the arguments it needs to initialize its instance > attributes, and forward the rest to the parent __init__. The generated __init__() uses ever

[issue43835] Dataclasses don't call base class __init__

2021-04-14 Thread Eric V. Smith
Eric V. Smith added the comment: But Bar(1, 2), Bar(1, foo=2), Bar(bar=1, foo=2) all give errors. These are all valid if both Foo and Bar are decorated with @dataclass. Calling base class __init__() functions is an incompatible change, and I don't think we'll make any chang

[issue43835] Dataclasses don't call base class __init__

2021-04-14 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, I'm sure it happens. from dataclasses import dataclass @dataclass class Foo: foo: int def __init__(self, a, b, c): self.foo = a * b * c @dataclass class Bar(Foo): bar: int print(Bar(1, 2)) print(Foo(1,

[issue43820] Remove namespace copy from dataclasses.make_dataclass()

2021-04-14 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43835] Dataclasses don't call base class __init__

2021-04-14 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org/issue43835> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43858] Provide method to get list of logging level names

2021-04-15 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43858> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43858] Provide method to get list of logging level names

2021-04-15 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +vinay.sajip ___ Python tracker <https://bugs.python.org/issue43858> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43872] Unable to compile cpython in Visual Studio 2019

2021-04-16 Thread Eric V. Smith
Eric V. Smith added the comment: It's almost certainly not a bug in CPython. But you haven't even shown us what the error is, so it's impossible to say. What error are you seeing? -- nosy: +eric.smith ___ Python tracker <https

[issue43872] Unable to compile cpython in Visual Studio 2019

2021-04-16 Thread Eric V. Smith
Eric V. Smith added the comment: Okay, and good luck! -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue43872> ___ ___ Python-

[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 <https://bugs.python.org/issue43901> ___ ___ 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

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

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

[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

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

[issue43817] Add inspect.get_annotations()

2021-04-21 Thread Eric V. Smith
Eric V. Smith added the comment: > And since there are definitely circumstances in which it can't return > __annotations__ directly, that indicates that it should never return > __annotations__ directly. And the follow on here is that get_annotations() shouldn't set __ann

[issue43906] turtle graphics don't work

2021-04-21 Thread Eric V. Smith
Change by Eric V. Smith : -- status: open -> closed ___ Python tracker <https://bugs.python.org/issue43906> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43817] Add inspect.get_annotations()

2021-04-22 Thread Eric V. Smith
Eric V. Smith added the comment: > To be honest, I've never been really sure if the idea of PEP 563 stringized > annotations are supposed to be a hidden implementation detail, or a > first-class concept that the user (and the standard library) is expected to > deal

[issue43817] Add inspect.get_annotations()

2021-04-22 Thread Eric V. Smith
Eric V. Smith added the comment: > p.s. assuming you meant PEP 563, not PEP 573. Yes. Someday I'll figure out this keyboard. -- ___ Python tracker <https://bugs.python.org

[issue43923] Can't create generic NamedTuple as of py3.9

2021-04-23 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43923> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2021-04-24 Thread Eric V. Smith
Eric V. Smith added the comment: It's find to have advice of "do X in 3.9", and "do Y in 3.10+". I think the issue is: if you have code that needs to run in 3.9 and 3.10+, what should you do? There needs to be

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

2021-04-24 Thread Eric V. Smith
Eric V. Smith added the comment: "It's fine to have advice ..." -- ___ Python tracker <https://bugs.python.org/issue43901> ___ ___ Python-b

[issue43938] Document that dataclasses.FrozenInstanceError derives from AttributeError

2021-04-25 Thread Eric V. Smith
New submission from Eric V. Smith : This is a newcomer friendly issue. The documentation just needs a sentence that FrozenInstanceError is derived from AttributeError. -- assignee: docs@python components: Documentation keywords: easy, newcomer friendly messages: 391861 nosy: docs

[issue43532] Add keyword-only fields to dataclasses

2021-04-25 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: +24320 pull_request: https://github.com/python/cpython/pull/25608 ___ Python tracker <https://bugs.python.org/issue43

[issue43532] Add keyword-only fields to dataclasses

2021-04-26 Thread Eric V. Smith
Eric V. Smith added the comment: I've checked in the code, tests, and some basic documentation. I didn't finish the documentation in order to make sure I could get this in before beta 1. I'm going to leave this issue open until I have time for the rest of the

[issue43938] Document that dataclasses.FrozenInstanceError derives from AttributeError

2021-04-26 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 8a307e488d596914a7a5df6b2fdd945f8ce81e69 by Llandy Riveron Del Risco in branch 'master': bpo-43938: improve dataclasses.FrozenInstanceError documentation (GH-25603) https://github.com/python/cpyt

[issue43938] Document that dataclasses.FrozenInstanceError derives from AttributeError

2021-04-26 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 081bfe4eb58e107de0a38e98c44a3253e4ed1240 by Miss Islington (bot) in branch '3.8': bpo-43938: improve dataclasses.FrozenInstanceError documentation (GH-25603) (GH-25636) https://github.com/python/cpyt

[issue43938] Document that dataclasses.FrozenInstanceError derives from AttributeError

2021-04-26 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset c9c1dbd253d70665c1fd20e6341f9a08e21f37f4 by Miss Islington (bot) in branch '3.9': bpo-43938: improve dataclasses.FrozenInstanceError documentation (GH-25603) (GH-25635) https://github.com/python/cpyt

[issue43938] Document that dataclasses.FrozenInstanceError derives from AttributeError

2021-04-26 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43817] Add inspect.get_annotations()

2021-04-26 Thread Eric V. Smith
Eric V. Smith added the comment: I'd like to see the default behavior be to raise an exception if eval fails on any annotation. I think it's reasonable to provide a way to find out which specific keys have problems, but I don't think that should be the default. Wouldn'

[issue43953] InitVar should not be available on a @dataclass-decorated class

2021-04-27 Thread Eric V. Smith
Eric V. Smith added the comment: This is just how Python works. The default values for .x and .y are set on the class A, not its instances. Here's the equivalent without dataclasses: >>> class A: ... x = 0 ... y = 1 ... >>> a = A() >>> a.x 0 >>&g

[issue43953] InitVar should not be available on a @dataclass-decorated class

2021-04-27 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith type: -> behavior versions: -Python 3.11, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/i

[issue43953] InitVar should not be available on a @dataclass-decorated class

2021-04-27 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not aware of what problems it would cause, but there's no doubt someone who's relying on it. Since it's a behavior of normal classes, changing it would violate dataclasses desire (not always realized) to have as little impact as p

[issue43532] Add keyword-only fields to dataclasses

2021-04-27 Thread Eric V. Smith
Eric V. Smith added the comment: > Will this close https://bugs.python.org/issue36077 ? No, not directly, although I'm going to close that issue as "won't fix". But you can specify that the child class requires all params as kw_only. Continuing the example: >

[issue43965] dataclasses.replace breaks when __init__ is overrriden in subclass

2021-04-28 Thread Eric V. Smith
Eric V. Smith added the comment: I'm open to suggestions on how this could be fixed, but I don't see how it's possible. I guess the best thing to do would be to fail if __init__() isn't the one that was generated by @dataclass. But that might be too pessimistic: the user

[issue43970] Optimize Path.cwd() in pathlib

2021-04-28 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 4a85718212fd032c922ca7d630b2602dd4b29a35 by kfollstad in branch 'master': bpo-43970: Optimize Path.cwd() in pathlib by not instantiating a class unnecessarily (GH-25699) https://github.com/python/cpyt

[issue43970] Optimize Path.cwd() in pathlib

2021-04-28 Thread Eric V. Smith
Eric V. Smith added the comment: I'm merging this not so much because of the performance aspect, but just to remove some unnecessary code. But in any event, thanks for the contribution! -- resolution: -> fixed stage: patch review -> resolved status: ope

[issue36077] Inheritance dataclasses fields and default init statement

2021-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this in favor of the kw_only work done in issue 43532. I realize they're not quite the same thing, but we'll see how it works out in Python 3.10, and possibly make adjustments when we have some real world experience. --

[issue43997] dataclasses documentation needs version added for match_args, kw_only, and slots

2021-04-30 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: eric.smith priority: normal severity: normal stage: needs patch status: open title: dataclasses documentation needs version added for match_args, kw_only, and slots versions: Python 3.10 ___ Python tracker <ht

[issue43997] dataclasses documentation needs version added for match_args, kw_only, and slots

2021-04-30 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> docs@python components: +Documentation keywords: +easy, newcomer friendly nosy: +docs@python ___ Python tracker <https://bugs.python.org/issu

[issue42269] Add ability to set __slots__ in dataclasses

2021-04-30 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset c24199184bea0c851c1a7296ae54aaf18ee56752 by Yurii Karabas in branch 'master': bpo-42269: Add slots parameter to dataclass decorator (GH-24171) https://github.com/python/cpython/commit/c24199184bea0c851c1a7296ae54aa

[issue42269] Add ability to set __slots__ in dataclasses

2021-04-30 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for all of your work, Yurii. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43999] Cannot pickle frozen dataclasses with slots

2021-05-01 Thread Eric V. Smith
New submission from Eric V. Smith : Originally reported in https://github.com/ericvsmith/dataclasses/issues/154 import pickle from dataclasses import dataclass @dataclass(frozen=True, slots=True) class ExampleDataclass: foo: str bar: int assert ExampleDataclass.__slots__ == (&quo

[issue43999] Cannot pickle frozen dataclasses with slots

2021-05-01 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +24477 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25786 ___ Python tracker <https://bugs.python.org/issu

[issue43999] Cannot pickle frozen dataclasses with slots

2021-05-01 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43815] documentation for types.new_class() mention misleading default for exec_body

2021-05-01 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, shreyneil! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41277] documentation: os.setxattr() errno EEXIST and ENODATA

2021-05-01 Thread Eric V. Smith
Eric V. Smith added the comment: Sorry, ZackerySpytz. I saw PR 25742 first and reviewed and merged it before I saw that you have an earlier PR on this issue. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue41277] documentation: os.setxattr() errno EEXIST and ENODATA

2021-05-01 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43999] Cannot pickle frozen dataclasses with slots

2021-05-01 Thread Eric V. Smith
Change by Eric V. Smith : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue43999> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43997] dataclasses documentation needs version added for match_args, kw_only, and slots

2021-05-02 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python

[issue44015] dataclasses: it should be an error to specify KW_ONLY twice

2021-05-02 Thread Eric V. Smith
New submission from Eric V. Smith : Specifying KW_ONLY twice should raise an exception, but does not: >>> @dataclasses.dataclass ... class foo: ... _: dataclasses.KW_ONLY ... x: dataclasses.KW_ONLY ... -- assignee: eric.smith components: Library (Lib) messages: 39

[issue44015] dataclasses: it should be an error to specify KW_ONLY twice

2021-05-03 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +24525 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25841 ___ Python tracker <https://bugs.python.org/issu

[issue44015] dataclasses: it should be an error to specify KW_ONLY twice

2021-05-03 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 99ad742ea913e421d012c1a623029eac31bdfe85 by Eric V. Smith in branch 'master': bpo-44015: dataclasses should allow KW_ONLY to be specified only once per class (GH-25841) https://github.com/python/cpyt

[issue44015] dataclasses: it should be an error to specify KW_ONLY twice

2021-05-03 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-05-03 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: eric.smith -> ___ Python tracker <https://bugs.python.org/issue43558> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-05-03 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +newcomer friendly ___ Python tracker <https://bugs.python.org/issue43558> ___ ___ Python-bugs-list mailing list Unsub

[issue43953] InitVar should not be available on a @dataclass-decorated class

2021-05-04 Thread Eric V. Smith
Eric V. Smith added the comment: I don’t see any way of changing this behavior, so I’m going to close this issue. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44045] canonicalize "upper-case" -> "uppercase"; "lower-case" -> "lowercase"

2021-05-06 Thread Eric V. Smith
Eric V. Smith added the comment: I think we'd want to look at the 33 uses with hyphens to make sure removing the hyphen is correct (as opposed to just blindly make a change). But I'm generally supportive. -- nosy: +eric.smith ___ Pyth

[issue44053] Can't connect to a server also not showing any type of output

2021-05-06 Thread Eric V. Smith
New submission from Eric V. Smith : If you think this is a bug, please attach the text of a stand-alone example demonstrating the problem. Please do not attach an image or a screen capture, use text so we can run and reproduce the problem. That said, it's unlikely this is a bug in P

[issue43176] Dataclasses derived from empty frozen bases skip immutability checks

2021-05-06 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide a small snippet of code showing the kind of thing that broke? -- ___ Python tracker <https://bugs.python.org/issue43

[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-05-06 Thread Eric V. Smith
Eric V. Smith added the comment: Sure. Take your time! Thank you in advance for your contribution. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43176] Dataclasses derived from empty frozen bases skip immutability checks

2021-05-06 Thread Eric V. Smith
Eric V. Smith added the comment: Hmm. I think maybe the intent was that if you're frozen, treat all the fields as frozen, including ones you inherit, regardless if the base classes are frozen or not. -- ___ Python tracker &

<    39   40   41   42   43   44   45   46   47   48   >