[Python-Dev] [RELEASE] Python 3.7.0b2 is now available for testing

2018-02-27 Thread Ned Deily
On behalf of the Python development community and the Python 3.7 release team, I'm happy to announce the availability of Python 3.7.0b2. b2 is the second of four planned beta releases of Python 3.7, the next major release of Python, and marks the end of the feature development phase for 3.7. You

Re: [Python-Dev] Should the dataclass frozen property apply to subclasses?

2018-02-27 Thread Eric V. Smith
On 2/22/2018 1:56 AM, Raymond Hettinger wrote: When working on the docs for dataclasses, something unexpected came up. If a dataclass is specified to be frozen, that characteristic is inherited by subclasses which prevents them from assigning additional attributes: >>> @dataclass(frozen=

Re: [Python-Dev] Backward incompatible change about docstring AST

2018-02-27 Thread Brett Cannon
On Tue, 27 Feb 2018 at 05:38 INADA Naoki wrote: > Hi, all. > > There is design discussion which is deferred blocker of 3.7. > https://bugs.python.org/issue32911 > > ## Background > > An year ago, I moved docstring in AST from statements list to field of > module, class and functions. > https://bu

Re: [Python-Dev] Backward incompatible change about docstring AST

2018-02-27 Thread Serhiy Storchaka
28.02.18 00:31, Terry Reedy пише: 2. Usually the position of the docstring is used for determining the absolute position of some fragments in the docstring (for example doctests). But since the literal string can contain \n and escaped newlines, and this information is lost in AST, the position

Re: [Python-Dev] Backward incompatible change about docstring AST

2018-02-27 Thread Terry Reedy
On 2/27/2018 9:32 AM, Serhiy Storchaka wrote: 27.02.18 15:37, INADA Naoki пише: Of course, this change was backward incompatible. Tools reading/writing docstring via AST will be broken by this change. For example, it broke PyFlakes, and PyFlakes solved it already. https://github.com/PyCQA/pyfla

Re: [Python-Dev] The `for y in [x]` idiom in comprehensions

2018-02-27 Thread Alexander Belopolsky via Python-Dev
On Mon, Feb 26, 2018 at 7:51 PM, Guido van Rossum wrote: .. > The reason is that for people who are not Python experts there's no obvious > reason why `for VAR = EXPR` should mean one thing and `for VAR in EXPR` > should mean another. This would be particularly surprising for people exposed to Ju

Re: [Python-Dev] PEP 467 (Minor API improvements for binary sequences) - any thoughts?

2018-02-27 Thread Ethan Furman
On 02/26/2018 11:34 PM, Elias Zamaria wrote: Nick, I'm trying to reply to your message, but I can't figure out how. You mentioned that the PEP needs a "champion". What would that involve? How much time and effort would it take? What kinds of decisions would I make? Being a PEP "champion" inv

Re: [Python-Dev] PEP 467 (Minor API improvements for binary sequences) - any thoughts?

2018-02-27 Thread Elias Zamaria
Nick, I'm trying to reply to your message, but I can't figure out how. You mentioned that the PEP needs a "champion". What would that involve? How much time and effort would it take? What kinds of decisions would I make? The iterbytes thing in the PEP is something I was wishing for, while working

[Python-Dev] Disable built-in module import in embedded Python

2018-02-27 Thread Viktor Kovacs
Hi All, I have a question about embedding python in C++. I don't want to create a duplication so I just leave here the existing stack overflow question: https://stackoverflow.com/questions/48992030/disable-built-in-module-import-in-embedded-python Do you have any idea how to achieve this? Thanks

Re: [Python-Dev] Backward incompatible change about docstring AST

2018-02-27 Thread Serhiy Storchaka
27.02.18 15:37, INADA Naoki пише: Of course, this change was backward incompatible. Tools reading/writing docstring via AST will be broken by this change. For example, it broke PyFlakes, and PyFlakes solved it already. https://github.com/PyCQA/pyflakes/pull/273 Other examples: coveragepy: htt

[Python-Dev] Backward incompatible change about docstring AST

2018-02-27 Thread INADA Naoki
Hi, all. There is design discussion which is deferred blocker of 3.7. https://bugs.python.org/issue32911 ## Background An year ago, I moved docstring in AST from statements list to field of module, class and functions. https://bugs.python.org/issue29463 Without this change, AST-level constant f

Re: [Python-Dev] How is the GitHub workflow working for people?

2018-02-27 Thread Giampaolo Rodola'
I personally use a GIT commit hook which runs flake8 against the *modified py files only* and rejects the commit in case of non-compliance: https://github.com/giampaolo/psutil/blob/master/.git-pre-commit ...I install it via make: https://github.com/giampaolo/psutil/blob/ad4acae5489f86fc3bef645505b3