[issue31192] "return await coro()" SyntaxError despite being "valid syntax" in PEP 492

2017-08-12 Thread Martin Panter
Martin Panter added the comment: In 3.5, “await” is an ordinary identifier outside of “async def” functions. You have to use the “async def” syntax to enable it as a special keyword. >>> async def foo(): # “Async def” enables “await” as a keyword ... return await coro() # Valid syntax

[issue31147] a suboptimal check in list_extend()

2017-08-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm concerned that is would provide near zero benefit but would set us up for future bugs by tightly coupling two ideas that I would like to be able to reason about separately. The logic for list.extend() makes a potential overallocation, fills the list,

[issue31186] Support heapfix() and heapremove() APIs in heapq module

2017-08-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 I don't think this is the right way to use heaps. Also, I don't want to introduce any O(n) operations for fine-grained changes of a single element (part of the point of having a heap is to make fine-grained changes cheap). FWIW, it isn't common to

[issue31192] "return await coro()" SyntaxError despite being "valid syntax" in PEP 492

2017-08-12 Thread Brian
New submission from Brian: PEP 492 lists the following under "valid syntax" and yet 3.5.2 raises a SyntaxError: def foo(): return await coro() but this works: def bar(): return await (coro()) -- components: Interpreter Core messages: 300209 nosy: merrellb priority: normal

[issue31186] Support heapfix() and heapremove() APIs in heapq module

2017-08-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___

Re: Proposed new syntax

2017-08-12 Thread Jussi Piitulainen
Marko Rauhamaa writes: > Marko Rauhamaa : > >> Jussi Piitulainen : >> >>> But what is "set comprehension" in French, German, or Finnish? >> >> [...] >> >> Myself, I might propose the word "koonta" as a simple Finnish >> translation for

Re: Recent Spam problem

2017-08-12 Thread J. Clarke
In article , skybuck2...@hotmail.com says... > > I see two solutions: > > 1. We build new architecture or adept current one so it's more like a > blockchain, have to calculate some hash before being able to post and upload > and such. >

[issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses

2017-08-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: > > Perhaps the check needs to be limited to just the exact type. > Looks reasonable to me. Do you want to provide a PR Martijn? You realise that is making the current traceback *less* informative instead of more informative? I think that's going backwards --

Re: Proposed new syntax

2017-08-12 Thread Glenn Linderman
On 8/12/2017 9:12 AM, MRAB wrote: On 2017-08-12 09:54, Marko Rauhamaa wrote: Jussi Piitulainen : Rustom Mody writes: [ My conjecture: The word ‘comprehension’ used this way in English is meaningless and is probably an infelicious translation of something which

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-12 Thread George Collins
George Collins added the comment: Makes sense. I'll update the PR in a bit, and if anyone is hitting this repeatedly and thinks it should be added to 3.6 they can advocate for a policy change in the maintaining-consistency-with-previous-new-features corner case. Thanks, all! --

[issue31191] Fix grammar in threading.Barrier docs

2017-08-12 Thread Saurabh Chaturvedi
Changes by Saurabh Chaturvedi : -- nosy: schedutron priority: normal pull_requests: 3121 severity: normal status: open title: Fix grammar in threading.Barrier docs versions: Python 3.7 ___ Python tracker

[issue5001] Remove assertion-based checking in multiprocessing

2017-08-12 Thread drallensmith
Changes by drallensmith : -- pull_requests: +3120 ___ Python tracker ___ ___

Re: Proposed new syntax

2017-08-12 Thread Marko Rauhamaa
Marko Rauhamaa : > Jussi Piitulainen : > >> But what is "set comprehension" in French, German, or Finnish? > > [...] > > Myself, I might propose the word "koonta" as a simple Finnish > translation for "comprehension". And maybe "culling" or

[issue31190] ./configure: add ability to build and install only shared library (without static libpython3.a)

2017-08-12 Thread Дилян Палаузов
New submission from Дилян Палаузов: diff --git a/Makefile.pre.in b/Makefile.pre.in --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -578,7 +578,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o # Build static library # avoid long command lines, same as LIBRARY_OBJS -$(LIBRARY):

[issue31189] README.rst: installing multiple versions: typo

2017-08-12 Thread Дилян Палаузов
New submission from Дилян Палаузов: It speaks about pythonX.Y but means python3.${subversion} diff --git a/README.rst b/README.rst --- a/README.rst +++ b/README.rst @@ -190,7 +190,7 @@ script) you must take care that your primary python executable is not overwritten by the installation of a

[issue31188] Makefile.pre.in: commoninstall: reformat

2017-08-12 Thread Дилян Палаузов
New submission from Дилян Палаузов: When @FRAMEWORKALTINSTALLLAST@ expands to "", the last line of recipe commoninstall in the resulting Makefile consists solely of two tabs, for which emacs complains as "suspicious line". diff --git a/Makefile.pre.in b/Makefile.pre.in --- a/Makefile.pre.in

Re: Proposed new syntax

2017-08-12 Thread MRAB
On 2017-08-12 09:54, Marko Rauhamaa wrote: Jussi Piitulainen : Rustom Mody writes: [ My conjecture: The word ‘comprehension’ used this way in English is meaningless and is probably an infelicious translation of something which makes sense in German] From a

Re: Proposed new syntax

2017-08-12 Thread Marko Rauhamaa
Jussi Piitulainen : > But what is "set comprehension" in French, German, or Finnish? The comprehension principle has to do with the assumption in Naive Set Theory that for any logical predicate, there is a corresponding set. To put it in plain English, every

[issue31169] Unknown-source assertion failure in multiprocessing/managers.py

2017-08-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Now fixed in git master thanks to drallensmith. -- resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue5001] Remove assertion-based checking in multiprocessing

2017-08-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 48d9823a0ebde4dfab8bc154bb6df462fb2ee403 by Antoine Pitrou (Allen W. Smith, Ph.D) in branch 'master': bpo-5001, bpo-31169: Fix two uninformative asserts in multiprocessing/managers.py (#3078)

[issue31169] Unknown-source assertion failure in multiprocessing/managers.py

2017-08-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 48d9823a0ebde4dfab8bc154bb6df462fb2ee403 by Antoine Pitrou (Allen W. Smith, Ph.D) in branch 'master': bpo-5001, bpo-31169: Fix two uninformative asserts in multiprocessing/managers.py (#3078)

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-12 Thread Nick Coghlan
Nick Coghlan added the comment: While I agree the line is blurry, extending automatic disassembly to cover new types is currently still considered a new feature in the dis module rather than a bug in the addition of those new types to the language. Whether or not that's the *right* policy, or

Re: cpython version

2017-08-12 Thread Larry Martell
On Sat, Aug 12, 2017 at 10:09 AM, Chris Angelico wrote: > On Sat, Aug 12, 2017 at 10:24 PM, Larry Martell > wrote: >> On Sat, Aug 12, 2017 at 8:22 AM, Larry Martell >> wrote: >>> For the first time in my 30+ year career I am,

Re: cpython version

2017-08-12 Thread Chris Angelico
On Sat, Aug 12, 2017 at 10:24 PM, Larry Martell wrote: > On Sat, Aug 12, 2017 at 8:22 AM, Larry Martell > wrote: >> For the first time in my 30+ year career I am, unfortunately, working >> on Windows. A package I need, rpy2, comes in various

Re: Proposed new syntax

2017-08-12 Thread Tim Chase
On 2017-08-11 00:28, Steve D'Aprano wrote: > What would you expect this syntax to return? > > [x + 1 for x in (0, 1, 2, 999, 3, 4) while x < 5] [1, 2, 3] I would see this "while-in-a-comprehension" as a itertools.takewhile() sort of syntactic sugar: >>> [x + 1 for x in takewhile(lambda m: m <

[issue31169] Unknown-source assertion failure in multiprocessing/managers.py

2017-08-12 Thread drallensmith
drallensmith added the comment: Pull request equivalent for the patch submitted. This will not, of course, fix this particular bug, but it should help others with debugging such errors. -- ___ Python tracker

[issue31169] Unknown-source assertion failure in multiprocessing/managers.py

2017-08-12 Thread drallensmith
Changes by drallensmith : -- pull_requests: +3118 ___ Python tracker ___ ___

[issue5001] Remove assertion-based checking in multiprocessing

2017-08-12 Thread drallensmith
Changes by drallensmith : -- pull_requests: +3117 ___ Python tracker ___ ___

Re: cpython version

2017-08-12 Thread Larry Martell
On Sat, Aug 12, 2017 at 8:22 AM, Larry Martell wrote: > For the first time in my 30+ year career I am, unfortunately, working > on Windows. A package I need, rpy2, comes in various flavors for > different cpython versions: > > rpy2‑2.7.8‑cp27‑none‑win32.whl >

cpython version

2017-08-12 Thread Larry Martell
For the first time in my 30+ year career I am, unfortunately, working on Windows. A package I need, rpy2, comes in various flavors for different cpython versions: rpy2‑2.7.8‑cp27‑none‑win32.whl rpy2‑2.7.8‑cp27‑none‑win_amd64.whl rpy2‑2.7.8‑cp34‑none‑win32.whl rpy2‑2.7.8‑cp34‑none‑win_amd64.whl

[issue1732367] Document the constants in the socket module

2017-08-12 Thread Ammar Askar
Ammar Askar added the comment: That makes sense, listing availability for exceptions would certainly make everything more succinct. How do you propose we mention that certain options don't actually do anything on Windows. Currently I have a footnote in the table that links to the MSDN

Re: Proposed new syntax

2017-08-12 Thread Rustom Mody
On Saturday, August 12, 2017 at 5:25:43 PM UTC+5:30, Peter Otten wrote: > Rustom Mody wrote: > > > [ My conjecture: The word ‘comprehension’ used this way in English is > > meaningless and is probably an infelicious translation of something which > > makes sense in German] > > The meaning of

Re: Proposed new syntax

2017-08-12 Thread Peter Otten
Rustom Mody wrote: > [ My conjecture: The word ‘comprehension’ used this way in English is > meaningless and is probably an infelicious translation of something which > makes sense in German] The meaning of comprehension is probably closer to "comprise" than "comprehend".

[issue5001] Remove assertion-based checking in multiprocessing

2017-08-12 Thread drallensmith
drallensmith added the comment: Patches (for 2.7 and 3.5; the code is identical, only the line numbers changed) for the portion I commented on can be found in issue 31169. -- ___ Python tracker

Re: Proposed new syntax

2017-08-12 Thread Jussi Piitulainen
Marko Rauhamaa writes: > Jussi Piitulainen writes: > >> Rustom Mody writes: >>> [ My conjecture: The word ‘comprehension’ used this way in English is >>> meaningless and is probably an infelicious translation of something >>> which makes sense in German] >> >> From a Latin word for "taking

[issue5001] Remove assertion-based checking in multiprocessing

2017-08-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: @drallensmith, the patch you commented on is very old and probably doesn't apply anymore. It would be useful to make an updated patch (or rather PR, as we are using Github for development now: see https://devguide.python.org/pullrequest/). --

[issue31147] a suboptimal check in list_extend()

2017-08-12 Thread Oren Milman
Changes by Oren Milman : -- title: a mostly useless check in list_extend() -> a suboptimal check in list_extend() ___ Python tracker

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-12 Thread George Collins
George Collins added the comment: Hm--either/both? I encountered it as a bug ("dis works on my generator object and my async generator function, why does it break on my async generator object?") but strictly speaking it's a new feature (just as issue21947 was). To my mind, adding this level

[issue31187] suboptimal code in Py_ReprEnter()

2017-08-12 Thread Oren Milman
New submission from Oren Milman: in Objects/object.c, Py_ReprEnter() does the following: - try to retrieve the Py_Repr list from the thread-state dict. - in case the list is not in the dict, add it to the dict as an empty list. - check whether the received object is in the Py_Repr

[issue1732367] Document the constants in the socket module

2017-08-12 Thread Martin Panter
Martin Panter added the comment: The general rule for documenting availability seems to be to only list the special cases. Many of the socket options are specified by Posix, and seem to be available on Linux, Windows, BSD and other OSes. If you say “Availability: Linux, Windows”, it could

[issue30747] _Py_atomic_* not actually atomic on Windows with MSVC

2017-08-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> backport needed status: open -> closed ___ Python tracker ___

[issue30747] _Py_atomic_* not actually atomic on Windows with MSVC

2017-08-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset e664d7f89d2b9960d9049237136396e824795cac by Antoine Pitrou (Pär Björklund) in branch 'master': bpo-30747: Attempt to fix atomic load/store (#2383) https://github.com/python/cpython/commit/e664d7f89d2b9960d9049237136396e824795cac --

Re: Proposed new syntax

2017-08-12 Thread Marko Rauhamaa
Jussi Piitulainen : > Rustom Mody writes: >> [ My conjecture: The word ‘comprehension’ used this way in English is >> meaningless and is probably an infelicious translation of something >> which makes sense in German] > > From a Latin word for "taking together",

Re: Proposed new syntax

2017-08-12 Thread Jussi Piitulainen
Rustom Mody writes: > [ My conjecture: The word ‘comprehension’ used this way in English is > meaningless and is probably an infelicious translation of something > which makes sense in German] From a Latin word for "taking together", through Middle French, according to this source, which has