[issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left

2020-11-10 Thread Eric V. Smith
Eric V. Smith added the comment: I think having two ways to do the same thing in a module targeted toward beginners would be too confusing. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue42

[issue42269] Add ability to set __slots__ in dataclasses

2020-11-10 Thread Eric V. Smith
Eric V. Smith added the comment: It would figure it out automatically. See https://github.com/ericvsmith/dataclasses/blob/master/dataclass_tools.py for a decorator that already does this. I'll have a PR ready soon, I hope. -- ___ Python tr

[issue42344] SimpleNamespace: update documentation regarding comparison

2020-11-13 Thread Eric V. Smith
Eric V. Smith added the comment: If the implementation compares the classes, then I think the "roughly equivalent" version should, too. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.o

[issue42344] SimpleNamespace: update documentation regarding comparison

2020-11-13 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset bbeb2d266d6fc1ca9778726d0397d9d6f7a946e3 by Jürgen Gmach in branch 'master': bpo-42344: Improve pseudo implementation for SimpleNamespace (GH-23264) https://github.com/python/cpython/commit/bbeb2d266d6fc1ca9778726d0397d9

[issue42344] SimpleNamespace: update documentation regarding comparison

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

[issue42344] SimpleNamespace: update documentation regarding comparison

2020-11-13 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset cb2b2035ca752529755440990c4073d5164e80df by Miss Islington (bot) in branch '3.8': bpo-42344: Improve pseudo implementation for SimpleNamespace (GH-23264) (GH-23269) https://github.com/python/cpyt

[issue42344] SimpleNamespace: update documentation regarding comparison

2020-11-13 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 4defeb007195d2d17ea404b0b6291d1d233010f4 by Miss Islington (bot) in branch '3.9': bpo-42344: Improve pseudo implementation for SimpleNamespace (GH-23264) (GH-23270) https://github.com/python/cpyt

[issue42356] Dict inline manipulations

2020-11-14 Thread Eric V. Smith
Eric V. Smith added the comment: I think you should bring this up on the python-ideas mailing list if you'd like to see it discussed. It will likely also require a PEP, similar to PEP 584. -- nosy: +eric.smith ___ Python tracker &

[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Eric V. Smith
Eric V. Smith added the comment: I'm changing from "crash" to "behavior". We use "crash" for a segfault or equivalent. I realize that most people are unlikely to know this, but we consider "crash" to be more alarming, so I want to make sure

[issue42379] Optional List Args Persist Across Objects

2020-11-16 Thread Eric V. Smith
Eric V. Smith added the comment: This is defined behavior in the language, so it's not a bug. The "pythonic" way to deal with this is usually: def funct(self, array = None): if array is None: array = [] -- components: +Interpreter Core -ctypes no

[issue40998] Compiler warnings in ubsan builds

2020-11-18 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.snow ___ Python tracker <https://bugs.python.org/issue40998> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40998] Compiler warnings in ubsan builds

2020-11-18 Thread Eric V. Smith
Eric V. Smith added the comment: Too many Eric S's! -- ___ Python tracker <https://bugs.python.org/issue40998> ___ ___ Python-bugs-list mailing list

[issue42414] unable to document fields of dataclass

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

[issue42414] unable to document fields of dataclass

2020-11-20 Thread Eric V. Smith
Eric V. Smith added the comment: How would you expect to extract this docstring? I'm not sure how this would work in practice, since both of these are errors: >>> class A: ...def __init__(self): ...self.x = 3 ...self.x.__doc__ = 'foo' ... >&g

[issue42414] unable to document fields of dataclass

2020-11-20 Thread Eric V. Smith
Eric V. Smith added the comment: @property has a place to attach the docstring, dataclasses in general do not. I wouldn't want to add a descriptor just to have the ability to add a docstring. There are performance issues involved, and I'm sure some corner cases where functiona

[issue28002] ast.unparse can't roundtrip some f-strings

2020-11-20 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: not a bug -> fixed ___ Python tracker <https://bugs.python.org/issue28002> ___ ___ Python-bugs-list mailing list Un

[issue42422] Py_Decref on value crash the interpreter in Python/ceval.c:1104

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

[issue42429] Behavior of general (%g, :g) formatting inconsistent for decimal.Decimal

2020-11-21 Thread Eric V. Smith
Eric V. Smith added the comment: A few things: - There is no %-formatting for Decimal types. They're being converted to float first. That's why it appears that %-formatting with 'g' works the same for decimal and float: you're really just calling the float version

[issue42436] Google use wrong "hightlight" argument

2020-11-22 Thread Eric V. Smith
Eric V. Smith added the comment: This seems to be a question for Google. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue42436> ___ ___

[issue42432] Http client, Bad Status Line triggered for no reason

2020-11-22 Thread Eric V. Smith
Eric V. Smith added the comment: requests is a third-party library, and this isn't the right place to report issues with it. It looks like the requests issue tracker is at https://github.com/psf/requests/issues If you can duplicate this problem with only using the python standard li

[issue42432] Http client, Bad Status Line triggered for no reason

2020-11-22 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the reproducer and the research! https://tools.ietf.org/html/rfc2616#section-3.1 says the result header is "HTTP", and doesn't say anything else is acceptable. I'd be interested in what other frameworks (probably in other lang

[issue42422] Py_Decref on value crash the interpreter in Python/ceval.c:1104

2020-11-23 Thread Eric V. Smith
Eric V. Smith added the comment: @BTaskaya: do you think this is too similar to bogus_code_obj.py? That's the only crasher I can see it being similar to. -- versions: +Python 3.10 -Python 3.6, Python 3.7 ___ Python tracker &

[issue42436] Google use wrong "hightlight" argument

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

[issue42449] Adding number to a declared 2 dimension list

2020-11-23 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't a bug. All of your nested lists are the same. See for example: https://stackoverflow.com/questions/44195396/initializing-an-m-x-n-array-of-0s-in-python -- components: -Regular Expressions nosy: +eric.smith resolution: -> not a b

[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-23 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think the readability of the examples would be improved by triple quotes. In fact, I think it would be reduced. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/is

[issue36159] Modify Formatter Class to handle arbitrary objects

2020-11-24 Thread Eric V. Smith
Eric V. Smith added the comment: I just stumbled across this. I don't think the idea is totally without merit, although maybe it's too niche to warrant being in the stdlib. It should probably be discussed on python-ideas first. -- versions: +Python 3.10 -Python 2.7,

[issue42462] Unacceptable Output

2020-11-25 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42462> ___ ___

[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-25 Thread Eric V. Smith
Eric V. Smith added the comment: Although I do have to say it wouldn't offend me if the partition and nth_combination examples were changed to double quotes to be consistent! But it's not important. -- ___ Python tracker <https://bu

[issue42478] ipaddress.IPv4network.interfaces()

2020-11-26 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure what you mean by iterating over the interfaces in a subnet. Could you give an example? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/is

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-14 Thread Eric V. Smith
Eric V. Smith added the comment: I agree it's not the best error message. What's happening is that these types (list, tuple, etc.) do not implement __format__, so object.__format__ is used. It returns str(self). Then the resulting string is formatted with the given format_spec.

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-16 Thread Eric V. Smith
Eric V. Smith added the comment: Changing to a documentation issue. -- assignee: eric.smith -> docs@python components: +Documentation -Interpreter Core keywords: +easy nosy: +docs@python versions: +Python 2.7 ___ Python tracker &l

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-17 Thread Eric V. Smith
Eric V. Smith added the comment: What is the expected output, and why? I think the error message might be incorrect, possibly it should be "invalid format specifier". -- nosy: +eric.smith ___ Python tracker <http://bugs.python.o

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-18 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure what you're saying here. Is it that 'xx' should be ignored? The documentation says that 'xx' isn't fill and alignment, not that they don't exist. If they're not fill and

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-18 Thread Eric V. Smith
Eric V. Smith added the comment: The only error is the text of the ValueError. I'll look into fixing that. These characters will not be ignored. -- ___ Python tracker <http://bugs.python.org/is

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Eric V. Smith
Eric V. Smith added the comment: Changing to 3.3: I don't think applying this to 3.2 would be appropriate. -- assignee: -> eric.smith keywords: +easy priority: normal -> low stage: -> needs patch title: In str.format an incorrect alignment option doesn't make fi

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Eric V. Smith
Eric V. Smith added the comment: As I look at it a little closer, I think I'm going to change the message to: "Invalid format type specified". The code has determined that instead of a type that's a single character long, it's received "xx10d". That&#

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Eric V. Smith
Eric V. Smith added the comment: The existing exceptions use the text "format code" for what the documentation calls "type": >>> format(9, "h") Traceback (most recent call last): File "", line 1, in ValueError: Unknown format code 

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-20 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think "{}" is the correct way to document this. These all have an empty format specifier: "{}".format(foo) "{:}".format(foo) "{0}".format(foo) "{0:}".format(foo) "{name}".format(

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-21 Thread Eric V. Smith
Eric V. Smith added the comment: While looking at object.__format__, I recall that we've already addressed this, sort of. For a different reason, this is already deprecated in 3.3 and will become an error in 3.4. See issues 9856 and 7994. $ ./python -Wd Python 3.3.0a0 (default:40e1be1

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-21 Thread Eric V. Smith
Eric V. Smith added the comment: The error message will be: "non-empty format string passed to object.__format__". I agree with your comment about Terry's patch. -- ___ Python tracker <http://bugs.pyt

[issue13838] In str.format "{0:#.5g}" for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread Eric V. Smith
Eric V. Smith added the comment: See issue #7098 for a discussion. I propose to close this issue. -- nosy: +eric.smith, mark, skrah ___ Python tracker <http://bugs.python.org/issue13

[issue13838] In str.format "{0:#.5g}" for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +mark.dickinson -mark ___ Python tracker <http://bugs.python.org/issue13838> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13838] In str.format "{0:#.5g}" for decimal.Decimal doesn't print trailing zeros

2012-01-23 Thread Eric V. Smith
Changes by Eric V. Smith : -- resolution: -> duplicate status: open -> closed superseder: -> Add alternate float formatting styles to new-style formatting. ___ Python tracker <http://bugs.python.or

[issue13889] str(float) and round(float) issues with FPU precision

2012-01-27 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith, mark.dickinson ___ Python tracker <http://bugs.python.org/issue13889> ___ ___ Python-bugs-list mailing list Unsub

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-27 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue13882> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13922] argparse handling multiple "--" in args improperly

2012-02-02 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +bethard, eric.smith ___ Python tracker <http://bugs.python.org/issue13922> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13927] Extra spaces in the output of time.ctime

2012-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: That's definitely the expected behavior. It's the same as the C library version of ctime(). But I couldn't find it documented in the Python docs, so I'm changing this to a documentation issue. Thanks for the report. -- assig

[issue13971] format() doesn't parse str.

2012-02-08 Thread Eric V. Smith
Eric V. Smith added the comment: This is working as defined in PEP 3101: it calls PySequence_GetItem() or PyObject_GetItem() on the value inside the brackets. There is indeed no item in d that is the string "0" (including the quotes). -- assignee: -> eric.smi

[issue14019] Unify tests for str.format and string.Formatter

2012-02-15 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue14019> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14057] Speedup sysconfig startup

2012-02-19 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue14057> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14123] Doc change re old and new string formatting

2012-02-25 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue14123> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14145] string.rfind() returns AttributeError: 'list' object has no attribute 'rfind'

2012-02-28 Thread Eric V. Smith
Eric V. Smith added the comment: I can't reproduce this. Can you please post the entire traceback? It would be preferable if you could also show the exact code that's causing the problem, typed from a python command prompt (see my example below). I can reproduce the error if I pass

[issue14145] string.rfind() returns AttributeError: 'list' object has no attribute 'rfind'

2012-02-28 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. Feel free to re-open it if you can give a small example showing the problem. -- resolution: -> invalid status: open -> closed type: crash -> behavior ___ Python

[issue14233] argparse: "append" action fails to override default values

2012-03-08 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think it's worth checking that you've passed in the correct type for the default parameter. That's not something that Python code typically does. The error you get: AttributeError: 'tuple' object has no attribute 'a

[issue14243] NamedTemporaryFile usability request

2012-03-09 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue14243> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2377] Replace __import__ w/ importlib.__import__

2012-03-11 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue2377> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14256] test_logging fails if zlib is not present

2012-03-11 Thread Eric V. Smith
New submission from Eric V. Smith : Presumably this needs to use requires_zlib. $ time ./python -m test test_logging [1/1] test_logging test test_logging crashed -- Traceback (most recent call last): File "/home/eric/local/python/cpython/Lib/test/regrtest.py", line 1229, in run

[issue14259] re.finditer() doesn't accept keyword arguments

2012-03-11 Thread Eric V. Smith
Changes by Eric V. Smith : -- title: regex.finditer() doesn't accept keyword arguments -> re.finditer() doesn't accept keyword arguments ___ Python tracker <http://bugs.pytho

[issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it

2012-03-11 Thread Eric V. Smith
Changes by Eric V. Smith : -- title: regex.groupindex available for modification and continues to work, having incorrect data inside it -> re.groupindex available for modification and continues to work, having incorrect data inside it ___ Pyt

[issue14256] test_logging fails if zlib is not present

2012-03-11 Thread Eric V. Smith
Changes by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <http://bugs.python.org/issue14256> ___ ___ Python-bugs-list mailing list Unsubscri

[issue14256] test_logging fails if zlib is not present

2012-03-11 Thread Eric V. Smith
Changes by Eric V. Smith : -- stage: -> patch review type: -> behavior ___ Python tracker <http://bugs.python.org/issue14256> ___ ___ Python-bugs-list

[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-03-15 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue14331> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14339] Optimizing bin, oct and hex

2012-03-16 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue14339> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13922] argparse handling multiple "--" in args improperly

2012-03-18 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with David. It's a bug. I have programs (not using argparse yet) that do exactly what he describes. -- ___ Python tracker <http://bugs.python.org/is

[issue13922] argparse handling multiple "--" in args improperly

2012-03-18 Thread Eric V. Smith
Eric V. Smith added the comment: No. parse_known_args assumes you have known and unknown args intermixed. Going back to the original example, what if "hack" and ":target" had overlapping parameter names (say, they both supported "--arg1")? I think pars

[issue14425] Improve handling of 'timeout' parameter default in urllib.urlopen

2012-03-27 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue14425> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14441] Add new date/time directives to strftime()

2012-03-29 Thread Eric V. Smith
Eric V. Smith added the comment: Can we change this to a documentation bug? I was unaware of the use of '-', and I think most other people are, too. Although having just checked, it doesn't work under Windows :(. So maybe we shouldn't document it. Thinking out loud: I

[issue14441] Add new date/time directives to strftime()

2012-03-29 Thread Eric V. Smith
Eric V. Smith added the comment: Heh. You're correct about 3173. And I'm even nosy on that issue! -- ___ Python tracker <http://bugs.python.o

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-03-31 Thread Eric V. Smith
Eric V. Smith added the comment: While I still think raising those errors is a good thing, we should also look at Nick's shell-command: http://shell-command.readthedocs.org/en/latest/index.html -- ___ Python tracker <http://bugs.py

[issue14514] Equivalent to tempfile.NamedTemporaryFile that deletes file at context exit

2012-04-05 Thread Eric V. Smith
Eric V. Smith added the comment: See also issue 14243. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue14514> ___ ___ Python-bugs-list mailin

[issue14542] reverse() doesn't reverse sort correctly

2012-04-10 Thread Eric V. Smith
Eric V. Smith added the comment: list.reverse() does not reverse a list, it reverses its current values. >>> help([].reverse) Help on built-in function reverse: reverse(...) L.reverse() -- reverse *IN PLACE* >>> -- nosy: +eric.smith resolution: -> invalid

[issue14542] reverse() doesn't reverse sort correctly

2012-04-11 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Mark. Indeed, my answer as written is meaningless. I meant it doesn't sort in reverse, it just reverses. -- ___ Python tracker <http://bugs.python.org/is

[issue36691] SystemExit & sys.exit : Allow both exit status and message

2019-05-18 Thread Eric V. Smith
Eric V. Smith added the comment: You could add a flag in the exception to tell the default handler where to write the message. It would default to stderr. This would make it possible to catch the exception before it was written out, and customize the behavior. -- nosy: +eric.smith

[issue36962] Cant sort ModuleInfo instances

2019-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: Unfortunately your change isn't backward compatible with the existing (namedtuple) version. I expect this to fail in the dataclass version: >>> finder, name, ispkg = list(pkgutil.iter_modules(None))[0] And since this is an enhancement, it can

[issue36962] Cant sort ModuleInfo instances

2019-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure all of this churn is worth it for an unusual use case that can be satisfied by: >>> sorted(pkgutil.iter_modules(None), key=lambda x: (x[1], x[2]) or even: >>> sorted(pkgutil.iter_modules(None), key=operator.itemgetter(1)

[issue36962] Cant sort ModuleInfo instances

2019-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: I agree. Sorry, BTaskaya, but I just don't think the benefit of this change is worth the disruption. -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python t

[issue36978] `python3 -m pip install` has no `--requirement` option on Windows

2019-05-20 Thread Eric V. Smith
Eric V. Smith added the comment: Please show us what command you are running when you try to specify --requirement, and what the result is. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue36

[issue36978] `python3 -m pip install` has no `--requirement` option on Windows

2019-05-21 Thread Eric V. Smith
Change by Eric V. Smith : -- stage: -> test needed status: open -> pending type: -> behavior ___ Python tracker <https://bugs.python.org/issue36978> ___ ___

[issue37003] ast unparse does not support f-string new debug format.

2019-05-21 Thread Eric V. Smith
Eric V. Smith added the comment: I don’t think this is worth changing. I’m planning on removing the expr_text field before beta 1. At which point I don’t think there will be any work to do here. See https://mail.python.org/pipermail/python-dev/2019-May/157493.html Also, can you explain

[issue37003] ast unparse does not support f-string new debug format.

2019-05-21 Thread Eric V. Smith
Eric V. Smith added the comment: Never mind on the failing code. I see your test cases now. -- ___ Python tracker <https://bugs.python.org/issue37003> ___ ___

[issue37003] ast unparse does not support f-string new debug format.

2019-05-22 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the recap, Matthias. Once I remove expr_text (hopefully this weekend!), we should still at least add tests to make sure nothing fails, even with the ast-expanded version of the = f-strings

[issue37050] Remove expr_text from ast node FormattedValue

2019-05-25 Thread Eric V. Smith
New submission from Eric V. Smith : I added the expr_text optional field to the FormattedValue node in order to implement the '=' feature of f-strings (see issue 36817). However, the expr_text field isn't strictly needed. Instead, the same feature could be added with another

[issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code.

2019-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: Line 41 is indented 4 spaces past line 38, but should not be. You'd be better served by first asking questions like this on the python-list mailing list. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: ope

[issue37065] File and lineno is not reported for syntax error in f-string

2019-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: I'm pretty sure there's already an issue for this, but I don't have time to search for it now. This is not an easy problem to solve. I've been working on it on and off for almost a year. I'll eventually get to it, but the ch

[issue37050] Remove expr_text from ast node FormattedValue

2019-05-27 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +13504 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13597 ___ Python tracker <https://bugs.python.org/issu

[issue37068] Emit SyntaxWarning for f-strings without expressions ?

2019-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: I think this would be better suited for a linter. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue37

[issue37050] Remove expr_text from ast node FormattedValue

2019-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 6f6ff8a56518a80da406aad6ac8364c046cc7f18 by Eric V. Smith in branch 'master': bpo-37050: Remove expr_text from FormattedValue ast node, use Constant node instead (GH-13597) https://github.com/python/cpyt

[issue37050] Remove expr_text from ast node FormattedValue

2019-05-27 Thread Eric V. Smith
Change by Eric V. Smith : -- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.pyt

[issue37070] Clean up f-string debug handling, including potential memory leaks

2019-05-27 Thread Eric V. Smith
New submission from Eric V. Smith : This addresses a few issues Serhiy found in the review for issue 37050 at https://github.com/python/cpython/pull/13597. Patch to follow. -- assignee: eric.smith components: Interpreter Core messages: 343722 nosy: eric.smith, serhiy.storchaka

[issue37070] Clean up f-string debug handling, including potential memory leaks

2019-05-27 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +13513 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13607 ___ Python tracker <https://bugs.python.org/issu

[issue37003] ast unparse does not support f-string new debug format.

2019-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: mbussonn: can you re-check this in light of the changes for issue37050? I'm not sure if there's still a problem that needs fixing or not. -- ___ Python tracker <https://bugs.python.o

[issue37070] Clean up f-string debug handling, including potential memory leaks

2019-05-29 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset f83d1dbd3bfbde940117c85f5c70de00e47b7e6e by Eric V. Smith in branch 'master': bpo-37070: Cleanup fstring debug handling (GH-13607) https://github.com/python/cpython/commit/f83d1dbd3bfbde940117c85f5c70de

[issue37070] Clean up f-string debug handling, including potential memory leaks

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

[issue37086] time.sleep error message misleading

2019-05-29 Thread Eric V. Smith
Eric V. Smith added the comment: I think it's reasonable to change the TypeError to say integer or float. That's what _PyTime_FromObject is looking for. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.o

[issue37103] Undo deprecation of optparse

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

[issue37106] python re.escape doesn't escape some special characters.

2019-05-31 Thread Eric V. Smith
Eric V. Smith added the comment: Could you show a problem caused by the characters that are unescaped? I assume you're talking about the ` and ' characters, since that's what your example shows. But those aren't listed as "special characters" (https://docs.

[issue37106] python re.escape doesn't escape some special characters.

2019-05-31 Thread Eric V. Smith
Eric V. Smith added the comment: re.escape() is designed to only escape characters that have special meaning in regular expressions. It is not a general purpose escaping mechanism, and it is especially dangerous to use it for building SQL statements. You should be using parameterized SQL

[issue37113] 'ß'.upper() should return 'ẞ'

2019-05-31 Thread Eric V. Smith
Eric V. Smith added the comment: See http://unicode.org/faq/casemap_charprop.html, search for "Why does ß (U+00DF LATIN SMALL LETTER SHARP S) not uppercase to U+1E9E LATIN CAPITAL LETTER SHARP S by default?" -- nosy: +eric.smith ___ Pyth

[issue33569] dataclasses InitVar does not maintain any type info

2019-06-02 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 01ee12ba35a333e8a6a25c4153c4a21838e9585c by Eric V. Smith (Augusto Hack) in branch 'master': bpo-33569 Preserve type information with dataclasses.InitVar (GH-8927) https://github.com/python/cpython/commit/01ee12ba35a333e8a6a25c4153c4a2

[issue33569] dataclasses InitVar does not maintain any type info

2019-06-02 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the PR! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python

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