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

2018-05-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: New changeset 98d50cb8f57eb227c373cb94b8680b12ec8aade5 by Eric V. Smith in branch 'master': bpo-32216: Add documentation for dataclasses (GH-6886) https://github.com/python/cpython/commit/98d50cb8f57eb227c373cb94b8680b12ec

[issue33129] Add kwarg-only option to dataclass

2018-05-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I'd forgotten about this issue and created #33493. I'll close it. Copied here is my comment from that issue: I've had several requests for keyword-only arguments. This is a placeholder to remind me to work on it. I have not decided i

[issue33534] dataclasses: unneeded test in _is_classvar

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

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

2018-05-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I've added some initial documentation. Most of it is text from the PEP, cleaned up and sphinx-ized. It no doubt needs a lot of work, but I think it's good enough to close this issue and remove the release blocker. C

[issue33588] Unicode function arguments aren't preserved

2018-05-20 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I think you're seeing identifier normalization. See this SO question for a description of the issue: https://stackoverflow.com/questions/34097193/identifier-normalization-why-is-the-micro-sign-converted-into-the-greek-

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: The behavior used to be that we'd raise an error if you tried to overwrite a dunder method. Then we decided that the existence of a dunder method meant you didn't want it overwritten, so now we don't need to explicitly set a flag to

[issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers

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

[issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers

2018-05-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: New changeset 4e81296b1874829912c687eba4d39361ab51e145 by Eric V. Smith in branch 'master': bpo-33536: Validate make_dataclass() field names. (GH-6906) https://github.com/python/cpython/commit/4e81296b1874829912c687eba4d39361ab

[issue33517] dataclasses: Add the field type to Field repr

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

[issue33517] dataclasses: Add the field type to Field repr

2018-05-15 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:/

[issue33517] dataclasses: Add the field type to Field repr

2018-05-15 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: With the recent (and ongoing) change to string annotations, it's no longer obvious what the type of a field is (normal, ClassVar, or InitVar). I propose exposing the heretofore undocumented _field_type to the repr. Instead of w

[issue33517] dataclasses: Add the field type to Field repr

2018-05-15 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: New changeset 01abc6ec3a61769c55ee86834a432fb97801d28f by Eric V. Smith in branch 'master': bpo-33517: dataclasses: Add the field type to Field repr (GH-6858) https://github.com/python/cpython/commit/01abc6ec3a61769c55ee86834a432fb978

[issue33534] dataclasses: unneeded test in _is_classvar

2018-05-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: New changeset 9285835a05ad0319acef111340266c0f85ed549c by Eric V. Smith in branch 'master': bpo-33534: Remove unneeded test. (GH-6897) https://github.com/python/cpython/commit/9285835a05ad0319acef111340266c0f85

[issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers

2018-05-16 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: I'm going to make this a release blocker, since it's basically a code injection vector, although I know of no way to exploit it. The fix is easy enough. -- nosy: +ned.deily priority: high -> releas

[issue33534] dataclasses: unneeded test in _is_classvar

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 ___ Python tracker <rep...@bugs.python.org> <https:/

[issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers

2018-05-16 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- assignee: eric.smith nosy: eric.smith priority: high severity: normal status: open title: dataclasses.make_dataclass does not validate fields for being valid identifiers type: behavior versions: Python 3.7, Pyth

[issue33536] dataclasses.make_dataclass does not validate fields for being valid identifiers

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 ___ Python tracker <rep...@bugs.python.org> <https:/

[issue33493] dataclasses: allow keyword-only arguments

2018-05-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Duplicate of #33129. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add kwarg-only option to dataclass ___ Python tracker <rep...@bu

[issue33569] dataclasses InitVar does not maintain any type info

2018-05-22 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: This seems like a reasonable request. -- nosy: +eric.smith ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

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

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

[issue33574] Conversion of Number to String(str(number))

2018-05-18 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: The way to avoid this problem is to not assign to str. You should not shadow python builtins that you want to continue using. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> close

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Okay. I'm sure Ned is relieved! -- priority: release blocker -> resolution: -> wont fix stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker &l

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Larry points out that one potential use case is a base class that defines some awesome __init__ that you want to use. Without init=False, there’s no good way to use it. -- ___ Python t

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: The concern is that you've created an awesome base class, and you've written 500 dataclasses that are derived from it, but you want to use the base class's __init__ for all 500. Do you really want to add a __init__ to each of t

[issue33539] Remove `init` flag from @dataclass?

2018-05-16 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I think the concern is: from dataclasses import * class B: def __init__(self, a, b, c): # do something with a, b, c, and maybe use fields(self) to figure out we have a "i" field self.i = a + b + c @data

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

2018-05-15 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: New changeset 2a7bacbd913cf2bf568b3c0f85a758946d3cf4e9 by Eric V. Smith in branch 'master': bpo-33453: Handle string type annotations in dataclasses. (GH-6768) https://github.com/python/cpython/

[issue33815] List a = []*19 doesn't create a list with index length of 19

2018-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: To elaborate on Zach's comment: Notice that your first example repeats 0 19 times. The second example repeats nothing 19 times. If you first example returned a list with [0] repeated 19 (that is: [[0], [0], [0], ..., [0]]), then you're correct the second

[issue33814] exec() maybe has a memory leak

2018-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: It would be helpful if you could show what output you see, and how it differs from what you expect. I think you're just seeing reference cycles or some other delayed garbage collection. If you put in a gc.collect() in your loops to force a collection

[issue33815] List a = []*19 doesn't create a list with index length of 19

2018-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: Agreed with Stefan about this not being appropriate for the bug tracker. And I'm saying that I don't agree with you. There's no bug here. -- ___ Python tracker <https://bugs.python.org/issue33

[issue33844] Writing capital letters with csvwriter.writerow changes the csv file format

2018-06-12 Thread Eric V. Smith
Eric V. Smith added the comment: This is happening because the string "ID" is special to the SYLK format: https://en.wikipedia.org/wiki/SYmbolic_LinK_(SYLK) -- nosy: +eric.smith ___ Python tracker <https://bugs.python.o

[issue33806] Cannot re-open an existing telnet session

2018-06-08 Thread Eric V. Smith
Eric V. Smith added the comment: This sounds like an application-level issue, not a telnetlib problem. As far as I can tell, you're opening a new connection, not reusing an existing connection. -- ___ Python tracker <https://bugs.python.

[issue33806] Cannot re-open an existing telnet session

2018-06-08 Thread Eric V. Smith
Eric V. Smith added the comment: Which link are you referring to? I don't see any code you've provided where you're reopening a connection. It looks like you're opening a new connection, reading, writing, and nothing else. It also looks like the output you show is coming from the remote

[issue33805] dataclasses: replace() give poor error message if using InitVar

2018-06-08 Thread Eric V. Smith
New submission from Eric V. Smith : If a dataclass contains an InitVar without a default value, that InitVar must be specified in the call to replace(). This is because replace() works by first creating a new object, and InitVars without defaults, by definition, must be specified when

[issue33796] dataclasses.replace broken with class variables

2018-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the report. This is the same error you get when using any non-field: >>> @dataclass ... class C: ... i: int ... >>> c = C(4) >>> replace(c, i=3) C(i=3) >>> replace(c, j=3) Traceback (most recent call last):

[issue33796] dataclasses.replace broken with class variables

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

[issue33796] dataclasses.replace broken with class variables

2018-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: Ah, you're right. I did misunderstand. Thanks for correcting me. PR soon. -- nosy: +ned.deily priority: normal -> release blocker ___ Python tracker <https://bugs.python.org/issu

[issue33796] dataclasses.replace broken if a class has any ClassVars

2018-06-07 Thread Eric V. Smith
Change by Eric V. Smith : -- title: dataclasses.replace broken with class variables -> dataclasses.replace broken if a class has any ClassVars versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issu

[issue33796] dataclasses.replace broken if a class has any ClassVars

2018-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: Ned: How do you feel about backporting this to 3.7? It's an unfortunate bug, but it's your call for 3.7.0 vs. 3.7.1. -- ___ Python tracker <https://bugs.python.org/issue33

[issue33796] dataclasses.replace broken if a class has any ClassVars

2018-06-07 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +7113 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33796> ___ ___ Py

[issue33796] dataclasses.replace broken if a class has any ClassVars

2018-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset e7adf2ba41832404100313f9ac9d9f7fabedc1fd by Eric V. Smith in branch 'master': bpo-33796: Ignore ClassVar for dataclasses.replace(). (GH-7488) https://github.com/python/cpython/commit/e7adf2ba41832404100313f9ac9d9f7fabedc1fd

[issue33796] dataclasses.replace broken if a class has any ClassVars

2018-06-07 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Ned. I've backported it. -- components: +Library (Lib) priority: release blocker -> normal resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___

[issue33894] tempfile.tempdir cannot be unset

2018-06-18 Thread Eric V. Smith
Eric V. Smith added the comment: "If tempdir is unset or None" means "If tempdir has not been assigned to, or if it has been assigned the value None". "Unset" doesn't mean "delete from the module". I agree the documentation wording could be improve

[issue33894] tempfile.tempdir cannot be unset

2018-06-18 Thread Eric V. Smith
Eric V. Smith added the comment: I like philiprowlands' version: - If tempdir is unset or None at any call to + If tempdir is None (the default) at any call to Care to produce a PR? -- versions: +Python 2.7, Python 3.6, Python 3.7 ___ Python

[issue33850] Json.dump() bug when using generator

2018-06-13 Thread Eric V. Smith
Eric V. Smith added the comment: You should ask your question on this mailing list: https://mail.python.org/mailman/listinfo/python-list The bug tracker is not a place for asking how to use Python. If you actually find a bug in Python, you can re-open this issue. I do not believe that what

[issue33844] Writing capital letters with csvwriter.writerow changes the csv file format

2018-06-13 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: works for me -> not a bug ___ Python tracker <https://bugs.python.org/issue33844> ___ ___ Python-bugs-list mai

[issue33848] Incomplete format string syntax for Exceptions

2018-06-12 Thread Eric V. Smith
Eric V. Smith added the comment: This is because Exception does not define __format__, so object.__format__ is being called. object.__format__ does not allow any format specifier to be used. You get the same error for any object without its own __format__, when you supply a format spec

[issue33881] dataclasses should use NFKC to find duplicate members

2018-06-16 Thread Eric V. Smith
Change by Eric V. Smith : -- title: dataclasses should use NFKD to find duplicate members -> dataclasses should use NFKC to find duplicate members ___ Python tracker <https://bugs.python.org/issu

[issue33881] dataclasses should use NFKD to find duplicate members

2018-06-16 Thread Eric V. Smith
New submission from Eric V. Smith : See issue 33880 for the same issue with namedtuple. This shows up on dataclasses only through make_dataclass. This is an expected ValueError: >>> make_dataclass('a', ['a', 'b', 'c', 'a']) Traceback (most recent call last): File "",

[issue33880] namedtuple should use NFKD to find duplicate members

2018-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Not that it really matters to this issue, but here's how dataclasses and attrs deal with this: dataclasses has the same issue, via make_dataclass(). attrs gives a syntax error with your field names, but interestingly this succeeds: >>> F

[issue33880] namedtuple should use NFKD to find duplicate members

2018-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: See issue 33881 for the corresponding dataclasses issue. -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue33

[issue33880] namedtuple should use NFKD to find duplicate members

2018-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Actually, should this be NKFC? >From https://docs.python.org/3.6/reference/lexical_analysis.html#identifiers : "All identifiers are converted into the normal form NFKC while parsing; comparison of identifiers is based

[issue33669] str.format should raise exception when placeholder number doesn't match argument number

2018-05-28 Thread Eric V. Smith
Eric V. Smith added the comment: This was a deliberate design choice, and as Serhiy notes, at least partially driven by translations. It seems to me it would be a job for a linter to point out a problem, if the string is a constant. -- nosy: +eric.smith

[issue33669] str.format should raise exception when placeholder number doesn't match argument number

2018-05-28 Thread Eric V. Smith
Eric V. Smith added the comment: I still think it's a job for a linter, even if the compiler optimizes away the call to .format(). -- ___ Python tracker <https://bugs.python.org/issue33

[issue33754] f-strings should be part of the Grammar

2018-06-03 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not completely opposed to it, but I need to understand the benefits and side effects. And I wouldn't exactly describe the multiple passes over the string as "parsing", but I see your point. --

[issue33754] f-strings should be part of the Grammar

2018-06-03 Thread Eric V. Smith
Eric V. Smith added the comment: What is the goal here? Are you just trying to simplify ast.c? My concern is that there are many, many edge cases, and that you'll be unknowingly changing the behavior of f-strings. One of the goals of the f-string specification is for a simple third-party

[issue33721] os.path.exists() ought to return False if pathname contains NUL

2018-06-01 Thread Eric V. Smith
Eric V. Smith added the comment: To be clear: os.path.exists('a\x00b') raises ValueError on both Windows and Linux. I think we should just document this behavior and not change it. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.

[issue33730] string format 'n' produces numbers with incorrect precision

2018-06-01 Thread Eric V. Smith
Eric V. Smith added the comment: 'n' is defined as the same as 'g', for floats (modulo the locale-specific characters, of course): >>> format(1.89, '.2n') '1.9' >>> format(1.89, '.2g') '1.9' -- ___ Python tracker <ht

[issue33731] string formatting that produces floats with preset precision while respecting locale

2018-06-01 Thread Eric V. Smith
Eric V. Smith added the comment: You can always use the locale module, although of course that's not as convenient: >>> locale.format('%.2f', 1.891) '1.89' I'm open to suggests on backward compatible ways to implement this for python 3.8. It would probably involve a new letter,

[issue33730] string format 'n' produces numbers with incorrect precision

2018-06-01 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. If you still think there's an issue, we can re-open it. -- assignee: -> eric.smith components: +Interpreter Core -Extension Modules resolution: -> not a bug stage: -> resolved status: open

[issue33721] os.path.exists() ought to return False if pathname contains NUL

2018-06-01 Thread Eric V. Smith
Eric V. Smith added the comment: I don't know of any OS that supports NULs in filenames (not that my knowledge is encyclopedic). My reason for suggesting we document it is that os.path.exists() returns False for otherwise invalid filenames, where something like open() raises. On Windows

[issue34003] csv.DictReader can return basic dict instead of OrderedDict

2018-06-29 Thread Eric V. Smith
Eric V. Smith added the comment: The dict and OrderedDict APIs are slightly different, although I'm not sure anyone cares. See #32339. In that PR https://github.com/python/cpython/pull/4904, Guido said to not make this change. See also the python-dev discussion at https://mail.python.org

[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-07-02 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 24d74bd8377d38528566437e70fcd72229695ac7 by Eric V. Smith (Chris Cogdon) in branch '3.7': bpo-33961: Adjusted dataclasses docs to correct exceptions raised. (GH-7917) https://github.com/python/cpython/commit

[issue34020] Add '%(asctime)s' into default BASIC_FORMAT in logging module

2018-07-02 Thread Eric V. Smith
Eric V. Smith added the comment: Unfortunately, I don't see how we can do this without breaking code that assumes the default log format doesn't have the timestamp in it. In particular, I'm thinking of external log file parsers. -- nosy: +eric.smith, vinay.sajip

[issue33944] Deprecate and remove pth files

2018-06-22 Thread Eric V. Smith
Eric V. Smith added the comment: Also +1. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue33944> ___ ___ Python-bugs-list mailin

[issue33944] Deprecate and remove pth files

2018-06-22 Thread Eric V. Smith
Eric V. Smith added the comment: My understanding about symlinks on Windows is that they require a permission ("Create symbolic links"), that normal users by default do not have. I'm not sure if this has changed recently. -- ___ Pyth

[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2018-06-25 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue33961> ___ ___ Python-bugs-list mailin

[issue33946] os.symlink on Windows should use the new non-admin flag

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

[issue33805] dataclasses: replace() give poor error message if using InitVar

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

[issue33569] dataclasses InitVar does not maintain any type info

2018-06-23 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org/issue33569> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Eric V. Smith
New submission from Eric V. Smith : >>> @dataclass ... class C: ... f: "C" ... >>> c = C(None) >>> c.f = c >>> c Traceback (most recent call last): File "", line 1, in File "", line 2, in __repr__ File "", line

[issue33805] dataclasses: replace() give poor error message if using InitVar

2018-06-23 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 3d70f7aef614c396f516b5fccedeebe98598714d by Eric V. Smith (Dong-hee Na) in branch 'master': bpo-33805: Improve error message of dataclasses.replace() (GH-7580) https://github.com/python/cpython/commit/3d70f7aef614c396f516b5fccedeebe98598714d

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Raymond. I'm working on a patch. -- versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue33

[issue33894] tempfile.tempdir cannot be unset

2018-06-21 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset b225cb770fb17596298f5a05c41a7c90c470c4f8 by Eric V. Smith (Miss Islington (bot)) in branch '3.6': bpo-33894: Clarified the tempfile.tempdir documentation (GH-7829) (GH-7842) https://github.com/python/cpython/commit

[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Your patch would break the usual and useful behavior of x == eval(repr(x)) >>> f = Fraction(1,2) >>> repr(f) 'Fraction(1, 2)' >>> eval(repr(f)) Fraction(1, 2) >>> f == eval(repr(f)) True Plus, I'm

[issue33402] Change the fractions.Fraction class to convert to a unicode fraction string

2018-05-01 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I'd bring it up on python-ideas, and point the discussion to this issue. I think the primary complain will be using non-ASCII characters in a function that normally doesn't return non-ASCII. But maybe people will be willing to

[issue33408] AF_UNIX is now supported in Windows

2018-05-02 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- nosy: +eric.smith versions: +Python 3.8 -Python 3.7 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue33410] Using type in a format with padding causes TypeError

2018-05-02 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: The problem is that type.__format__ doesn't exist, so object.__format__ is being called, and it throws an error if you provide a format spec. This is done for future expansion: if we do want to add type.__format__ in the future, we

[issue33390] matmul @ operator precedence

2018-04-29 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Operator precedence cannot change without breaking existing code. -- nosy: +eric.smith type: behavior -> enhancement versions: +Python 3.8 -Python 3.5 ___ Python tracker <rep...@bug

[issue33419] Add functools.partialclass

2018-05-03 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: This has to be a 3.8 feature. It would be best if you could convert this to a github pull request, and use blurb to generate the news entry. But those aren't strictly necessary, someone else can do the mechanics of that. I'm willing

[issue33419] Add functools.partialclass

2018-05-03 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: You'll need to use blurb: https://pypi.org/project/blurb/ https://devguide.python.org/committing/#what-s-new-and-news-entries Well, technically it's possible to not use blurb and do it manually, but you'll want

[issue32427] Rename and expose dataclasses._MISSING

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

[issue32427] Rename and expose dataclasses._MISSING

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

[issue32427] Rename and expose dataclasses._MISSING

2017-12-29 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: New changeset 03220fdb26c0b6a50ce5ed1fdfbf232094b66db6 by Eric V. Smith in branch 'master': bpo-32427: Expose dataclasses.MISSING object. (#5045) https://github.com/python/cpython/commit/03220fdb26c0b6a50ce5ed1fdfbf232094

[issue32499] Add dataclasses.is_dataclass(obj)

2018-01-05 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: See https://mail.python.org/pipermail/python-dev/2018-January/151628.html and prior for the discussion. Add dataclasses.is_dataclass(obj) that returns True if obj is a dataclass class or instance, else returns False. -- as

[issue32499] Add dataclasses.is_dataclass(obj)

2018-01-06 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

[issue32501] Documentation for dir([object])

2018-01-06 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: It's described here: https://docs.python.org/3/reference/datamodel.html#special-lookup Maybe we should have a glossary entry for "special method lookup", and somehow link mentions like __dir__ to it? This is slightly diffe

[issue32499] Add dataclasses.is_dataclass(obj)

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

[issue32499] Add dataclasses.is_dataclass(obj)

2018-01-06 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I've updated the PEP, too. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32499] Add dataclasses.is_dataclass(obj)

2018-01-06 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: New changeset e7ba013d870012157f695ead7e3645c2828a7fc5 by Eric V. Smith in branch 'master': bpo-32499: Add dataclasses.is_dataclass(obj), which returns True if obj is a dataclass or an instance of one. (#5113) https://github.com/

[issue32427] Rename and expose dataclasses._MISSING

2018-01-06 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32427> ___ _

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

2018-01-06 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- pull_requests: +4981 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32278> ___ _

[issue32406] Doc: The new dataclasses module is not documented

2017-12-21 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: This is a duplicate of #32216, which is no doubt hard to find because the subject doesn't contain "dataclasses". I've fixed that. -- resolution: -> duplicate stage: -> resolved

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

2017-12-21 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- title: Document PEP 557 Data Classes -> Document PEP 557 Data Classes (dataclasses module) ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32506] dataclasses: no need for OrderedDict now that dict guarantees to keep insertion order

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

[issue32506] dataclasses: no need for OrderedDict now that dict guarantees to keep insertion order

2018-01-07 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: New changeset d13889214a4c81b78fa8683d35bdbd17ff22f4fe by Eric V. Smith in branch 'master': bpo-32506: Change dataclasses from OrderedDict to plain dict. (gh-5131) https://github.com/python/cpython/

[issue32506] dataclasses: no need for OrderedDict now that dict guarantees to keep insertion order

2018-01-07 Thread Eric V. Smith
Change by Eric V. Smith <e...@trueblade.com>: -- pull_requests: +4992 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32506> ___ _

[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-07 Thread Eric V. Smith
New submission from Eric V. Smith <e...@trueblade.com>: Modify dataclasses to make it easier to specify special methods. For example: currently, if you want to override __repr__, you need to specify @dataclass(repr=False), and also provide your own __repr__. Also, it's current an

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2018-01-09 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: I tend to agree with you about pre-scanning the arguments to find options. But at this point, our options to change the code are limited. The last time I looked at this (and it's been years), I came to the conclusion that the argume

[issue32428] dataclasses: make it an error to have initialized non-fields in a dataclass

2018-01-06 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: Correct. I'm working on that one now. I'll open it tonight or tomorrow. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

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

2018-01-06 Thread Eric V. Smith
Eric V. Smith <e...@trueblade.com> added the comment: New changeset ed7d429ebb591f65cef558760fb4ebdc4fc8f8b0 by Eric V. Smith in branch 'master': bpo-32278: Allow dataclasses.make_dataclass() to omit type information. (gh-5115) https://github.com/python/cpython/

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