[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-18 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset c47c8ba2969c9faf1c036b3dc4b0a5cf0d3aa0cc by Eric V. Smith (Miss Islington (bot)) in branch '2.7': bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16236) https://github.com/python/cpyt

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Serhiy that !s solves the problem. But as a convenience it might be nice to add __format__. This issue pops up from time to time on Path and other types, and I don't think !s is very discoverable. Especially because formatting works w

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: Correct: this change was made specifically so that objects could add their own format specifiers at a later time. If I recall correctly, This change was precipitated by wanting to add datetime.__format__: this change broke existing uses for format() that

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think anyone is suggesting reverting the decision on object.__format__. That decision should stay. I think the suggestion is to add Path.__format__, which just converts to a string and formats with the given spec. Unless someone can think

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: I'm also -0 on it. It's up to Antoine. -- ___ Python tracker <https://bugs.python.org/issue38222> ___ ___ Python-b

[issue38228] Missing documentation on strftime modifier O

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: Have you tried this on Windows or macOS? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue38228> ___ ___

[issue38297] Imports at top of module is often not used

2019-09-27 Thread Eric V. Smith
Eric V. Smith added the comment: I think PEP 8 should say "Module-level imports are always put at the top of the file, ...". -- nosy: +eric.smith ___ Python tracker <https://bugs.python.o

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

2019-10-01 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org/issue36470> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: I definitely think we should not modify any code in the stdlib just to switch to f-strings. I think the code examples in the docs would benefit from a consistent style, and since f-strings are the least verbose way to format strings, I'd endorse using

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: >> I definitely think we should not modify any code in the stdlib just to >> switch to f-strings. > Does this also apply to updating code to use f-strings in an area that's > already being modified for a functional purpose? No.

[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-03 Thread Eric V. Smith
Eric V. Smith added the comment: I don't see that as an improvement, especially when the goal is to not change any functionality. But maybe I'm just used to truth tables. To me, the truth table makes it clear that each case is handled correctly. -- assignee: -> er

[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-04 Thread Eric V. Smith
Eric V. Smith added the comment: Thank you for your contribution, @iomintz, but I'm not going to accept this change. I don't think it improves the clarity of the code. And I realize this is wholly a subjective decision, and others may disagree. But to me, looking at the table

[issue38401] Make dataclass attribute docstrings accessible

2019-10-08 Thread Eric V. Smith
Eric V. Smith added the comment: Note that those strings are not docstrings, per se. They're just strings, and aren't available in the class definition for the dataclass decorator to see. It's really no different from: class X: x: int 3 That 3 just gets evaluated

[issue38408] urlparse gives no method to build a url with a port

2019-10-08 Thread Eric V. Smith
Eric V. Smith added the comment: One way I can think of doing this in a backward compatible way is to add keyword parameters to urlunparse, like: def urlunparse(components, *, username=None, password=None, hostname=None, port=None): Which would make your call: site_to_test

[issue38408] urlparse gives no method to build a url with a port

2019-10-09 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, that does work: >>> urllib.parse.urlunparse(("http", f"{host}:{port}", "/", "", "", "")) 'http://hostname:1234/' The only problem is that your code now needs to look like &

[issue38408] urlparse gives no method to build a url with a port

2019-10-09 Thread Eric V. Smith
Eric V. Smith added the comment: Okay, then I'll close this. -- resolution: -> wont fix stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.p

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-10 Thread Eric V. Smith
Eric V. Smith added the comment: I think [arg ...] would make sense. Removing 3.5 and 3.6, since they're in security only mode. Adding 3.9. -- nosy: +eric.smith versions: +Python 3.9 -Python 3.5, Python 3.6 ___ Python tracker &

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue38444> ___ ___ Python-bugs-list mai

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: This would be a 3.9 feature only, so changing the versions. -- versions: -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue38

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: Doesn't __post_init__ address this use case? -- ___ Python tracker <https://bugs.python.org/issue38444> ___ ___ Pytho

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: I'll try and think of something better. I know I'm guilty of sending to python-ideas all the time, but discussing proposed design decisions like this are what that list is all about. If you want to bring it up there, I'd focus on mak

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks. I'm always looking for ways to make dataclasses easier to use, while keeping within the original goals. I'll close this for now. -- resolution: -> wont fix stage: -> resolved status

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think it's any more precise. It just seems verbose and confusing to me, while conveying the same information. `[arg [arg ...]]` to me means "optionally, an arg followed by one or more optional args". While `[arg ...]` to me me

[issue38462] Typo (nam ing) in import system docs

2019-10-13 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not seeing this in either the master or 3.5 branches. Perhaps this is being done locally by your browser? Unfortunately I can't find a way for github to link to a specific line in a .rst file, but when I look at the source code and https://

[issue38462] Typo (nam ing) in import system docs

2019-10-13 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38462> ___ ___

[issue38481] Class static property not static

2019-10-15 Thread Eric V. Smith
Eric V. Smith added the comment: When you assign to self.num, you're creating an instance variable which hides the class variable. Instead, assign directly to the class variable: class D: num = 0 def __init__(self): D.num += 1 print('D num', self.num)

[issue38496] Python3 allows mixture of tabs and spaces for indentation

2019-10-16 Thread Eric V. Smith
Eric V. Smith added the comment: I can verify this on 3.7.4. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue38496> ___ ___ Python-bug

[issue38496] Python3 allows mixture of tabs and spaces for indentation

2019-10-16 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Serhiy. This has been reported in 24260, so I'm closing this issue. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> TabError behavior doesn't match documentat

[issue38498] The expression '' in '' == '' is evaluated as True

2019-10-16 Thread Eric V. Smith
Eric V. Smith added the comment: For future reference: Specifically, note that: '' in '' == '' is equivalent to: ('' in '') and ('' == '') -- nosy: +eric.smith resolution: works for me -> not a bug ___

[issue38556] Walrus operator in list comprehensions [Python 3.8.0]

2019-10-22 Thread Eric V. Smith
Eric V. Smith added the comment: This is explicitly mentioned in PEP 572 as being disallowed: "Due to design constraints in the reference implementation (the symbol table analyser cannot easily detect when names are re-used between the leftmost comprehension iterable expression and the

[issue34776] Postponed annotations break inspection of dataclasses

2019-10-23 Thread Eric V. Smith
Eric V. Smith added the comment: Yury: I'm okay with merging. If I recall, you were going to add a comment or two about the approach (a closure, if I remember correctly). I think we should backport to 3.8 and 3.7: it's a bug. --

[issue38574] Dataclasses documentation should show the necessary imports

2019-10-24 Thread Eric V. Smith
Eric V. Smith added the comment: This is a duplicate of issue 36661. -- nosy: +eric.smith resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Missing dataclass decorator import in dataclasses module docs __

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

2019-10-27 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue38605> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37948] get_type_hints fails if there are un-annotated fields in a dataclass

2019-10-28 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure what can be done with this. The problem is that the decorator doesn't know what's in the caller's namespace. The type being added is "typing.Any". If the caller doesn't import typing, then get_type_hints will

[issue38619] [Doc] UUID.hex is lowercase

2019-10-28 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, it's always guaranteed to be lowercase. I don't think it would hurt to mention lowercase briefly (like add just one word!). -- nosy: +eric.smith ___ Python tracker <https://bugs.python.o

[issue38615] imaplib has no timeout setting

2019-10-28 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a reasonable request. It would have to be a 3.9 feature. Perhaps some code (and tests) can be stolen from poplib. -- nosy: +eric.smith stage: -> needs patch versions: -Python 3.5, Python 3.6, Python 3.7, Python

[issue35745] Add import statement in dataclass code snippet

2019-10-29 Thread Eric V. Smith
Eric V. Smith added the comment: Closed in favor of issue 36661 (which I realize was opened later, but has more discussion, so I'm using it going forward). -- resolution: -> duplicate stage: -> resolved status: open -> closed ___

[issue38568] [3.7.5 x86_64 Linux] f-string parsing results in EOL

2019-10-29 Thread Eric V. Smith
Eric V. Smith added the comment: > It is a limitation of f-strings, though. We're not allowed to use > backslashes within the f-string expression in curly braces. I've considered relaxing these restrictions, although it's very complicated. The parser would need to b

[issue38657] String format for hexadecimal notation breaks padding with alternative form

2019-11-01 Thread Eric V. Smith
Eric V. Smith added the comment: int.__format__ inherits this from %-formatting, which inherits it from C's printf. There's no way we're going to change this at this point: the breakage would be too great. So, I'm going to reject this. -- assignee: -> eric.

[issue38657] String format for hexadecimal notation breaks padding with alternative form

2019-11-01 Thread Eric V. Smith
Eric V. Smith added the comment: Now that I re-read this, maybe it was a documentation request, not a functional change? I'd be okay with documenting the existing behavior, so I'll re-open this and change the type. Patches welcome. -- components: +Documentation resolution

[issue38657] Clarify numeric padding behavior in string formatting

2019-11-03 Thread Eric V. Smith
Change by Eric V. Smith : -- title: String format for hexadecimal notation breaks padding with alternative form -> Clarify numeric padding behavior in string formatting ___ Python tracker <https://bugs.python.org/issu

[issue38693] Use f-strings instead of str.format within importlib

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

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

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

[issue38719] Surprising and possibly incorrect passing of InitVar to __post_init__ method of data classes

2019-11-06 Thread Eric V. Smith
Eric V. Smith added the comment: I think using named parameters in the call to __post_init__ is reasonable. It's currently positional. -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org

[issue38719] Surprising and possibly incorrect passing of InitVar to __post_init__ method of data classes

2019-11-06 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think that's necessary. We should just document that parameters are passed by name to __post_init__. This would have to be a 3.9 feature, since it's not strictly backward compatible. -- versions: +Python

[issue43471] Fails to import bz2 on Ubuntu

2021-03-11 Thread Eric V. Smith
Change by Eric V. Smith : -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue43471> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue43477] from x import * behavior inconsistent between module types.

2021-03-12 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +brett.cannon, eric.smith ___ Python tracker <https://bugs.python.org/issue43477> ___ ___ Python-bugs-list mailing list Unsub

[issue43477] from x import * behavior inconsistent between module types.

2021-03-13 Thread Eric V. Smith
Eric V. Smith added the comment: "git blame" will help you identify the authors. It looks there are 5 people involved: Brett, Antoine, Nick, Eric Snow, and Dino. -- ___ Python tracker <https://bugs.python.o

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-15 Thread Eric V. Smith
Eric V. Smith added the comment: Perhaps you could open a documentation bug? I think specific examples of where the documentation is wrong, and how it could be improved, would be helpful. Thanks! -- nosy: +eric.smith ___ Python tracker <ht

[issue43080] pprint for dataclass instances

2021-03-15 Thread Eric V. Smith
Eric V. Smith added the comment: I'm leaning toward accepting this on the condition that it only be invoked for dataclasses where __repr__ was the version generated by @dataclass. And also that it use the same fields that the generated __repr__ would use (basically skipping repr=

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-15 Thread Eric V. Smith
Eric V. Smith added the comment: I think we could document where a "quoted string of length 8 characters would be returned in multiple pieces" occurs. Which API is that? If we change that, and if we call it an enhancement instead of a bug fix, then it can't be backported. It

[issue43516] python on raspberry pi

2021-03-16 Thread Eric V. Smith
Eric V. Smith added the comment: You’ve not told us the behavior you see or the behavior you expect, so we can’t tell if this is a bug in python. But it’s in all likelihood not a bug. If you want to get help with your code, I suggest asking on the python-list mailing list or maybe

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: Could you give an example (using a list of callbacks and values or something) that shows how it's behaving that you think is problematic? That's the part I'm not understanding. This doesn't have to be a real example, just show what the us

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, that's very helpful. Does this only affect content text? This should definitely be documented. As far as changing it, I think the best thing to do is say that if the context text is less than some size (I don't know, maybe 1MB?) that it&#x

[issue43471] Fails to import bz2 on Ubuntu

2021-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. @xmm: If you can provide more information showing that this is a bug in Python or its build process, please re-open this issue. -- resolution: -> not a bug stage: -> resolved status: ope

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: I think that's good text, once the enhancement is made. But for existing versions of python, shouldn't we just document that the text might come back in chunks? I don't have a feel for what the

[issue43532] Add keyword-only fields to dataclasses

2021-03-17 Thread Eric V. Smith
New submission from Eric V. Smith : The idea is that a keyword-only field becomes a keyword-only argument to __init__(). For the proposal and a discussion, see https://mail.python.org/archives/list/python-id...@python.org/message/FI6KS4O67XDEIDYOFWCXMDLDOSCNSEYG/ The @dataclass decorator

[issue33129] Add kwarg-only option to dataclass

2021-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: Closing this in favor of issue 43532, which has a slightly elaborated approach. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Add keyword-only fields to

[issue43532] Add keyword-only fields to dataclasses

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

[issue43535] Make str.join auto-convert inputs to strings.

2021-03-18 Thread Eric V. Smith
Eric V. Smith added the comment: I'm +0.5. Every time this bites me, I apply the same solution, so you're probably right that str.join should just do the work itself. And it's no doubt more performant that way, anyway. And I've probably got some code that's jus

[issue43483] Loss of content in simple (but oversize) SAX parsing

2021-03-18 Thread Eric V. Smith
Eric V. Smith added the comment: I'd add a note to the docs about it, then open a feature request to change the behavior. You could turn this issue into a documentation fix. Unfortunately I don't know if there's a core dev who pays attention to the XML parsers. But I can pr

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

2021-03-19 Thread Eric V. Smith
New submission from Eric V. Smith : https://docs.python.org/3/library/dataclasses.html#post-init-processing should mention that if you need to call super().__init__, you should do it in __post_init__. Dataclasses cannot know what parameters to pass to the super class's __init__, so y

[issue43559] ctypes: Heap Pointer is damaged between C and Python

2021-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: Are you using a 64-bit version of python? What is sys.maxsize? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43

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

2021-03-22 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: -23730 ___ Python tracker <https://bugs.python.org/issue43558> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2021-03-22 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: -23731 ___ Python tracker <https://bugs.python.org/issue43558> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2021-03-22 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +easy -patch stage: patch review -> needs patch ___ Python tracker <https://bugs.python.org/issue43558> ___ ___ Python-

[issue41064] Specialise syntax error of **dict in f-string field

2021-03-23 Thread Eric V. Smith
Eric V. Smith added the comment: The parens are added in fstring_compile_expr at https://github.com/python/cpython/blob/9feae41c4f04ca27fd2c865807a5caeb50bf4fc4/Parser/string_parser.c#L391 I don't recall if this is really only a "skip leading whitespace" problem, or if the

[issue43618] random.shuffle loses most of the elements

2021-03-24 Thread Eric V. Smith
Eric V. Smith added the comment: Same advice as issue 43616: please provide an example we can run. This most likely a problem with how you're using lxml, and not a bug in python. But since we can't test it, we can't know for sure. -- no

[issue43624] Add underscore as a decimal separator for string formatting

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

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-25 Thread Eric V. Smith
Eric V. Smith added the comment: If we do anything for float, we should do the same for decimal.Decimal. -- ___ Python tracker <https://bugs.python.org/issue43

[issue31907] doc: Clarify error message when attempting to call function via str.format()

2021-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: > The syntax is related to that of formatted string literals, but it is less > sophisticated and, in particular, does not support arbitrary expressions. That seems fine to me. -- ___ Python tracker

[issue31907] doc: Clarify error message when attempting to call function via str.format()

2021-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset fb1d01b9630b5069fe975f16e07a027d90b89434 by Irit Katriel in branch 'master': bpo-31907: [doc] clarify that str.format() does not support arbitrary expressions (#25053) https://github.com/python/cpyt

[issue31907] doc: Clarify error message when attempting to call function via str.format()

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

[issue31907] doc: Clarify error message when attempting to call function via str.format()

2021-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 9a8e0780247acb256dd8b04c15b3dd0f59ef2fe1 by Miss Islington (bot) in branch '3.9': bpo-31907: [doc] clarify that str.format() does not support arbitrary expressions (GH-25053) (GH-25055) https://github.com/python/cpyt

[issue43624] Add underscore as a decimal separator for string formatting

2021-03-29 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond. We can't make a change that would modify existing program output. Which is unfortunate, but such is life. And I'd prefer to see groupings of 5 on the right, but I realize I might be in th

[issue43675] test

2021-03-30 Thread Eric V. Smith
Change by Eric V. Smith : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue43675> ___ ___ Python-bugs-list

[issue43677] Descriptor.rst - Reference to Py_MethodType is not up to date

2021-03-31 Thread Eric V. Smith
Eric V. Smith added the comment: I think it's PyMethod_Type. -- nosy: +eric.smith, rhettinger ___ Python tracker <https://bugs.python.org/issue43677> ___ ___

[issue43678] TypeError: get() got an unexpected keyword argument 'vars'

2021-03-31 Thread Eric V. Smith
New submission from Eric V. Smith : Please provide example code that we can run which demonstrates the problem. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue43

[issue43695] Improve `=` in f-strings

2021-04-01 Thread Eric V. Smith
Eric V. Smith added the comment: I don't see how this would be possible in general. What would you do with a function call that has side effects? f'{a()+b+c=}' ? You'd end up calling a() twice, or inventing your own expression evaluator.

[issue43697] Importlib documentation does not cover how meta path finders should handle namespace packages

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

[issue43695] Improve `=` in f-strings

2021-04-01 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. I agree with Serhiy that it's pushing f-strings too far. If you really want to pursue this, you'll need to specify the semantics much more clearly, and then bring it up on the python-ideas mailing list. But I don

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

2021-04-05 Thread Eric V. Smith
Eric V. Smith added the comment: > ModuleNotFoundError: _curses library not found. Install a supported _curses > library to use the curses module. Is installing _curses possible, on any supported platform? Or would a better message say that curses is not supported on this pl

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

2021-04-05 Thread Eric V. Smith
Eric V. Smith added the comment: While I wouldn't object to tweaking the message associated with the exception, I'm not sure it's necessary. Googling "curses modulenotfound" gives a number of hits that have good information about the issue. Is there really a practi

[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: New changeset bdee2a389e4b10e1c0ab65bbd4fd03defe7b2837 by Miss Islington (bot) in branch '3.8': bpo-36470: Allow dataclasses.replace() to handle InitVars with default values (GH-20867) (GH-25201) https://github.com/python/cpyt

[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: New changeset 013c30e5fcee449cee63354d34585d6111782c82 by Miss Islington (bot) in branch '3.9': bpo-36470: Allow dataclasses.replace() to handle InitVars with default values (GH-20867) (GH-25200) https://github.com/python/cpyt

[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

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