[issue30597] Show expected input in custom "print" error message

2017-06-08 Thread Eric V. Smith
Eric V. Smith added the comment: That sounds good to me. Just to elaborate on my earlier message, since it might have been too terse: I think it would be misleading to give in error at: print >>sys.stderr, "message" and say: Did you mean 'print("message")'? si

[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 define what we'd like the output to look like, I'm sure

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

[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 printing test failu

[issue30682] f-string assert is too restrictive

2017-06-16 Thread Eric V. Smith
Changes by Eric V. Smith <e...@trueblade.com>: -- pull_requests: +2285 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30682> ___ _

[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 that some litera

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

2017-06-15 Thread Eric V. Smith
Changes by Eric V. Smith <e...@trueblade.com>: -- pull_requests: +2277 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30529> ___ _

[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/cpython/commit

[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'") == '' # len == 0 It's the second o

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

[issue22385] Define a binary output formatting mini-language for *.hex()

2017-05-01 Thread Eric V. Smith
Eric V. Smith added the comment: The Unix "od" command pretty much has all of the possibilities covered. https://linuxconfig.org/od-1-manual-page Although "named characters" might be going a bit far. Float, too. -- ___

[issue30465] FormattedValue expressions have wrong lineno and col_offset information

2017-10-04 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I think it's fixed. Closing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bu

[issue31684] Scientific formatting of decimal 0 different from float 0

2017-10-04 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- nosy: +eric.smith ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31684> ___ _

[issue31797] Python 3.6.3: JSON loop fails using elif

2017-10-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Hi, Francesco. This isn't the appropriate place to ask for help with your script. I suggest trying the python-list mailing list. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: op

[issue31780] Using format spec ',x' displays incorrect error message

2017-10-14 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I agree there's no need for tests, since we usually don't guarantee such messages going forward. Also, I think skipping the news blurb is reasonable for this change. -- ___ Python tracke

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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 that jupyter accepts c

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

[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 reason why \ was disallowed, bu

[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/cpython/commit

[issue31597] ipaddress.hosts() doesn't return anything on a /32 "network"

2017-09-26 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, due to backward compatibility constraints, the behavior is immutable. You might be able to argue for another method, say all_hosts(), or something. Or maybe even a optional parameter to hosts() that defaults to the existing behavior, but if provided, lets

[issue31597] ipaddress.hosts() doesn't return anything on a /32 "network"

2017-09-26 Thread Eric V. Smith
Eric V. Smith added the comment: You lost me at "some Windows mentality". I come from a networking background. Sorry, I don't care enough about this issue to pursue it. -- ___ Python tracker <rep...@bugs.python.org> <http

[issue31634] Consider installing wheel in ensurepip by default

2017-10-01 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- nosy: +eric.smith ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31634> ___ _

[issue31644] bug in datetime.datetime.timestamp

2017-09-29 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: This is a daylight savings time folding problem. Without a timezone, those are in fact the same point in time, at least in my timezone (US Eastern). If you specify a timezone, you'll see the difference: datetime.datetime(2014,3,9,2,

[issue31614] can't list groupby generator without breaking the sub groups generators

2017-09-28 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Loïc Le Loarer: Note that your use case isn't possible, anyway. There's no way to know the number of groups until the input is exhausted, at which point you've already iterated through all of the data. -- nosy: +eric

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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) [GCC 5.4.0

[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 <rep...@bugs.python.org> <http://bugs.python

[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/06de1aeff94e524bed21d188065c4cd1590fb046

[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 <e...@trueblade.com>: -- stage: -> needs patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31140> ___ _

[issue31140] Insufficient error message with incorrect formated string literal

2017-09-04 Thread Eric V. Smith
Changes by Eric V. Smith <e...@trueblade.com>: -- versions: +Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31140> ___

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Removing versions 3.4 and 3.8. Attaching a reproducing script. Run it with a parameter of the number of arguments to add. The behavior changes between 7 and 8, although I'm not sure either is wrong, just different. This is from W

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-11 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Good point. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31768> ___ _

[issue31749] Request: Human readable byte amounts in the standard library

2017-10-10 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: A library implementing this should definitely go on PyPI first to shake out design issues. Then we'd need a PEP. As someone who has a simplistic version of this code around, and who's done a bit of string formatting, I can assu

[issue31798] `site.abs__file__` fails for modules where `__file__` cannot be modified

2017-10-17 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I don't have clr installed in order to test this. It would be good if you could produce it without us having to install additional software. Could you please copy the entire stack traceback you get when this error occurs? Does this

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-10-17 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: It does seem like overkill for something that's rarely used. I'm -0 on the structseq version. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32135] Dict creation with update will result to NoneType

2017-11-25 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: dict.update() returns None, so this is expected. Maybe you want: >>> x = {"X":123} >>> x.update({"abc":123}) >>> x {'X': 123, 'abc': 123} >>> -- nosy: +eric.smith resolu

[issue32142] heapq.heappop - documentation misleading or doesn't work

2017-11-26 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: The heap invariant is also required in order to even meet the documented behavior of returning the smallest item. >>> import heapq >>> li = [5, 7, 9, 1, 4, 3] >>> heapq.heapify(li) >>> li [1, 4, 3

[issue32142] heapq.heappop - documentation misleading or doesn't work

2017-11-26 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: By "sorted" I meant "sorted by the heap functions so as to maintain their invariants". I don't have any suggestion for the actual specific language to use. -- _

[issue32127] tutorial on dictionaries has error in example

2017-11-24 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: No problem. Welcome to Python! -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32168] Mutable instance variables don't get new references with args.

2017-11-29 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: This is defined behavior. Try searching for "mutable default parameter". For example, here's an old post on it: http://www.effbot.org/zone/default-values.htm This isn't related to class vs. instance attributes, but ra

[issue32127] tutorial on dictionaries has error in example

2017-11-24 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: dict makes no guarantees on ordering, so I think the example is fine. There is no "correct" ordering. -- nosy: +eric.smith ___ Python tracker <rep...@bugs.python.org> &l

[issue32214] Implement PEP 557: Data Classes

2017-12-04 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- keywords: +patch pull_requests: +4616 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32214] Implement PEP 557: Data Classes

2017-12-04 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: PR to follow. Development was at https://github.com/ericvsmith/dataclasses -- assignee: eric.smith components: Library (Lib) messages: 307596 nosy: eric.smith, ned.deily priority: normal severity: normal status: open

[issue32214] Implement PEP 557: Data Classes

2017-12-04 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: New changeset f0db54a0a1823534606ed5ce5a772365ba694c41 by Eric V. Smith in branch 'master': bpo-32214: Implement PEP 557: Data Classes (#4704) https://github.com/python/cpython/commit/f0db54a0a1823534606ed5ce5a772365ba

[issue32214] Implement PEP 557: Data Classes

2017-12-04 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bu

[issue32216] Document PEP 557 Data Classes

2017-12-04 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: The documentation needs to be added. -- assignee: docs@python components: Documentation messages: 307614 nosy: docs@python, eric.smith priority: high severity: normal status: open title: Document PEP 557 Data Classes ve

[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-17 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: The PR looks okay to me. I'm also not sure it's worth the change, though. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32278] Allow dataclasses.make_dataclass() to omit type information

2017-12-18 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I'm going to use "typing.Any" (as a string) if the type information is omitted in the call to make_dataclass(). That way I don't need to import typing. -- ___ Pyt

[issue32376] Unusable syntax error reported when Python keyword in a f-string

2017-12-19 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Yes, this is a real problem. I think there's already an issue for this, but I can't find it. Unfortunately, to fix it requires a bit of refactoring on how line numbers and errors are tracked. It's on my list of things

[issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader

2017-12-13 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- nosy: +eric.smith ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32303> ___ _

[issue32305] Namespace packages have inconsistent __file__ and __spec__.origin

2017-12-13 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- nosy: +eric.smith ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32305> ___ _

[issue31554] Warn when __loader__ != __spec__.loader

2017-12-13 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- nosy: +eric.smith ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31554> ___ _

[issue32297] Few misspellings found in Python source code comments.

2017-12-12 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- nosy: +eric.smith ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32297> ___ _

[issue29051] Improve error reporting involving f-strings (PEP 498)

2017-12-19 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: The example above (msg289501) has been fixed. I think it was in #30465. It also fixes some of these other cases, but I haven't reviewed them all. -- ___ Python tracker <rep...@bugs.p

[issue32022] Python problem - == RESTART: Shell =====

2017-11-14 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Can you reproduce this with a much smaller example? -- nosy: +eric.smith ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32022] Python problem - == RESTART: Shell =====

2017-11-14 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: That's too much code for me to run without analyzing it first. If I have time, I'll look at it. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2017-11-19 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Despite the fact that as of now (or 6+ years ago!) the only way to trigger the malloc() is via VT_LPSTR, I still think the way the free() call is written is bad. What if another type is added? If that were fixed, I still think the

[issue32018] inspect.signature does not respect PEP 8

2017-11-13 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- nosy: +eric.smith ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32018> ___ _

[issue31992] Make iteration over dict_items yield namedtuples

2017-11-09 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I cannot imagine this ever happening, for performance reasons. You should write your own wrapper around items, if you want this behavior. -- nosy: +eric.smith ___ Python tracke

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

2017-11-02 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Guido's suggestion in https://mail.python.org/pipermail/python-dev/2017-October/150055.html is to not change anything. Assuming we do that, it's still an open issue as to if/how we should document and test the current behavio

[issue32191] TypeError does not work when function with type hint

2017-12-01 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- resolution: fixed -> not a bug ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32278] Allow dataclasses.make_dataclass() to omit type information

2017-12-11 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: Make the typing information optional. >From Raymond Hettinger: The make_dataclass() factory function in the dataclasses module currently requires type declarations. It would be nice if the type declarations were optional. Wi

[issue32279] Pass keyword arguments from dataclasses.make_dataclass() to @dataclass.

2017-12-11 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: make_dataclass() should take optional keyword only arguments and pass them to @dataclass() when it uses it after it creates a new class. The parameters are: init=True, repr=True, eq=True, order=False, hash=None, frozen=False Obv

[issue32259] Misleading "not iterable" Error Message when generator return a "simple" type, and a tuple is expected

2017-12-09 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: The error message is correct, but I'm sorry it's confusing. Here's an equivalent error: a, b = 3 You'll get the error "TypeError: 'int' object is not iterable". That's because Python sees 2 items to the left of the assignm

[issue31905] IPv4Networkcontains raises exception on None

2017-10-30 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I agree with David. And since the PR says "not other", then it makes even less sense, since it's checking for any False-y object. I recommend closing this as "not a bug". --

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

2017-10-31 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: How would you distinguish this from the case where an actually missing attribute was given? >>> "{0.ctimex}".format(d) Traceback (most recent call last): File "", line 1, in AttributeError: 'datetim

[issue33495] dataclasses: repr of Field objects should use repr of each member

2018-05-14 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: This is especially true for the "type" member, since it might be a string that looks like a type name (depending on how #33453 is resolved). But repr should be used for all Field members. -- assignee: eric.

[issue33493] dataclasses: allow keyword-only arguments

2018-05-14 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: I've had several requests for keyword-only arguments. This is a placeholder to remind me to work on it. I have not decided if it's a good idea or not. I propose adding a keyword_only argument to field(), defaulting to False. I'm th

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- pull_requests: -6490 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33494> ___

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-14 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Followup from our meeting at the sprints: we're going to go with inspecting the type annotation string and use heuristics to determine if the type is a ClassVar or InitVar. I'll follow up with more specifics on the ap

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- keywords: +patch pull_requests: +6483 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- pull_requests: +6492 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33494> ___ _

[issue33495] dataclasses: repr of Field objects should use repr of each member

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- keywords: +patch pull_requests: +6491 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- pull_requests: -6483 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33494> ___

[issue33502] dataclasses: repr of _DataclassParams objects should use repr of each member

2018-05-14 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: New changeset 3059042410dce69806b94be72d5c8055d616f3a3 by Eric V. Smith in branch 'master': bpo-33502: dataclass._Dataclassparams repr: use repr of each member. (GH-6812) https://github.com/python/cpython/

[issue33502] dataclasses: repr of _DataclassParams objects should use repr of each member

2018-05-14 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: This is mostly a debugging aid, but if you need it, it's very handy. -- assignee: eric.smith components: Library (Lib) messages: 316542 nosy: eric.smith, ned.deily priority: release blocker severity: normal status: open

[issue33495] dataclasses: repr of Field objects should use repr of each member

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- priority: release blocker -> ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33502] dataclasses: repr of _DataclassParams objects should use repr of each member

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- keywords: +patch pull_requests: +6498 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32216] Document PEP 557 Data Classes (dataclasses module)

2018-05-14 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Note that the documentation should make the implications of #33453 very clear. In short, if an annotation "looks like" a ClassVar or InitVar, it will be treated as such. This is true even if it's specified as a string, or i

[issue33495] dataclasses: repr of Field objects should use repr of each member

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bu

[issue33504] configparser should use dict instead of OrderedDict in 3.7+

2018-05-14 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Like #33463, it will require a deprecation cycle. I'm not sure it's worth the hassle, but I wouldn't oppose it if someone wanted to do the work. 3.8 would be the first version where it could be added. -- nosy: +eric.smith ve

[issue33502] dataclasses: repr of _DataclassParams objects should use repr of each member

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https:/

[issue33452] add user notification that parent init will not be called in dataclass init method

2018-05-09 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I'm okay with the concept, but I don't know how to implement it. You need to not only know if a class has a __init__, but also if it's expected to be called. For example, these don't normally get called, but if you inherit fro

[issue33452] add user notification that parent init will not be called in dataclass init method

2018-05-09 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- assignee: -> eric.smith ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33452> ___ _

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-09 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: This is a known issue, but it wasn't being tracked here. So, thanks for opening the issue. https://github.com/ericvsmith/dataclasses/issues/92#issuecomment-382473127 Not to put Łukasz on the spot (he's sitting behind me even as we

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-10 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I see that https://github.com/python/typing/issues/508 is also referenced in https://github.com/python-attrs/attrs/issues/361, where it contributed to attrs using string insp

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-10 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: See also [2]_ for a brief discussion of forward references, which makes get_type_hints() undesirable in this case. > This is why attrs went with the fast way which covers most (but not all) > bases in this case. If th

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-11 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- keywords: +patch, patch pull_requests: +6455, 6456 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-11 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- keywords: +patch pull_requests: +6456 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33474] Support immutability per-field in dataclasses

2018-05-13 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Can you explain your use case for this? Also, how do you envision this working with the existing frozen, hashing, and equality behavior? There are a lot of interactions there, and we'd want to do something that makes sense holist

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-11 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: At this stage in the release cycle, if you really feel strongly about this, you should take it up with Guido directly. -- assignee: -> eric.smith ___ Python tracker <rep...@bug

[issue33471] string format with 'n' failling with french locales

2018-05-12 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: After locale.setlocale(locale.LC_ALL, ''), what does local.localeconv() return? -- nosy: +eric.smith ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-13 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: There have been comments on the PR, but I'd like to focus the higher level issue back here. Specifically, see my comment https://github.com/python/cpython/pull/6768#discussion_r187813919 To summarize: I still think string inspe

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-11 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: We can't break the API at this point in the release cycle. But I am open to what string prefixes we should allow. -- ___ Python tracker <rep...@bugs.python.org> <https://

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-11 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: The more I think about this, the more I think Łukasz is correct that just checking for strings starting with "ClassVar", "typing.ClassVar", or "t.ClassVar" is the correct thing to do. This is the change h

[issue33422] Fix and update string/byte literals in help()

2018-05-04 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: It's not clear to me what you're typing to get the output in the first message. Can you clarify? Is this at the interactive prompt? -- ___ Python tracker <rep...@bugs.python.or

[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-16 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 ___ Python tracker <rep...@bugs.python.org>

[issue33534] dataclasses: unneeded test in _is_classvar

2018-05-16 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: There's an unnecessary test for "if typing" in _is_classvar. I added this function yesterday, and due to some refactoring it picked up some superfluous text. I'm going to remove it. -- assignee: eric.smith com

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