[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

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

2021-05-17 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.py

[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

[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

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

[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(fu

[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(),

[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.pyth

[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

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

[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&#x

[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 ___ P

[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

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

[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/is

[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/is

[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

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

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

[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.pyt

[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

[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.o

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

[issue44355] Allow spaces in format strings

2021-06-08 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' >>> st

[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

[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.1

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

[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.py

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

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

[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://bu

[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

[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

[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") '' &

[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

[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 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.pytho

[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

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

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

[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

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

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

[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

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

[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

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

[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

[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" ch

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

[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

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

[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

[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

[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

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

[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

[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

[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') ... &

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

[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

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

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

[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

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

[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

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

[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

[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

[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

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

[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

[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

[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

[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

[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.o

[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

[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

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

2021-07-28 Thread Eric V. Smith
Eric V. Smith added the comment: namedtuples have features like true immutability, being smaller, and being faster. -- versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue44

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

2021-07-28 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Steven, but since I have this typed up I'll post it here. Yes, iterability is another namedtuple feature. Although that would actually be easy to add to dataclasses, so I didn't mention it. I don't really see the point of combini

[issue44773] case_insensitive kwarg in str.replace()

2021-07-30 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond that this should be rejected. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44787] Missing valid directive %D in datetime.strftime() documentation

2021-07-30 Thread Eric V. Smith
Eric V. Smith added the comment: It's dependent on the platform's C library's strftime(). I think (but don't promise) that we document the C89 codes, but each platform might provide additional ones. -- nosy: +eric.smith ___ Py

[issue44799] typing.get_type_hints() raises TypeError for a variable annotated by dataclasses.InitVar

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

[issue44799] typing.get_type_hints() raises TypeError for a variable annotated by dataclasses.InitVar

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

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

2021-08-04 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Interpreter Core -Unicode ___ Python tracker <https://bugs.python.org/issue44683> ___ ___ Python-bugs-list mailin

[issue44818] '\t' (tab) support

2021-08-04 Thread Eric V. Smith
Eric V. Smith added the comment: Please show us an example that demonstrates your problem. Show us the code you tried, what you expected to happen, and what actually happened. Otherwise we can’t help you. -- nosy: +eric.smith ___ Python tracker

[issue44833] VideoCapture is not installing

2021-08-04 Thread Eric V. Smith
Eric V. Smith added the comment: Please do no post screen captures. Copy and paste the text into the bug report. It looks like VideoCapture has not released a 3.9 compatible wheel file on PyPI. You should follow up with that project directly, as it is not part of python’s standard library

[issue44833] VideoCapture is not installing

2021-08-04 Thread Eric V. Smith
Eric V. Smith added the comment: I don't know, and this isn't the right place to ask (since this is not a bug in Python). I suggest you ask on a VideoCapture specific forum. -- ___ Python tracker <https://bugs.python.o

[issue44835] What does "Python for Windows will still be Python for DOS" mean?

2021-08-04 Thread Eric V. Smith
New submission from Eric V. Smith : Since this is not a bug in Python, this is not the appropriate place to ask. I suggest you try the python-list mailing list https://mail.python.org/mailman/listinfo/python-list And I don't know what it means. I've never heard of that say

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: @krey: What's your suggested change? We can change neither the parameter order nor parameter names without breaking code, so that won't happen. You created this as a documentation issue. Do you have a suggested documentation change? -

[issue44837] os.symlink arg names are bad

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: There's really no way we'd consider breaking possibly millions of working programs to change the parameter names. I guess you could come up with some way of supporting both sets of parameter names, but I doubt we'd accept that, either.

[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: pathlib is not designed to support URIs, so this behavior is not surprising. You want to use a different library, maybe urllib. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue44

[issue44842] String conversion of Path removes '/' from original url

2021-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: But that's a perfectly valid filename: $ mkdir -p adl://myblob.azuredatalakestore.net/local/abc/xyz $ ls -R adl: 'adl:': myblob.azuredatalakestore.net/ 'adl:/myblob.azuredatalakestore.net': local/ 'adl:/myblob.azuredatala

[issue41779] add BLOB photo to sqlite3 python

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

[issue44870] email.message_from_bytes not working on BytesIO() object

2021-08-09 Thread Eric V. Smith
Eric V. Smith added the comment: Use filecontent.getvalue(): https://docs.python.org/3/library/io.html#io.BytesIO.getvalue -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracke

[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Eric V. Smith
Eric V. Smith added the comment: Rather than have us wading through all of the output, can you summarize the problem? After a brief look I don't see any actual compiler errors. In make.out_3.9, at least, it looks like "generate-posix-vars failed", but I can't see why. Wh

[issue44877] Python > 3.7 build fails with IBM XL compiler

2021-08-10 Thread Eric V. Smith
Eric V. Smith added the comment: > P.S. The tarball I attached before contains the configure and make output for > tests on multiple python version branches. I differentiated them by adding a > version identifier suffix (_3.7, _3.8, _3.9, _3.10, _3.11) I was referring to the two fi

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