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

2021-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a dupe of issue 27307. -- ___ Python tracker <https://bugs.python.org/issue44496> ___ ___ Python-bugs-list m

[issue45698] Error on importing getopt

2021-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this, since I don't think it's a bug in python, but rather in the user's setup. -- resolution: -> works for me stage: -> resolved status: open -> closed type: crash -> behavior __

[issue45704] string.Formatter.parse does not handle auto-numbered positional fields

2021-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: For reference, the documentation is at https://docs.python.org/3/library/string.html#custom-string-formatting I guess in your example it should return: [('hello ', '0', '', None)] -- nosy: +eric.smith

[issue45704] string.Formatter.parse does not handle auto-numbered positional fields

2021-11-03 Thread Eric V. Smith
Eric V. Smith added the comment: > Side note: It's a somewhat weird that `.get_field` expects a string while > `.get_value` expects an int for positional arguments. .parse is just concerned with parsing, so it works on and returns strings. .get_field takes strings because it i

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-04 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Mark. Also, if we're going to change the C implementation, the Python implementation should agree with it. -- ___ Python tracker <https://bugs.python.org/is

[issue45716] Confusing parsing error message when trying to use True as keyword argument

2021-11-04 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Parser nosy: +lys.nikolaou, pablogsal ___ Python tracker <https://bugs.python.org/issue45716> ___ ___ Python-bugs-list m

[issue45704] string.Formatter.parse does not handle auto-numbered positional fields

2021-11-04 Thread Eric V. Smith
Eric V. Smith added the comment: The more I think about this, the more I think it's not .parse's job to fill in the field numbers, it's the job of whoever is calling it. Just as it's not .parse's job to give you an error if you switch back and forth between number

[issue45724] Segmentation fault

2021-11-05 Thread Eric V. Smith
Eric V. Smith added the comment: I assume this is a problem with the third party library, not with Python itself. If so, you'll have to contact the authors of OneForAll. But if you can create a small program that demonstrates the problem, maybe someone here could take a look at it. As

[issue45704] string.Formatter.parse does not handle auto-numbered positional fields

2021-11-05 Thread Eric V. Smith
Eric V. Smith added the comment: I think your code is rational. But since string.Formatter gets such little use, I'm not sure it's worth adding this to the stdlib. On the other hand, it could be used internal to string.Formatter. We'd need to pick a better name, though. And

[issue45704] string.Formatter.parse does not handle auto-numbered positional fields

2021-11-05 Thread Eric V. Smith
Eric V. Smith added the comment: That is, return field_name as an int if it's an int, otherwise as a string. -- ___ Python tracker <https://bugs.python.org/is

[issue45730] ERROR: PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl is not a supported wheel on this platform

2021-11-05 Thread Eric V. Smith
Eric V. Smith added the comment: This is really a question for pip, which is a third party product (despite a version of it shipping with core python). You can find their issue tracker at https://pip.pypa.io/en/stable/ When reporting the bug there, you'll need to provide information

[issue45736] 2to3 does not support integer division fixing

2021-11-06 Thread Eric V. Smith
Eric V. Smith added the comment: I think knowing that that's integer division is beyond what 2to3 can accomplish. Plus, with lib2to3 being deprecated, I don't think anyone's going to put any effort into this. -- nosy: +eric.smith ___

[issue45739] The Python implementation of Decimal does not support the "N" format

2021-11-07 Thread Eric V. Smith
Eric V. Smith added the comment: I don’t think “N” should be supported. It was never the intention to have it work. -- ___ Python tracker <https://bugs.python.org/issue45

[issue45741] entry points singular?

2021-11-07 Thread Eric V. Smith
Eric V. Smith added the comment: I think “provide” would be better. -- keywords: +easy nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue45

[issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal

2021-11-07 Thread Eric V. Smith
Eric V. Smith added the comment: I think your option 2 makes the most sense. -- ___ Python tracker <https://bugs.python.org/issue45708> ___ ___ Python-bug

[issue45746] ftplib please revisit retrlines('RETR as it produces files without newlines

2021-11-07 Thread Eric V. Smith
Eric V. Smith added the comment: Please tell us: - What the file contains, and what you're expecting it to contain. - What system are you running on? crap2.txt (the source file) is a single line, so I'm not sure what you're expecting to happen. -- no

[issue45741] entry points singular?

2021-11-07 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 77afb76942ea7067d74d9c07fb4da6f5f23ad2f5 by Miss Islington (bot) in branch '3.10': bpo-45741: docs: fix plural (GH-29461) (GH-29463) https://github.com/python/cpython/commit/77afb76942ea7067d74d9c07fb4da6

[issue45741] entry points singular?

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

[issue45777] Issue in reading files with a path longer than 256 letters after latest update

2021-11-10 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <https://bugs.python.org/issue45

[issue45803] make_dataclass is missing the documented kw_only argument

2021-11-13 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith components: +Library (Lib) -ctypes nosy: +eric.smith versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issu

[issue45799] Fix confusing wording in Doc/library/__main__.rst

2021-11-13 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for your contribution! -- nosy: +eric.smith resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45650] cgitb does not emit CGI headers when format='text'

2021-11-14 Thread Eric V. Smith
Eric V. Smith added the comment: I would think the use case for 'text' is to not print the output to a web page, so you wouldn't want the headers. The documentation says that cgitb was generalized to not only produce output for web pages. The 'text' format pro

[issue45650] cgitb does not emit CGI headers when format='text'

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

[issue45824] CSV module document does not include how to append files

2021-11-17 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue45824> ___ ___ Python-bugs-list m

[issue45832] Misleading membersip expression documentation

2021-11-17 Thread Eric V. Smith
Eric V. Smith added the comment: I don’t think repeating the hash invariant in multiple places adds anything, I think it would just add clutter. I also think the existing docs are easier to understand than the version with the hashing containers split out. -- nosy: +eric.smith

[issue45839] python3 executable is able to install pandas

2021-11-18 Thread Eric V. Smith
Eric V. Smith added the comment: Please provide information about the system you’re running on. Also, tell us how Python was installed. I assume the title should be “… is unable to install …”. -- nosy: +eric.smith ___ Python tracker <ht

[issue45803] make_dataclass is missing the documented kw_only argument

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

[issue45803] make_dataclass is missing the documented kw_only argument

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

[issue45803] make_dataclass is missing the documented kw_only argument

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

[issue45857] PEP 604 Union syntax does not support forward references

2021-11-21 Thread Eric V. Smith
Eric V. Smith added the comment: Presumably the correct way to do this is: def __init__(self, tmp: "Foo|int"): That is, the entire type hint is a string. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.o

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

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

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

2021-11-21 Thread Eric V. Smith
Change by Eric V. Smith : -- versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue44649> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45865] Old syntax in unittest

2021-11-22 Thread Eric V. Smith
Eric V. Smith added the comment: As a general rule, we don't accept large patches with changes like this. The chance for breakage somewhere in the 27 files is too high. I could see maybe dropping inheriting from object, since that's relatively safe. -- nosy: +

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

2021-11-22 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset d3062f672c92855b7e9e962ad4bf1a67abd4589b by Eric V. Smith in branch 'main': bpo-44649: Fix dataclasses(slots=True) with a field with a default, but init=False (GH-29692) https://github.com/python/cpyt

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

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

[issue45879] Access violation

2021-11-23 Thread Eric V. Smith
Eric V. Smith added the comment: Please provide the code you used to trigger this error, so that we can reproduce it. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue45

[issue45892] Improve REPL with the underscore separators for int/float

2021-11-24 Thread Eric V. Smith
Eric V. Smith added the comment: We can't change the repr of int/float. However, you can use sys.displayhook to achieve what you want: import sys def displayhook(o): if o is None: return __builtins__._ = None if isinstance(o, (int, float)): print(for

[issue45892] Improve REPL with the underscore separators for int/float

2021-11-24 Thread Eric V. Smith
Eric V. Smith added the comment: Oops, the float example should be: >>> 123123.9 123_123.9 -- ___ Python tracker <https://bugs.python.org/issue45892> ___ ___

[issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6

2021-11-24 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 8cabcde8d66bfd8abc98b862c93c66946f8514a1 by Miss Islington (bot) in branch '3.10': bpo-45693: Document `port` parameter to `loop.create_server` (GH-29760) (GH-29762) https://github.com/python/cpyt

[issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6

2021-11-24 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 151c9bf649a049f52df388a8f2390988949abf59 by Miss Islington (bot) in branch '3.9': bpo-45693: Document `port` parameter to `loop.create_server` (GH-29760) (GH-29763) https://github.com/python/cpyt

[issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6

2021-11-24 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the PR, @jcristharif. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6

2021-11-24 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 3.11 -Python 3.8 ___ Python tracker <https://bugs.python.org/issu

[issue45892] Improve REPL with the underscore separators for int/float

2021-11-24 Thread Eric V. Smith
Eric V. Smith added the comment: And you can probably use sitecustomize.py to import this. Since I don't see any action item here, I'm going to close this issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue45897] Frozen dataclasses with slots raise TypeError

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

[issue45897] Frozen dataclasses with slots raise TypeError

2021-11-24 Thread Eric V. Smith
Change by Eric V. Smith : -- versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue45897> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45897] Frozen dataclasses with slots raise TypeError

2021-11-25 Thread Eric V. Smith
Eric V. Smith added the comment: I think the error should be AttributeError, which is what you'd get if the class weren't frozen. -- ___ Python tracker <https://bugs.python.o

[issue45902] Bytes and bytesarrays can be sorted with a much faster count sort.

2021-11-26 Thread Eric V. Smith
Eric V. Smith added the comment: Given that the normal sort() machinery wouldn't use this code, I don't think there's any advantage to adding .sort() methods to bytes and bytesarray. The downside to adding these methods is the increased complexity in the stdlib. I think the

[issue45911] SystemError occured while running an extention

2021-11-28 Thread Eric V. Smith
Eric V. Smith added the comment: At first glance, it looks like: if(!(PyArg_ParseTuple(args,"s",s))) return NULL; should be: if(!(PyArg_ParseTuple(args,"s",&s))) return NULL; The docs say: "A pointer to an existing string is stored in the character pointer va

[issue45739] The Python implementation of Decimal does not support the "N" format

2021-11-28 Thread Eric V. Smith
Eric V. Smith added the comment: I'd support -1. -- ___ Python tracker <https://bugs.python.org/issue45739> ___ ___ Python-bugs-list mailing list Unsubscr

[issue45739] The Python implementation of Decimal does not support the "N" format

2021-11-28 Thread Eric V. Smith
Eric V. Smith added the comment: While I'd prefer -1 overall, I would also prefer 3 over 2. If we were adding the feature from scratch, we wouldn't have decimal differ from int, float, and complex. And I'm not in favor of an uppercase converter, no matter what we do h

[issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields

2021-11-28 Thread Eric V. Smith
Eric V. Smith added the comment: I think it's find to address both of these here. -- components: +Documentation -Library (Lib) versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.py

[issue45912] [argparse] Print texts starting with capital letters and finish with dot for more formality

2021-11-29 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with @iritkatriel. Also, such a change to argparse would be too disruptive. So, I'm going to close this. -- components: +Library (Lib) -Parser nosy: +eric.smith resolution: -> wont fix stage: -> resolved status: open -&g

[issue45930] Lambda function bug

2021-11-29 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python

[issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields

2021-11-29 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, @andrei.avk! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python

[issue45931] Directory.Build.props/targets leaks from folders above the repo

2021-11-29 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <https://bugs.python.org/issue45

[issue45524] Cross-module dataclass inheritance breaks get_type_hints

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

[issue44674] dataclasses should allow frozendict default value

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

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2021-11-30 Thread Eric V. Smith
Eric V. Smith added the comment: I'm closing this as "won't fix" for the negative indexing functionality. If someone wants to open an new documentation issue (and ideally provide a PR), that would be welcome. -- resolution: -> wont fix stage: needs patch -

[issue45946] RecursionError when annotating a field with the same name as a field

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

[issue45889] pathlib: Path.match does not work on paths

2021-12-01 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Éric and Ronald. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue45889> ___ ___ Python-bug

[issue45956] Add scanf regular expressions to re

2021-12-01 Thread Eric V. Smith
Eric V. Smith added the comment: Maxwell: thank you for your contribution. I agree that these don’t belong in the re module. I think a personal library or something on PyPI (logically equivalent to more-itertools) would be more appropriate. I suggest closing this as rejected

[issue45966] Error in Multiplication

2021-12-02 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't a bug, it's a function of the IEEE-754 double precision floating point type that python uses. See: https://docs.python.org/3/tutorial/floatingpoint.html You might want to consider the decimal module, although that will also have l

[issue45972] typing.NamedTuple with default arguments without type annotations is falsy

2021-12-03 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think we'd want to prohibit zero-length namedtuples (or NamedTuples). I've used them, especially when I'm dynamically creating them. This is just a side effect of how Python works. I don't think there's anything to do he

[issue45980] Why there isn't a “Python 2.2” for PyPI's classifiers?

2021-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: What's the use case for this? Can wheels even be installed in 2.2? I think it's safe to assume the classifiers are not present because they're outdated. I think https://github.com/pypa/pypi-support/issues would be the best place to report t

[issue45981] Get raw file name in bytes from ZipFile

2021-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: You would also need to decide what to do with these lines, just before the os.sep test: # Terminate the file name at the first null byte. Null bytes in file # names are used as tricks by viruses in archives. null_byte = filename.find

[issue45982] Bug in Error messages

2021-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: Syntactically, this could be many possible errors: missing comma, missing period, missing parens, missing brackets, etc. A human can figure it out based on semantics, but based purely on syntax, I think this error message is good enough

[issue45984] Error messages for invalid string prefixes and potential attribute accesses

2021-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: Since the two reported problems are unrelated, this should be two bug reports. The first one does seem like a duplicate, as Pablo mentions. I haven’t checked to see if the second one already has an issue. -- nosy: +eric.smith

[issue45981] Get raw file name in bytes from ZipFile

2021-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: UTF-16 uses null bytes. I'm sure there are other encodings that do, too. But I don't know if these encodings are permitted or common in zip files. -- ___ Python tracker <https://bugs.python.o

[issue45989] Add new function or method to return the dict key with the maximum value

2021-12-05 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that we don't need a special function for this, so I'm going to close this. -- nosy: +eric.smith resolution: -> rejected stage: -> resolved status: open -> closed ___ Pyt

[issue45994] Add simple usage to email module

2021-12-06 Thread Eric V. Smith
New submission from Eric V. Smith : What sort of usage example would help you? Is https://docs.python.org/3/library/email.examples.html lacking something? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue45

[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-12-06 Thread Eric V. Smith
Eric V. Smith added the comment: That's interesting. I see the same behavior. So this seems to be a problem on www.lahey.com. I'll see if I can report it to them. -- ___ Python tracker <https://bugs.python.o

[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-12-06 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: works for me -> stage: resolved -> status: closed -> open ___ Python tracker <https://bugs.python.or

[issue46003] os.replace is not cross-platform: at least improve documentation

2021-12-06 Thread Eric V. Smith
Eric V. Smith added the comment: I suspect anti-virus software. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue46003> ___ ___ Python-bug

[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-12-06 Thread Eric V. Smith
Eric V. Smith added the comment: I notified lahey.com, and it looks like the behavior is now normal (at least, it looks okay by testing with the curl commands). Could someone who say this problem in a browser please double-check? -- ___ Python

[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-12-07 Thread Eric V. Smith
Eric V. Smith added the comment: @Akuli: thanks for checking. And thanks so much for the awesome debugging with curl: that was the key to solving the problem. I didn't hear back from lahey.com what the problem was, but I'd sure be curious to know! -- resolution: ->

[issue45995] string formatting: normalize negative zero

2021-12-07 Thread Eric V. Smith
Eric V. Smith added the comment: %-formatting already doesn't support some formats that float.__format__ does, for example ','. So I agree we shouldn't modify %-formatting. I don't have much of an opinion on whether changing __forma

[issue45995] string formatting: normalize negative zero

2021-12-07 Thread Eric V. Smith
Eric V. Smith added the comment: PyOS_double_to_string is part of the stable ABI. I don't recall if we're allowed to add new bitfield flags to a stable ABI function. We'd use a new Py_DTSF_NORMALIZE_NEGATIVE_0 flag for this feature. I suspect we can't add a flag,

[issue46003] os.replace is not cross-platform: at least improve documentation

2021-12-07 Thread Eric V. Smith
Eric V. Smith added the comment: As they say, there's no such thing as "portable software", only "software that has been ported". Especially in an area like file I/O: once you move beyond simple "one process opens, writes, and closes; and another process

[issue46003] os.replace is not cross-platform: at least improve documentation

2021-12-08 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue46003> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue39694] Incorrect dictionary unpacking when calling str.format

2021-12-08 Thread Eric V. Smith
Eric V. Smith added the comment: I concur with Raymond. -- ___ Python tracker <https://bugs.python.org/issue39694> ___ ___ Python-bugs-list mailing list Unsub

[issue46024] Different behaviour with zipfile

2021-12-09 Thread Eric V. Smith
Eric V. Smith added the comment: What does "path" (the input to ZipPath) look like? Please change your print statement to: print(repr(path), ZipPath(path).name) Then send us the output from each version of python. -- nosy: +eric.smith

[issue38752] __init__ taking out of context variables

2019-11-08 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't a bug, it's how the language works. You're not forced to use the parameters to a function (in this case __init__), and you can reference any variable, including a global. -- components: -asyncio no

[issue38752] __init__ taking out of context variables

2019-11-08 Thread Eric V. Smith
Eric V. Smith added the comment: Also: you're statement that bar was initialized to "some value" isn't true: you didn't use attr1 in your __init__ method, so "some value" was never used. If you're confused, I suggest you ask on the python-list or tut

[issue38740] Line count mismatch between open() vs sys.stdin api calls

2019-11-09 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue38740> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38758] @dataclass defaults

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

[issue38758] @dataclass defaults

2019-11-13 Thread Eric V. Smith
Eric V. Smith added the comment: The problem is that what you wrote isn't what most people want. Here's your example without dataclasses. I've added an "append_to_x" method, which does the obvious thing: >>> class C: ... def __init__(self, x=[]): .

[issue38758] @dataclass defaults

2019-11-13 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure what you're proposing. -- ___ Python tracker <https://bugs.python.org/issue38758> ___ ___ Python-bugs-l

[issue38670] can we accept os.PathLike objects within the subprocess args= list?

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

[issue38831] urllib.request header characters being changed to lowercase

2019-11-17 Thread Eric V. Smith
Eric V. Smith added the comment: Well, the standard says they're case insensitive: https://tools.ietf.org/html/rfc7230#section-3.2 Forcing the case on the header item seems quite deliberate: https://github.com/python/cpython/blob/master/Lib/urllib/request.py#L399 I assume tha

[issue38831] urllib.request header characters being changed to lowercase

2019-11-17 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, this does seem to be a duplicate. I'll close this. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

[issue38889] Segmentation fault when using EPF Importer

2019-11-21 Thread Eric V. Smith
Eric V. Smith added the comment: I agree this doesn't look like a python bug. However, if the original poster can reproduce it with a short example with no third party code, we could take another look. If so, please re-open this issue. And just because the code worked on a different ve

[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2019-11-24 Thread Eric V. Smith
Eric V. Smith added the comment: Your failing test case with 3.7 works for me. If you don't use activate.bat, but just run the venv's python directly, what do you see? I get: >py -m venv fooenv >fooenv\Scripts\python -V Python 3.7.0 >fooenv\Scripts\python -q &g

[issue38947] dataclass defaults behave inconsistently for init=True/init=False when default is a descriptor

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

[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that although the PEP says that's how it behaves, that shouldn't be prescriptive of the error message. Clearly we can be more helpful here. I have a large, elaborate re-write of the error generating code that I've been working on, on a

[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith stage: resolved -> ___ Python tracker <https://bugs.python.org/issue38964> ___ ___ Python-bugs-list

[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, moving f-strings to the grammar would be a huge change, and not just for CPython. I discussed it at the last PyCon with the authors of various editors (for syntax highlighting) and other tools that parse python code. No one was hugely opposed to it

[issue38984] Value add to the wrong key in a dictionary

2019-12-05 Thread Eric V. Smith
Eric V. Smith added the comment: This is almost certainly not a bug in Python. The bug tracker isn't for giving help with your code. I suggest you ask on the python-list mailing list https://mail.python.org/mailman/listinfo/python-list If you still think this is a bug in Python, you s

[issue38996] introduction of default values for collection.namedtuple

2019-12-08 Thread Eric V. Smith
Eric V. Smith added the comment: Is there something that your module can do that typing.NamedTuple can't do? This won't be added to 2.7: 3.9 would be the first possible version to add a feature to. -- assignee: -> rhettinger nosy: +eric.smith, rhettinger versions:

[issue38996] introduction of default values for collection.namedtuple

2019-12-08 Thread Eric V. Smith
Eric V. Smith added the comment: Agreed on closing this issue. -- ___ Python tracker <https://bugs.python.org/issue38996> ___ ___ Python-bugs-list mailin

[issue38998] dict.setdefault (setdefault of dictionary)

2019-12-08 Thread Eric V. Smith
Eric V. Smith added the comment: Right. If you want the value only calculated once, then just call it once. You might be interested in collections.defaultdict, which takes a factory function, and only calls it as needed. -- nosy: +eric.smith resolution: -> not a bug st

<    3   4   5   6   7   8   9   10   11   12   >