[issue44768] dataclasses.dataclass and collections.namedtuple do the same thing

2021-07-28 Thread Eric V. Smith
Eric V. Smith added the comment: They are very different. I don’t see how they could be combined. PEP 557 goes in to some of the differences. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44767] python -m flask run gives OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

2021-07-28 Thread Eric V. Smith
Eric V. Smith added the comment: This sounds like a flask problem, not a python bug. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44759] ctype generates misleading error-msg opening lib.so when compiled for wrong arch

2021-07-28 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think we get enough information from the operating system in order to generate the message that you'd like to see, unfortunately. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44740] Lowercase "Internet" and "web" in docs

2021-07-26 Thread Eric V. Smith
Eric V. Smith added the comment: That seems reasonable to me. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44740> ___ ___ Python-bug

[issue36643] Forward reference is not resolved by dataclasses.fields()

2021-07-24 Thread Eric V. Smith
Eric V. Smith added the comment: Also, when dataclasses was originally written, it deliberately did not import typing, for performance reasons. I don't know if PEP 560 (I think) improved performance enough to make a difference. But adding this dependency needs to be looked at. But if we

[issue36643] Forward reference is not resolved by dataclasses.fields()

2021-07-24 Thread Eric V. Smith
Eric V. Smith added the comment: I’m deferring any action on this until PEP 649 is ruled on. -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org/issu

[issue44674] dataclasses should allow frozendict default value

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

[issue44674] dataclasses should allow frozendict default value

2021-07-23 Thread Eric V. Smith
Eric V. Smith added the comment: When I originally read this, I read it as frozenset. I agree that there's no good way of telling if an arbitrary class is immutable, so I'm not sure we can do anything here. So I think we should close this as a rejected idea

[issue42414] unable to document fields of dataclass

2021-07-23 Thread Eric V. Smith
Eric V. Smith added the comment: The more I think about this, the less I like it as a dataclasses-specific solution (if it’s accepted at all, that is). Why dataclasses and not attrs or NamedTuple? I suggest bringing it up on python-ideas for wider exposure

[issue44722] RFC: string Multiline Formatter

2021-07-23 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide a specification of what this class does? You’ve given an example, but not a description of the behavior. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue36643] Forward reference is not resolved by dataclasses.fields()

2021-07-22 Thread Eric V. Smith
Eric V. Smith added the comment: It can’t be resolved in fields(): it is still undefined when the fields are created. I think the best solution is PEP 649. -- ___ Python tracker <https://bugs.python.org/issue36

[issue44711] Optimize type check in pipes.py

2021-07-22 Thread Eric V. Smith
Eric V. Smith added the comment: The difference is that type(cmd) is doing an exact match on the type, while isinstance is checking for types or derived types. I don't know if that makes a difference here, but it's worth noting. -- nosy: +eric.smith

[issue42414] unable to document fields of dataclass

2021-07-20 Thread Eric V. Smith
Eric V. Smith added the comment: I think we'd be better off adding a doc parameter to dataclasses.field, and then as @terry.reedy says, modify inspect.getdoc and maybe_finddoc to look in __dataclass_fields__, if it exists. -- versions: +Python 3.11 -Python 3.10

[issue44683] Can't subscript objects with the string "1" using str.format()

2021-07-20 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, this is a "feature" of str.format. If it looks like a number, it's converted to a number, else it's used as a string. It's generally the most useful way to interpret subscripts, but as you note it doesn't handle all cases. -- nosy: +

[issue44674] dataclasses should allow frozendict default value

2021-07-19 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that would be an improvement. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44674> ___ ___ Pytho

[issue42861] ipaddress - add ability to get next closest network of any prefix size

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

[issue44649] dataclasses slots with init=False field raises AttributeException

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: With Pablo's changes, the error now reads (in 3.11): obj.b ^ AttributeError: 'Example' object has no attribute 'b' Which is a vast improvement! I'm working on a PR to initialize obj.b in __init__

[issue35673] Loader for namespace packages

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: I think a PR with tests would be a good first step. -- ___ Python tracker <https://bugs.python.org/issue35673> ___ ___ Pytho

[issue44655] Confusing message with AttributeError when attribute name matches suggestion

2021-07-16 Thread Eric V. Smith
Change by Eric V. Smith : -- title: Confusing message with AttributreError when attribute name matches suggestion -> Confusing message with AttributeError when attribute name matches suggestion ___ Python tracker <https://bugs.pyth

[issue44655] Confusing message with AttributreError when attribute name matches suggestion

2021-07-16 Thread Eric V. Smith
Change by Eric V. Smith : -- title: Confusing message with AttributreError suggestions -> Confusing message with AttributreError when attribute name matches suggestion ___ Python tracker <https://bugs.python.org/issu

[issue44655] Confusing message with AttributreError suggestions

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: Got it. Thanks for jumping on this quickly. -- title: Confusing error with __slots__ -> Confusing message with AttributreError suggestions ___ Python tracker <https://bugs.python.org/issu

[issue44655] Confusing error with __slots__

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Pablo! -- ___ Python tracker <https://bugs.python.org/issue44655> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44655] Confusing error with __slots__

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: It's obviously not super important, but it would be nicer if the version with the suggestion were more like the version without the suggestion. Specifically, mentioning the object type: >>> class E: ... __slots__=('a') ... >>> E()

[issue44655] Confusing error with __slots__

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: Also, the dot after the first 'b' was confusing to me: I thought it had something to do with an attribute of b. And the quotes around the second 'b' were also confusing, but that's mostly because the original example initialized a class variable named 'b

[issue44649] dataclasses slots with init=False field raises AttributeException

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: I created issue 44655 for the confusing error message. The problem with dataclasses is that the instance variable 'b' needs to be initialized, instead of the current dataclasses behavior where it relies on the class variable when reading 'b

[issue44655] Confusing error with __slots__

2021-07-16 Thread Eric V. Smith
New submission from Eric V. Smith : This is related to issue 44649. This is the simplest non-dataclasses case I could come up with. Given: class Example: __slots__ = ('a', 'b') def __init__(self, a): self.a = a obj = Example(42) print(obj.b) I get this in 3.10 and main

[issue44649] dataclasses slots with init=False field raises AttributeException

2021-07-15 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44649> ___ ___ Python-bugs-list mai

[issue44612] inspect module points that could be using f-String

2021-07-12 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, thank you Leonardo! There are probably places in the stdlib where changing to f-strings would be a performance improvement. Of course finding those places is the challenge! -- nosy: +eric.smith ___ Python

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-07-08 Thread Eric V. Smith
Eric V. Smith added the comment: As the author of PEP 420, I think having test discovery support namespace packages is a mistake, at least in the sense of pretending every directory is a namespace package. -- nosy: +eric.smith ___ Python tracker

[issue44575] Windows installer prohibits different patches for the same version

2021-07-07 Thread Eric V. Smith
Eric V. Smith added the comment: > As a side note, I think making the install restrictive is more work than just let it install where user wants to install. The restrictions need to be coded - don't they? :) Well at this point, the restrictions already exist! So change it

[issue44577] Probably defect in Python 3.7.11

2021-07-07 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide a short code example that reproduces this, preferably without using any third party libraries? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44551] Substraction: unprecise result

2021-07-02 Thread Eric V. Smith
Eric V. Smith added the comment: This is not a bug, but expected floating point behavior. See https://docs.python.org/3/tutorial/floatingpoint.html -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed type: -&

[issue44520] In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None

2021-07-02 Thread Eric V. Smith
Eric V. Smith added the comment: I agree this should be closed (and I'm closing it). I don't see any reason why this function should do something other than raise TypeError if given bs=None. If you want that behavior, write a small wrapper function. The "if not bs" che

[issue44529] Using typing.Union in isinstance checks

2021-06-29 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44527] On Windows, subprocess.run gets stuck indefinitely

2021-06-28 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Windows nosy: +eric.smith, paul.moore, steve.dower, tim.golden, zach.ware title: subprocess.run gets stuck indefinitely -> On Windows, subprocess.run gets stuck indefinitely ___ Python tracker <

[issue44520] In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None

2021-06-28 Thread Eric V. Smith
Eric V. Smith added the comment: Clarifying the title. -- nosy: +eric.smith title: exception is thrown if bs = None -> In Lib/urllib/parse.py quote_from_bytes, exception is thrown if bs = None ___ Python tracker <https://bugs.pyth

[issue44475] Dataclass Causes Infinite Recursion when using type of bytes

2021-06-24 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith status: open -> pending ___ Python tracker <https://bugs.python.org/issue44475> ___ ___ Python-bugs-

[issue44452] Allow paths to be joined without worrying about a leading slash

2021-06-23 Thread Eric V. Smith
Eric V. Smith added the comment: You should bring this up on the python-ideas mailing list if you want some discussion. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44496] string.Formatter class not allowing {.field}

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

[issue39078] __function.__defaults__ breaks for __init__ of dataclasses with default factory

2021-06-22 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think there's any action to be done here, so I'm going to close this. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44475] Dataclass Causes Infinite Recursion when using type of bytes

2021-06-21 Thread Eric V. Smith
Eric V. Smith added the comment: Please give a complete example that we can execute. -- ___ Python tracker <https://bugs.python.org/issue44475> ___ ___ Pytho

[issue6871] decimal.py: more format issues

2021-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Irit. I'm closing this as "won't fix". -- resolution: out of date -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bug

[issue6871] decimal.py: more format issues

2021-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: I tend to agree with Mark: any change would be disruptive, and it doesn't seem to be causing any real problem. Irit: did you come across this because it's causing a problem somewhere? -- ___ Python tracker <ht

[issue44433] processes created by subprocess.Popen is not terminating

2021-06-17 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. If you can reproduce it with a smaller program that we can test, please attach the information and re-open this issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -&

[issue44443] dataclass looks up field default value on the class, not the class's __dict__

2021-06-17 Thread Eric V. Smith
Change by Eric V. Smith : -- title: dataclass looks up default on the class, not the class's __dict__ -> dataclass looks up field default value on the class, not the class's __dict__ ___ Python tracker <https://bugs.python.org/issu

[issue44443] dataclass looks up default on the class, not the class's __dict__

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

[issue44443] dataclass looks up default on the class, not the class's __dict__

2021-06-17 Thread Eric V. Smith
Change by Eric V. Smith : -- title: dataclass looks up default on the class, not the classes __dict__ -> dataclass looks up default on the class, not the class's __dict__ ___ Python tracker <https://bugs.python.org/issu

[issue44443] dataclass looks up default on the class, not the classes __dict__

2021-06-17 Thread Eric V. Smith
New submission from Eric V. Smith : Consider: class FtpHelper(ftplib.FTP): host: str baz: str = 'baz default' >>> FtpHelper.host '' >>> FtpHelper.baz 'baz default' >>> getattr(FtpHelper, "host") '' >>> getattr(FtpHelper, "baz

[issue44365] Bad dataclass post-init example

2021-06-17 Thread Eric V. Smith
Eric V. Smith added the comment: I was thinking about something like: @dataclass class FtpHelper(ftplib.FTP): my_host: str my_user: str lookup_password: InitVar[Callable] def __post_init__(self, lookup_password): super().__init__(host=self.my_host, user=self.my_user

[issue44433] processes created by subprocess.Popen is not terminating

2021-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: This is probably not a python bug. But if you can demonstrate it without needing to install the Oracle software, we can take a look at it. You've also not explained how you're using multiprocessing. We need an complete, short, working example program

[issue44420] Add CapWords classes to datetime module?

2021-06-14 Thread Eric V. Smith
Eric V. Smith added the comment: I suggest you close it. If you want some broader discussion, you should bring it up on the python-ideas mailing list, but I don't expect you'll get much support. -- ___ Python tracker <https://bugs.python.

[issue44420] Add CapWords classes to datetime module?

2021-06-14 Thread Eric V. Smith
Eric V. Smith added the comment: Changing versions: this could only be added to 3.11. I think the ship has sailed on this. The old names could never be removed so we'd have to support both names forever. I think it's not worth the hassle. -- nosy: +eric.smith versions: -Python 3.10

[issue44393] segfault with sys.setrecursionlimit

2021-06-11 Thread Eric V. Smith
Eric V. Smith added the comment: That's the documented behavior: "A user may need to set the limit higher when they have a program that requires deep recursion and a platform that supports a higher limit. This should be done with care, because a too-high limit can lead to a crash.&qu

[issue44365] Bad dataclass post-init example

2021-06-10 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure directly calling __post_init__ is a good pattern. Why would not calling __init__, like you would with any other class, not be the preferred thing to do? -- ___ Python tracker <https://bugs.python.

[issue44365] Bad dataclass post-init example

2021-06-10 Thread Eric V. Smith
Eric V. Smith added the comment: The example was added in https://github.com/python/cpython/pull/25967 When reviewing it, I think I missed the fact that the base class is a dataclass. The example and text make more sense if Rectangle isn't a dataclass. Still, I don't like the example at all

[issue44365] Bad dataclass post-init example

2021-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: Agreed that that's not a good (or even workable) example. Thanks for pointing it out. I'll come up with something better. -- assignee: docs@python -> eric.smith versions: +Python 3.10, Python 3.11, Python

[issue44355] Allow spaces in format strings

2021-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: See msg395383 for how it's an incompatible change even to .format(). In the 15 years since I implemented .format(), this is the first I've ever heard of someone being confused by adding extra spaces. I don't think it's worth changing

[issue44355] Allow spaces in format strings

2021-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: The problem with this change is that it wouldn't be backward compatible. I'm not sure how many people it would affect, but probably more than zero. >>> str.format('{ 0 }', **{' 0 ': 42}) '42' >>> str.format('{ }', **{' ': 43}) '43' Does

[issue44355] Allow spaces in format strings

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

[issue44333] Segmentation fault

2021-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: The code you've attached doesn't generate the error you provided. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44226] Threads shutting down in Py 2.7 but not in Py 3.69 while making SSH connection using Paramiko module

2021-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: No, I'm sorry that I don't. The example is too large for me (or probably any of our volunteers) to look through and reason about. I think asking on a forum like Stack Overflow is your best bet, but even there they will ask for a simpler example. Or maybe try

[issue44333] Segmentation fault

2021-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: If you can't provide any more information, we can't help you and I'll have to close this issue. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44333] Segmentation fault

2021-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: Python 3.6 is no longer supported. Please try to reproduce this with python 3.8 or 3.9. Without seeing the code that causes the failure, it's not possible for us to provide any help. Please try to reproduce the code with the smallest possible example

[issue39247] dataclass defaults and property don't work together

2021-06-05 Thread Eric V. Smith
Eric V. Smith added the comment: > _uploaded_by: str = dataclasses.field(alias="uploaded_by", default=None, > init=False) That's an interesting idea. I'll play around with it. I'm not sure "alias" feels quite right, as it only applies to __init__ (if I'm u

[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-02 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure the original version needs improving. This sounds like a problem understanding how warnings work. Do you really want to say that for warnings, they're sometimes handled by the warning machinery and therefore don't get passed along to the calling

[issue44265] Create an MSI Package

2021-05-30 Thread Eric V. Smith
Eric V. Smith added the comment: See https://bugs.python.org/issue25124 for a discussion on why MSI won't be supported going forward. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-25 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond: I've never seen this behavior anywhere. In general, I think being looser with allowed inputs is not a good idea. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44226] Threads shutting down in Py 2.7 but not in Py 3.69 while making SSH connection using Paramiko module

2021-05-24 Thread Eric V. Smith
Eric V. Smith added the comment: This was reported a few hours ago at https://github.com/paramiko/paramiko/issues/1856. I'm closing this as a third party issue. -- nosy: +eric.smith resolution: -> third party stage: -> resolved status: open -&g

[issue44194] Folding ''.join() into f-strings

2021-05-21 Thread Eric V. Smith
Eric V. Smith added the comment: > It is a pretty-targeted optimization, so I don't expect it to speed up the > macro benchmarks. Though that shouldn't be a blocker for small, targeted > optimizations. In the past we've rejected optimizations that make the code more complex a

[issue44199] code example index error in tutorial controlflow

2021-05-20 Thread Eric V. Smith
Eric V. Smith added the comment: The example is correct. The result is sorted by the second item (index=1) of each tuple: four one three two Maybe the text could make it more clear that that's the desired output. -- nosy: +eric.smith ___ Python

[issue44194] Folding ''.join() into f-strings

2021-05-20 Thread Eric V. Smith
Eric V. Smith added the comment: To be pedantic, f-strings don't "cast" to a string, they call format(obj) on the argument. Typically this is the same as str(obj), but it need not be. I guess if all of the arguments are already exact strings then this distinction doesn't matte

[issue43905] dataclasses.astuple does deepcopy on all fields

2021-05-20 Thread Eric V. Smith
Eric V. Smith added the comment: No, iteration is explicitly a non-goal of PEP 557. See the section on namedtuple for why: https://www.python.org/dev/peps/pep-0557/#why-not-just-use-namedtuple -- ___ Python tracker <https://bugs.python.

[issue44177] Unable to get the else while parsing through AST module

2021-05-20 Thread Eric V. Smith
Eric V. Smith added the comment: There's no actual code associated with the "else" line, so there's no way to get the line number. dis.dis(sample_data) might give you some insight. Since this all works as designed, I'm going to close this issue. You might get more help on Sta

[issue44146] Format string fill not handling brace char

2021-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: Since this is working as designed, I'm going to close it. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44177] Unable to get the else while parsing through AST module

2021-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: It's in the AST. >>> tree.body[0].orelse[0].orelse[0].lineno 7 To see it with dump, use: ast.dump(tree, include_attributes=True) Which, after some reformatting, gives: Module(body=[If(test=Compare(left=Name(id='num', ctx=Load(), lineno=2, col

[issue44177] Unable to get the else while parsing through AST module

2021-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: Formatting the result, I get: Module(body=[If(test=Compare(left=Name(id='num', ctx=Load()), ops=[Gt()], comparators=[Constant(value=0, kind=None)]), body=[Expr(value=Call(func=Name(id

[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'

2021-05-18 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: -eric.smith ___ Python tracker <https://bugs.python.org/issue44171> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'

2021-05-18 Thread Eric V. Smith
Eric V. Smith added the comment: Please report this to the Cython bug tracker: https://github.com/cython/cython/issues/ When you do that, you'll want to show the actual code you're having a problem with. You're using both "//" and "/" here. As Pablo said, you're probab

[issue44171] Cython cannot compile 'a = 5/6' and return 'a = 0'

2021-05-18 Thread Eric V. Smith
New submission from Eric V. Smith : If this is really a Cython issue, you should report it on the Cython bug tracker. This bug tracker is for CPython. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44160] speed up searching for keywords by using a dictionary

2021-05-18 Thread Eric V. Smith
Eric V. Smith added the comment: Maybe the XXX comment in ceval.c should be removed? If we wouldn't change the code to use a dictionary, then that comment seems incorrect. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.

[issue44109] missing dataclass decorator in match-statement example

2021-05-17 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond: a more useful example would use dataclasses or typing.NamedTuple. The use of class variables is unusual, and it took me a while to understand how it would work. -- nosy: +eric.smith

[issue44146] Format string fill not handling brace char

2021-05-16 Thread Eric V. Smith
Eric V. Smith added the comment: In the future, if you get an error, please tell us what the error is. It makes responding to bugs easier. '{::>10d'.format(5) Gives me an error with 3.10: >>> '{::>10d'.format(5) Traceback (most recent call last): File "", line 1,

[issue44130] GIL Improvement

2021-05-14 Thread Eric V. Smith
Eric V. Smith added the comment: "If it ran in 1.98 secs then the new patch would theoretically measure 1.96 (original - 0.22)" That difference is 0.02 seconds, or about 1%, correct? I'm just trying to understand what we're meas

[issue44130] GIL Improvement

2021-05-14 Thread Eric V. Smith
Eric V. Smith added the comment: "there's an increase in speed by 0.22 or something like that" 0.22 what? Seconds? Percent? A factor of 0.22? What are you measuring, and how are you measuring it? -- nosy: +eric.smith ___ Python track

[issue44124] Unhelpful error messages with mis-ordering of f-string specifiers

2021-05-13 Thread Eric V. Smith
Eric V. Smith added the comment: As you note, some of these likely cannot be improved. There was talk last year about moving f-string's bespoke lexer/parser/compiler into the normal Python grammar. But I'm not sure if that ever got anywhere. If we did make that change, it would be easier

[issue44123] make function parameter sentinel value true singletons

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

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

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

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

2021-05-10 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, @dhoekstra! -- 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-10 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset f47305aa1fa41c38f744e9a16ae33b74c6fd45e7 by Miss Islington (bot) in branch '3.10': bpo-43558: Add note about base class initialization to dataclasses doc (GH-25967) (GH-26018) https://github.com/python/cpython/commit

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

2021-05-10 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 4d532d3f8f7970493442d7c217220f60312f92e1 by Miss Islington (bot) in branch '3.9': bpo-43558: Add note about base class initialization to dataclasses doc (GH-25967) (GH-26019) https://github.com/python/cpython/commit

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue44083> ___ ___

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Eric V. Smith
Eric V. Smith added the comment: Also: How are you executing this code? From IDLE? From the command line? -- status: pending -> open ___ Python tracker <https://bugs.python.org/issu

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Eric V. Smith
Eric V. Smith added the comment: This is almost certainly not a bug in python. You're probably entering an empty string for "a". Try it without using input(). For example, replace lines 2 and 3 with: a = "3" b = "4" -- nosy: +eric

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

2021-05-08 Thread Eric V. Smith
Eric V. Smith added the comment: The stdlib seems to have settled on lowercase for the noun version, though. My two cents: no sense not being consist just because lower-case might also work. -- ___ Python tracker <https://bugs.python.

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

2021-05-07 Thread Eric V. Smith
Eric V. Smith added the comment: That's exactly the kind of manual check I had in mind. After all "anal retentive doesn't have a hyphen unless it's used as a compound adjective". I think we should go with "lowercase" when a noun, and "low

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

2021-05-06 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +3.8regression, 3.9regression -patch resolution: fixed -> stage: resolved -> needs patch status: closed -> open ___ Python tracker <https://bugs.python.or

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

[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: Can you provide a small snippet of code showing the kind of thing that broke? -- ___ Python tracker <https://bugs.python.org/issue43

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

<    1   2   3   4   5   6   7   8   9   10   >