[issue35761] Allow dataclasses to be updated in place

2019-06-02 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to reject this. There's nothing special about dataclasses that would require a feature like this. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Pyt

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-05 Thread Eric V. Smith
Eric V. Smith added the comment: Possibly a use for positional-only parameters. Backward compatibility is the question, of course. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall

2019-06-06 Thread Eric V. Smith
Eric V. Smith added the comment: As ztane says, the issue isn't the -1, it's the type of the cast. This looks like a legitimate issue to me. -- nosy: +eric.smith resolution: not a bug -> stage: resolved -> patch review status

[issue37182] ast - handling new line inside a string

2019-06-06 Thread Eric V. Smith
Eric V. Smith added the comment: There was a recent discussion about this on the bug tracker, but of course now I can't find it. But for an earlier discussion, see issue 25885. The decision was that your expectation that the nodes be distinguishable isn't a design goal of the as

[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`

2019-06-06 Thread Eric V. Smith
Eric V. Smith added the comment: I think Popen() is just about as complex as anyone wants it to be. Is there something about .run() or .check_call() that keeps you from using them? -- nosy: +eric.smith versions: +Python 3.9 ___ Python tracker

[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`

2019-06-06 Thread Eric V. Smith
Eric V. Smith added the comment: I figured as much (but didn't want to lead the witness!). I'm not completely opposed to this. I think the best thing to do is to bring up the proposal on python-ideas, and point here. -- ___ Python track

[issue37227] Wrong parse long argument

2019-06-11 Thread Eric V. Smith
Eric V. Smith added the comment: And what is your expected result, and why? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue37227> ___ ___

[issue37227] Wrong parse long argument

2019-06-11 Thread Eric V. Smith
Eric V. Smith added the comment: Although note that with allow_abbrev=False, -l will conflict with --long, which I'm not sure is a great design. I'm closing this as not a bug, since it works as documented and there's a workaround (albeit not in 2.7, which is closed

[issue37240] Filename http.py breaks calls to urllib

2019-06-11 Thread Eric V. Smith
Eric V. Smith added the comment: Closing as not a bug. This is how python works: you do not want to name a file the same as any standard library module. Use a file name other than http.py. -- components: +Library (Lib) -Windows nosy: +eric.smith -paul.moore, steve.dower, tim.golden

[issue37241] Item Count Error in Shelf

2019-06-11 Thread Eric V. Smith
Eric V. Smith added the comment: Please do not post images: we can't copy and paste from them, and they're unfriendly to visually impaired users. Can you create code that reproduces this? A small example, with no external dependencies would be best. Please attach the reproducer

[issue37241] Item Count Error in Shelf

2019-06-12 Thread Eric V. Smith
Eric V. Smith added the comment: This still isn't an example we can copy and paste to reproduce, so I'm going to be unable to help you. Sorry. Again: please don't post images, for the reasons I previously stated. -- ___ Python

[issue37241] Item Count Error in Shelf

2019-06-12 Thread Eric V. Smith
Eric V. Smith added the comment: After fixing a missing import (import urllib.request), this is what I get: $ /usr/local/bin/python3.6 pbr37241_Jesse_Bacon.py Fetching nvdcve-1.0-2019.json.gz Storing Gzipped File Loading JSON Content 4275 records 4275 unique records Creating Shelve: cve_2019

[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2019-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Since ++i already has a meaning, it won't become a syntax error without an extremely good reason, and I don't think this case meets that standard. But as Steven says, if you want to pursue it, you should start with a discussion on py

[issue37341] str.format and f-string divergence

2019-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: > str.format, string.Formatter, and the _string module can only > parse literal keys, not expressions, despite appearing to take the > same syntax as f-strings. I'm happy to contribute code to change > this, but unsure if it's considered

[issue37341] str.format and f-string divergence

2019-06-20 Thread Eric V. Smith
Eric V. Smith added the comment: I've fixed the bpo number in Misc/NEWS.d/3.8.0b1.rst. Thanks for reporting that. -- ___ Python tracker <https://bugs.python.org/is

[issue37409] relative import_from without parent

2019-06-26 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +brett.cannon, eric.smith ___ Python tracker <https://bugs.python.org/issue37409> ___ ___ Python-bugs-list mailing list Unsub

[issue37422] Documentation on the change of __path__ in Python 3

2019-06-26 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide a short runnable example that used to work and now does not? And please show any error messages you're seeing. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/is

[issue37423] 2to3 wraps a already bracketed print statement with another brackets

2019-06-26 Thread Eric V. Smith
Eric V. Smith added the comment: 2to3 is designed to convert python2 code to python3. It is not designed to work on python3 code. I believe this behavior is correct. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue37

[issue37423] 2to3 wraps a already bracketed print statement with another brackets

2019-06-26 Thread Eric V. Smith
Eric V. Smith added the comment: You might also want to look at python-modernize or similar tools. -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python

[issue37422] Documentation on the change of __path__ in Python 3

2019-06-27 Thread Eric V. Smith
Eric V. Smith added the comment: It's a _NamespacePath in 3.7 because there's no __init__.py in the top-level "google" directory, and that makes it a namespace package. I'm not exactly sure why it works in 2.7, frankly. Looking some more: it's because they&#x

[issue37422] Documentation on the change of __path__ in Python 3

2019-06-27 Thread Eric V. Smith
Eric V. Smith added the comment: And I see you're not asking for changed behavior, just documentation. But I think it is documented that this is how namespace packages work. -- ___ Python tracker <https://bugs.python.org/is

[issue37357] mbox From line wrongly detected

2019-06-29 Thread Eric V. Smith
Change by Eric V. Smith : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37357> ___ ___ Python-bugs-list

[issue37458] ast: Different FormattedValue expressions have same col_offset information

2019-07-01 Thread Eric V. Smith
Eric V. Smith added the comment: I'm working on overhauling how these are calculated. But it's complex, and is taking a while. -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker <https://bugs.pytho

[issue37479] IntEnum f-string behavior can't be overridden

2019-07-01 Thread Eric V. Smith
Eric V. Smith added the comment: Note that this isn't really related to f-strings, except that they use the __format__ protocol, as does str.__format__. >>> format(myIntEnum.x) '1' -- nosy: +eric.smith ___ Python tracker

[issue37485] dataclass __foo__ methods inheritance is not working

2019-07-02 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with xtreak that this works as designed and isn't a bug. -- assignee: -> eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <htt

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread Eric V. Smith
Eric V. Smith added the comment: RFC 1034 defines absolute domain names as ending with dot: When a user needs to type a domain name, the length of each label is omitted and the labels are separated by dots ("."). Since a complete domain name ends with the root l

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread Eric V. Smith
Eric V. Smith added the comment: Counterpoint: I just sent an email to "info@info.", and Thunderbird and my MTA (postfix) and my mail relay all accepted it. I guess it's possible that a TLD (especially one of the newer ones) could accept email addresses in the TLD itself. It

[issue37501] Test failures when CPython is built without docstrings

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

[issue37501] Test failures when CPython is built without docstrings

2019-07-05 Thread Eric V. Smith
Eric V. Smith added the comment: Also surprised by the marked dataclasses tests. I don't see anything there that requires docstrings. See my review on the PR. -- ___ Python tracker <https://bugs.python.org/is

[issue37510] argparse removing more "--" than it should

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

[issue37512] Error in the documentation about string concatenation

2019-07-05 Thread Eric V. Smith
Eric V. Smith added the comment: It's my understanding that this is a quality of implementation issue, and that in other (non-CPython) implementations, the run time for repeated concatenation may indeed be quadratic. The optimization in CPython relies on knowing the reference count is

[issue37568] Misleading UnBoundLocalError on assignment to closure variable

2019-07-12 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the great explanation, Steven. And I agree with Josh that changing the exception text would lead to blindly adding nonlocal or global in a superficial attempt to get the code to work. The much more likely problem is already mentioned: reference

[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread Eric V. Smith
Eric V. Smith added the comment: '\.' is an invalid escape sequence. Could you try it with a raw string? Also, it's not really clear to me what you're seeing, vs. what you expect to see. For one example that you think is incorrect, could you show what you get vs. what yo

[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread Eric V. Smith
Eric V. Smith added the comment: Sorry. '\.' will be invalid in the future. I got ahead of myself. $ python3 -Werror -q >>> '\.' File "", line 1 SyntaxError: invalid escape sequence \. Not that it would have affected your issue, so I apologize f

[issue37519] Three inconsistent module attributes

2019-07-15 Thread Eric V. Smith
Eric V. Smith added the comment: While some of these might be inconsistent (I haven't really looked at it thoroughly yet), I think it might be problematic to change them at this point, since there's no doubt code out there that depends on the curren

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-18 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> rhettinger nosy: +eric.smith, rhettinger ___ Python tracker <https://bugs.python.org/issue37623> ___ ___ Python-

[issue37625] Class variable is still accessible after class instance has been overwritten out

2019-07-18 Thread Eric V. Smith
Eric V. Smith added the comment: Because variable belongs to the class, and not any instance of the class, you can duplicate this behavior without creating any instances at all: >>> class TestClass(object): ... variable = [] ... >>> TestClass.variable.append(1) >>

[issue37625] Class variable is still accessible after class instance has been overwritten out

2019-07-18 Thread Eric V. Smith
Eric V. Smith added the comment: Also, you might want to search for "python class and instance variables". This one looks decent, although I didn't read it exhaustively: https://howchoo.com/g/nzy0mthhyzl/understanding-class-vs-instance-variab

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-19 Thread Eric V. Smith
Eric V. Smith added the comment: I think using a dataclass here would be easier, since you can control class variables. Is there some reason that your loader must be a namedtuple? Something like: from typing import ClassVar from dataclasses import dataclass @dataclass class MyLoader

[issue37643] Except clause

2019-07-21 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, this should be discussed on python-ideas first, so I'm closing it here. But to be honest with you, there's really no chance this would get accepted. It's just too easy to do it with existing list comprehension syntax, which is much more

[issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings

2019-07-24 Thread Eric V. Smith
Eric V. Smith added the comment: I've put some more thought in to this, and this is the best I can come up with, using today's Python. The basic idea is that you have a function _f(), which takes a normal (non-f) string. It does a lookup to find the translated string (again, a n

[issue37753] 2to3 not handing "<="

2019-08-03 Thread Eric V. Smith
Eric V. Smith added the comment: 2to3 is not designed to turn every valid python2 program into a valid python3 program. You'll have to provide a way to compare GameClock objects. I suggest you look at http://python3porting.com. You should read the whole site, it's a grea

[issue37782] typing.NamedTuple default parameter type issue

2019-08-07 Thread Eric V. Smith
Eric V. Smith added the comment: example_text is not a field, since you're not giving it a type. It's just a normal class member. The only field in the NamedTuple is example_int. You can't specify any other field in the call to MyTestedTuple(). To see this, help(MyTestedTup

[issue37783] int returns error (SystemError)

2019-08-07 Thread Eric V. Smith
Eric V. Smith added the comment: This looks like a problem in pandas. If you can distill this down to a short python program that doesn't include any third party libraries, then we can take a look at it. Otherwise, I suggest reporting it on the pandas bug tracker. -- compo

[issue37793] argparse uses "container object", should be "iterable"

2019-08-08 Thread Eric V. Smith
New submission from Eric V. Smith : https://docs.python.org/3/library/argparse.html#choices says "These can be handled by passing a container object as the choices keyword argument to add_argument()". I think this should be "iterable" instead. Internally, argparse rea

[issue37793] argparse uses "container object", should be "iterable"

2019-08-08 Thread Eric V. Smith
Eric V. Smith added the comment: shireenrao: yes, please! As they say, PR's accepted! I'll warn you that I think the only way this could become newcomer-unfriendly is if there are objections that "iterable" is too much jargon for the argparse documentation. But I

[issue37793] argparse uses "container object", should be "iterable"

2019-08-08 Thread Eric V. Smith
Eric V. Smith added the comment: Actually, I might have mislead you on this. I now think that plain iterators won't work. I'm still researching this, I'll get back to you on it. I apologize if it turns out I wasted your time. -- ___

[issue37793] argparse uses "container object", should be "iterable"

2019-08-08 Thread Eric V. Smith
Eric V. Smith added the comment: Sorry, shireenrao, but I'm closing this. It's entirely my error: I misread the source where it was converting this to a list. The requirement is really that it be something you can iterate over multiple times, and supports "in". I guess &

[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Interpreter Core type: -> crash ___ Python tracker <https://bugs.python.org/issue37830> ___ ___ Python-bugs-list mai

[issue37830] continue in finally with return in try results with segfault

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

[issue30664] Change unittest's _SubTest to not sort its params

2017-06-14 Thread Eric V. Smith
New submission from Eric V. Smith: Now that **kwargs are sorted, it would be better if the error given by a unittest subTest (as implemented in uniitest._case._SubTest) didn't sort the parameters when they're printed, but instead printed them out in order. This might be complica

[issue30664] Change unittest's _SubTest to not sort its params when printing test failures

2017-06-14 Thread Eric V. Smith
Eric V. Smith added the comment: Correction: it's implemented in unittest.case._SubTest, specifically in _subDescription(). -- title: Change unittest's _SubTest to not sort its params -> Change unittest's _SubTest to not sort its params when prin

[issue30664] Change unittest's _SubTest to not sort its params when printing test failures

2017-06-14 Thread Eric V. Smith
Eric V. Smith added the comment: Good question. It looks like ChainMap does something I wouldn't expect: >>> for k, v in ChainMap({'a': 0, 'b': 1, 'c': 2}, {'b': 3, 'a': 4}).items(): ... print(k, v) ... b 1 a 0 c 2 Once we def

[issue30664] Change unittest's _SubTest to not sort its params when printing test failures

2017-06-14 Thread Eric V. Smith
Eric V. Smith added the comment: Correct on the order changed with regular dicts. That's why I'm targeting this specifically for Python 3.7 and with **kwargs, where order is guaranteed. We might have to use a structure other than a ChainMap of dicts, like a ChainMap of

[issue30529] Incorrect error messages for invalid whitespaces in f-string subexpressions

2017-06-15 Thread Eric V. Smith
Changes by Eric V. Smith : -- pull_requests: +2277 ___ Python tracker <http://bugs.python.org/issue30529> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30682] f-string assert is too restrictive

2017-06-16 Thread Eric V. Smith
New submission from Eric V. Smith: >>> eval("f'\\\n'") python: Python/ast.c:4906: FstringParser_ConcatFstring: Assertion `!state->last_str || PyUnicode_GET_LENGTH(state->last_str) != 0' failed. [2]12810 abort (core dumped) ./python The problem is t

[issue30682] f-string assert is too restrictive

2017-06-16 Thread Eric V. Smith
Changes by Eric V. Smith : -- pull_requests: +2285 ___ Python tracker <http://bugs.python.org/issue30682> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30682] f-string assert is too restrictive

2017-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 2eca5b465f7404cc8484457b7966f828f434ec20 by ericvsmith (Serhiy Storchaka) in branch '3.6': [3.6] bpo-30682: Removed a too-strict assertion that failed for certain f-strings. (GH-2232) (#2242) https://github.com/python/cpyt

[issue30682] f-string assert is too restrictive

2017-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Terry: The eval is important. The bug was in evaluating an f-string that consisted of two bytes: a backslash followed by a newline. And just as: eval("'\\\n'") == '' # len == 0 so should eval("f'\\\n'") == &#x

[issue30793] Parsing error on f-string-expressions containing strings with backslash

2017-06-28 Thread Eric V. Smith
Eric V. Smith added the comment: The reason that this was done was to give us flexibility in deciding how the backslashes should be interpreted in the future. I announced it on python-dev here: https://mail.python.org/pipermail/python-dev/2016-August/145979.html. That message contains a link

[issue30906] os.path.join misjoins paths

2017-07-12 Thread Eric V. Smith
Eric V. Smith added the comment: We absolutely cannot change this to give an error if the second or subsequent parameters is absolute. I have code that reads user-named config files. If the path is relative, it's relative to a config directory, but it's allowed to be

[issue30978] str.format_map() silences exceptions in __getitem__

2017-07-20 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue30978> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30978] str.format_map() silences exceptions in __getitem__

2017-07-21 Thread Eric V. Smith
Eric V. Smith added the comment: I'm -0 on a backport. The new behavior is more correct, but I don't like changing the exception type in a micro release. -- ___ Python tracker <http://bugs.python.o

[issue31136] raw strings cannot end with a backslash character r'\'

2017-08-07 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue31136> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31140] Insufficient error message with incorrect formated string literal

2017-08-08 Thread Eric V. Smith
Eric V. Smith added the comment: On 3.6.1 on Windows, I get: % python3 bpo-31140.py File "", line 1 (a>2s) ^ SyntaxError: invalid syntax Which is far from ideal, but at least points to (a portion of) the correct text. I won't have access to a copy of 3.6.2

[issue31140] Insufficient error message with incorrect formated string literal

2017-08-08 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks. There was some work on this recently: I'll try and check 3.7 later today. -- ___ Python tracker <http://bugs.python.org/is

[issue31232] Backport the new custom "print >> sys.stderr" error message?

2017-08-18 Thread Eric V. Smith
Eric V. Smith added the comment: I'm in favor of backporting to 3.6. It's not an intrusive change and is helpful in porting 2.x scripts. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.o

[issue31280] Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages

2017-08-25 Thread Eric V. Smith
Eric V. Smith added the comment: Jim: did you forget to attach the z.py script? -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue31

[issue31280] Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages

2017-08-25 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a function of the .pth file causing 'zc' to be in sys.modules. If I delete the .pth file, the first import of zc.m succeeds. Note that if the .pth file is in place, then: % bin/python3 Python 3.6.1 (default, Mar 24 2017, 12:50:34)

[issue31280] Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages

2017-08-26 Thread Eric V. Smith
Eric V. Smith added the comment: No problem. If you open a pypa issue, can you post a link here? Thanks. -- resolution: -> not a bug type: -> behavior ___ Python tracker <http://bugs.python.org/i

[issue31281] fileinput inplace does not work with pathlib.Path

2017-09-04 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 06de1aeff94e524bed21d188065c4cd1590fb046 by ericvsmith (Zhiming Wang) in branch 'master': bpo-31281: Fix pathlib.Path incompatibility in fileinput (gh-3208) https://github.com/python/cpython/commit/06de1aeff94e524bed21d188065c4c

[issue31281] fileinput inplace does not work with pathlib.Path

2017-09-04 Thread Eric V. Smith
Eric V. Smith added the comment: I did not backport this to 3.6, because it depends on other changes that themselves have not been backported. -- assignee: -> eric.smith resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.4

[issue31140] Insufficient error message with incorrect formated string literal

2017-09-04 Thread Eric V. Smith
Changes by Eric V. Smith : -- stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue31140> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue31140] Insufficient error message with incorrect formated string literal

2017-09-04 Thread Eric V. Smith
Changes by Eric V. Smith : -- versions: +Python 3.7 ___ Python tracker <http://bugs.python.org/issue31140> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30465] FormattedValue expressions have wrong lineno and col_offset information

2017-09-05 Thread Eric V. Smith
Eric V. Smith added the comment: See also issue 31140: I'm not sure if that case is covered by this issue. -- ___ Python tracker <http://bugs.python.org/is

[issue30793] Parsing error on f-string-expressions containing strings with backslash

2017-09-06 Thread Eric V. Smith
Eric V. Smith added the comment: I'm thinking that instead of supporting backslashes in general inside expressions, I'll just special case strings. So: f"{'\n' if foo else ''}" would be okay, but not: f"{a\ }" I think that would address the r

[issue30465] FormattedValue expressions have wrong lineno and col_offset information

2017-09-06 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset e7c566caf177afe43b57f0b2723e723d880368e8 by ericvsmith (Ɓukasz Langa) in branch 'master': bpo-30465: Fix lineno and col_offset in fstring AST nodes (#1800) https://github.com/python/cpython/commit/e7c566caf177afe43b57f0b2723e72

[issue30465] FormattedValue expressions have wrong lineno and col_offset information

2017-09-06 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset aa1afc72c1ee1f090e6302198d9a0295f1ce1c05 by ericvsmith (Miss Islington (bot)) in branch '3.6': bpo-30465: Fix lineno and col_offset in fstring AST nodes (GH-1800) (gh-3409) https://github.com/python/cpyt

[issue30793] Parsing error on f-string-expressions containing strings with backslash

2017-09-07 Thread Eric V. Smith
Eric V. Smith added the comment: That code is an error in Python 3.6: >>> f"{eval('bool(0)\ ... and True\ ... ')}" File "", line 3 SyntaxError: f-string expression part cannot include a backslash >>> I'm not sure it's a good idea th

[issue35271] venv creates pyvenv.cfg with wrong home

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

[issue35358] avoid '-' in importlib.import_module and builtins.__import__

2018-11-30 Thread Eric V. Smith
Eric V. Smith added the comment: I dynamically load a lot of modules whose names contain hyphens, or are otherwise non-identifiers (like 3rdparty.py). The suggested change would break a lot of working code. The only thing I can see being possible is to add a warning that no one would

[issue35393] Typo in documentation

2018-12-03 Thread Eric V. Smith
Eric V. Smith added the comment: Can you be more specific? There's not enough information here to take any action. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/is

[issue35421] Expected result is not clear in case of list.append(list)

2018-12-05 Thread Eric V. Smith
Eric V. Smith added the comment: The ... denotes a recursive data structure, which is what you've created here by "a" including itself as an element. I'm not clear what you expected to see, but I'm going to close this because I don't see an actual problem here.

[issue35432] str.format and string.Formatter bug with French (and other) locale

2018-12-06 Thread Eric V. Smith
Eric V. Smith added the comment: Possibly related to issue 33954? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue35432> ___ ___ Python-bug

[issue9334] argparse: add a full fledged parser as a subparser

2018-12-12 Thread Eric V. Smith
Eric V. Smith added the comment: Why the title change? The original problem still exists, and I don't see how it's related to subparsers. -- ___ Python tracker <https://bugs.python.

[issue35494] Inaccurate error message for f-string

2018-12-14 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue35494> ___ ___ Python-bugs-list mai

[issue35494] Inaccurate error message for f-string

2018-12-14 Thread Eric V. Smith
Eric V. Smith added the comment: Go ahead, Serhiy. Thanks! -- assignee: eric.smith -> serhiy.storchaka ___ Python tracker <https://bugs.python.org/issu

[issue35540] dataclasses.asdict breaks with defaultdict fields

2018-12-19 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue35540> ___ ___ Python-bugs-list mai

[issue35546] String formatting produces incorrect result with left-aligned zero-padded format

2018-12-20 Thread Eric V. Smith
Eric V. Smith added the comment: I think this falls in to the consenting adults category. You can also do things like: >>> format(42, '->3') '-42' But why bother preventing this? It is unfortunate that %-formatting and .__format__() are different in t

[issue8538] Add FlagAction to argparse

2018-12-27 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, this is the correct bug tracker. And note that this code isn't mine, I just posted it here so it wouldn't be lost. It looks like the original message was from https://mail.python.org/pipermail/python-dev/2010-April/0

[issue35594] Python script generating Segmentation Fault

2018-12-28 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the report, but that example is so large and complicated that it's difficult for someone not familiar with it to understand what's going on. If you could simplify it down to the smallest example that duplicates the problem, then perhap

[issue35617] unittest discover does not work with implicit namespaces

2018-12-30 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue35617> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35626] Python dictreader KeyError issue

2018-12-31 Thread Eric V. Smith
Eric V. Smith added the comment: Steven is correct: your problem is that in the first example you're reading the header row before you pass the file to DictReader, so the DictReader cannot know what your columns are named. (Actually, your code uses the second row of your file as the c

[issue35638] Introduce fixed point locale awear format type for floating point numbers

2019-01-02 Thread Eric V. Smith
Eric V. Smith added the comment: Since this is a new feature, it can only be added to 3.8. Adjusting versions accordingly. I suggest that if we add this at all, it only be added to __format__, not to %-formatting. Any suggestions on a specification for this? -- components

[issue35638] Introduce fixed point locale awear format type for floating point numbers

2019-01-02 Thread Eric V. Smith
Eric V. Smith added the comment: Before a patch is created, we should discuss the behavior that will be implemented and agree on it. What is your suggestion? -- ___ Python tracker <https://bugs.python.org/issue35

[issue35638] Introduce fixed point locale awear format type for floating point numbers

2019-01-02 Thread Eric V. Smith
Eric V. Smith added the comment: Of course, feel free to create a PR. But the correct place to discuss any new behavior is on the issue tracker, or maybe on python-ideas, not in a PR. -- ___ Python tracker <https://bugs.python.org/issue35

[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-01-02 Thread Eric V. Smith
Eric V. Smith added the comment: I haven't looked at this closely yet, but you'll need to at least: - add tests that the locale-aware formatting is happening - support decimal - make sure it works with complex (which it probably does, but needs a test) And, I think we'll n

[issue35646] python -v writes to stderr

2019-01-02 Thread Eric V. Smith
Eric V. Smith added the comment: -v writes to stderr, so this is the expected behavior. Although maybe this could be better documented. See issue 18338, where this was briefly discussed and a change was rejected. Maybe you're looking for -V (uppercase) or --version, which do write to s

[issue35646] python -v writes to stderr

2019-01-03 Thread Eric V. Smith
Eric V. Smith added the comment: That's just the way it is with 2.7. -- ___ Python tracker <https://bugs.python.org/issue35646> ___ ___ Python-bugs-list m

[issue35673] Loader for namespace packages

2019-01-07 Thread Eric V. Smith
Eric V. Smith added the comment: Namespace packages (PEP 420) predate ModuleSpec (PEP 451). So, I think this probably happened when 451 was implemented. Maybe Eric Snow recalls? I say this without having looked at it very deeply. As to why the namespace package loader is a private class: it

<    10   11   12   13   14   15   16   17   18   19   >