[issue31926] compile error when converting selectmodule to AC due to missing #define-s

2017-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4f57409a2f7bdf8fb559cddc7c6533ca2c471c67 by Serhiy Storchaka (Tal Einat) in branch 'master': bpo-31926: fix missing *_METHODDEF statements by argument clinic (#4230)

[issue31930] IDLE: Pressing "Home" on Windows places cursor before ">>>"

2017-11-03 Thread Cheryl Sabella
Cheryl Sabella added the comment: On Ubuntu, HOME initially goes to between the text and >>>. Pressing it again moves it before the >>> and then it toggles between the two. So, it appears to be working as expected. -- ___

Re: A use-case for for...else with no break

2017-11-03 Thread Serhiy Storchaka
02.11.17 12:10, Steve D'Aprano пише: Occasionally it is useful to loop over a bunch of stuff in the interactive interpreter, printing them as you go on a single line: for x in something(): print(x, end='') If you do that, the prompt overwrites your output, and you get a mess: py> for x

[issue31932] setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user AppData

2017-11-03 Thread Hugh Fisher
New submission from Hugh Fisher : This was raised in issue #23246 but apparently not addressed at the time. The Visual C for Python 2.7 tools on my MS Windows 8.1 system installed themselves under the invisible AppData directory because I did not do so as Administrator.

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Jon Ribbens
On 2017-11-03, Alexey Muranov wrote: > 'Then' describes what happens next indeed, unless some extraordinary > situation prevents it from happening, for example: > > try: > go_to_the_bakery() > then: > buy_croissants(2) > except BakeryClosed:

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Alexey Muranov
On Thu, 2017-11-02 at 16:31 +, Jon Ribbens wrote: > On 2017-11-02, Steve D'Aprano wrote: > > On Fri, 3 Nov 2017 12:39 am, Jon Ribbens wrote: > > > Why would we want to make the language worse? It is fairly > > > obvious > > > what 'else' means, > > > > Yes,

[issue20171] Derby #2: Convert 115 sites to Argument Clinic in Modules/_cursesmodule.c

2017-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 4251 converts most of functions in the _curses and _curses_panel modules (around 130 functions) to Argument Clinic. Many functions didn't have docstrings, the PR adds them. You can test new signatures and docstrings by the

[issue18835] Add PyMem_AlignedAlloc()

2017-11-03 Thread Stefan Krah
Stefan Krah added the comment: > I'm not sure that the cost of the memory allocator itself defeats the gain of > aligned memory on algorithms. I expect data processing to be much more > expensive than the memory allocation, no? I guess this issue isn't easy to focus due

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Rhodri James
On 02/11/17 20:24, Chris Angelico wrote: Thank you. I've had this argument with many people, smart people (like Steven), people who haven't grokked that all concurrency has costs - that threads aren't magically more dangerous than other options. I'm with Steven. To be fair, the danger with

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Jon Ribbens
On 2017-11-03, Steve D'Aprano wrote: > On Fri, 3 Nov 2017 03:31 am, Jon Ribbens wrote: >> No, it's an obvious bug. You have a 'for...else' with no 'break'. >> Like I said, that should probably be a syntax error. > > It should absolutely not be a syntax error. There's

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2017-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, the submitted PR follows Dan's argument about the initializer's argument: the actual call is `initializer(*initargs)`. If someone wants to know about the current thread or process, it's trivial to call `thread.current_thread()` or

[issue31890] Please define the flag METH_STACKLESS for Stackless Python

2017-11-03 Thread STINNER Victor
STINNER Victor added the comment: Anselm Kruis: Python 3.7 now has your METH_STACKLESS flag. Enjoy ;-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31931] test_concurrent_futures: ProcessPoolSpawnExecutorTest.test_shutdown_race_issue12456() leaked dangling process on x86 Tiger 3.x

2017-11-03 Thread STINNER Victor
New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/30/builds/109/steps/4/logs/stdio 0:24:58 load avg: 2.01 [274/407/1] test_concurrent_futures failed (env changed) (279 sec) (...) test_shutdown_race_issue12456

[issue31911] Use malloc_usable_size() in pymalloc for realloc

2017-11-03 Thread STINNER Victor
Change by STINNER Victor : -- title: Use malloc_usable_size() is pymalloc for realloc -> Use malloc_usable_size() in pymalloc for realloc ___ Python tracker

[issue31308] forkserver process isn't re-launched if it died

2017-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Davin, I think I'm going to merge the PR for this. If you object it, it can still be reverted later. -- ___ Python tracker

[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +4211 stage: -> patch review ___ Python tracker ___

[issue31308] forkserver process isn't re-launched if it died

2017-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset fc6b348b12ad401cab0261b7b71a65c60a08c0a8 by Antoine Pitrou in branch 'master': bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary (#3246)

[issue31308] forkserver process isn't re-launched if it died

2017-11-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4214 ___ Python tracker ___

[issue31931] test_concurrent_futures: ProcessPoolSpawnExecutorTest.test_shutdown_race_issue12456() leaked dangling process on x86 Tiger 3.x

2017-11-03 Thread STINNER Victor
STINNER Victor added the comment: More context: test_correct_timeout_exception_msg (test.test_concurrent_futures.ProcessPoolSpawnAsCompletedTests) ... 2.66s ok test_duplicate_futures (test.test_concurrent_futures.ProcessPoolSpawnAsCompletedTests) ... 4.64s ok

[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Jack O'Connor
New submission from Jack O'Connor : See https://github.com/BLAKE2/libb2/issues/12. All Blake2 params have to be encoded in little-endian byte order. For the two multi-byte integer params, leaf_length and node_offset, that means that assigning a native-endian integer to

Re: A use-case for for...else with no break

2017-11-03 Thread Steve D'Aprano
On Fri, 3 Nov 2017 04:22 pm, Paul Rubin wrote: > Steve D'Aprano writes: >> for x in something(): >> print(x, end='') > > print(''.join(something())) I hoped that people would recognise a simplified, toy example used only to illustrate a technique, rather than

[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Christian Heimes
Christian Heimes added the comment: Good work, thanks for your PR! -- assignee: -> christian.heimes components: +Extension Modules nosy: +christian.heimes versions: -Python 3.8 ___ Python tracker

[issue20171] Derby #2: Convert 115 sites to Argument Clinic in Modules/_cursesmodule.c

2017-11-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4213 stage: needs patch -> patch review ___ Python tracker ___

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Chris Angelico
On Fri, Nov 3, 2017 at 8:48 PM, Alexey Muranov wrote: > 'Then' describes what happens next indeed, unless some extraordinary > situation prevents it from happening, for example: > >try: >go_to_the_bakery() >then: >buy_croissants(2) >except

[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2017-11-03 Thread Ned Deily
Ned Deily added the comment: Josh, sorry I don't have any further ideas off the top of my head and I likely won't have time for several weeks to try to reproduce this myself. Have you tried renaming the _tkinter extension back, doing a "make install", and seeing whether it

[issue31926] compile error when converting selectmodule to AC due to missing #define-s

2017-11-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset f8b3f6b178e48773cd7298141cbaf408c6917e41 by Victor Stinner (Tal Einat) in branch '3.6': [3.6] bpo-31926: fix missing *_METHODDEF statements by argument clinic (GH-4230) (#4253)

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-11-03 Thread STINNER Victor
STINNER Victor added the comment: I really hate the title of these issues "Derby #13: Convert 50 sites to Argument Clinic across 5 files". I would prefer to have one issue per file. Would it possible to close this one and open a new issue once someone has a PR for

[issue31935] subprocess.run() timeout not working with grandchildren and stdout=PIPE

2017-11-03 Thread Martin Ritter
New submission from Martin Ritter : Hi, I tried to use subprocess.run(..., stdout=subprocess.PIPE, timeout=N) to run some test scripts with a given timeout. This works as expected with simple scripts. However if the script itself creates other children which

[issue31920] pygettext ignores directories as inputfile argument

2017-11-03 Thread Oleg Krasnikov
Oleg Krasnikov added the comment: Thanks for quite sensible notes Serhiy. I've fixed all that in recent commit and added a regression test. Still not sure about "testing conventions" here cause this is my first PR to python repository, so please let me know if something

[issue31920] pygettext ignores directories as inputfile argument

2017-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your patch Oleg. 3.4 and 3.5 are in security fixes only mode now. Good catch, the usage of os.walk() in pygettext.py is incorrect. But your change is not enough. In _visit_pyfiles() the name 'CVS' is removed from

[issue31308] forkserver process isn't re-launched if it died

2017-11-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31926] compile error when converting selectmodule to AC due to missing #define-s

2017-11-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.6 ___ Python tracker ___

[issue31310] semaphore tracker isn't protected against crashes

2017-11-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4216 ___ Python tracker ___

[issue31699] Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error

2017-11-03 Thread Thomas Moreau
Change by Thomas Moreau : -- keywords: +patch pull_requests: +4218 stage: -> patch review ___ Python tracker ___

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread bartc
On 03/11/2017 11:49, Jon Ribbens wrote: On 2017-11-03, Steve D'Aprano wrote: Right, which is what happens with the for...else block. No. Ok, so look. It's obvious that you and I have different mental models of the situation here. You're thinking of 'for...else'

[issue31926] compile error when converting selectmodule to AC due to missing #define-s

2017-11-03 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +4215 ___ Python tracker ___ ___

[issue31310] semaphore tracker isn't protected against crashes

2017-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset cbe1756e3ecefc0e24a5d0a4b8663db9b6d0cc52 by Antoine Pitrou in branch 'master': bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed (#3247)

[issue31310] semaphore tracker isn't protected against crashes

2017-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset b5f09acf0a0219cec32b7eba3acdcb573fc74ab5 by Antoine Pitrou in branch '3.6': [3.6] bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed (GH-3247) (#4254)

[issue31310] semaphore tracker isn't protected against crashes

2017-11-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

python3 byte decode

2017-11-03 Thread Ali Rıza KELEŞ
Hi, Yesterday, while working with redis, i encountered a strange case. I want to ask why is the following `True` ``` "s" is b"s".decode() ``` while the followings are `False`? ``` "so" is b"so".decode() "som" is b"som".decode() "some" is b"some".decode() ``` Or vice versa? I read that `is`

[issue31932] setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user AppData

2017-11-03 Thread Zachary Ware
Change by Zachary Ware : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue31308] forkserver process isn't re-launched if it died

2017-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 019c99f325287741d1e0eefeef2b75c8e00b884f by Antoine Pitrou in branch '3.6': [3.6] bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary (GH-3246) (#4252)

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-11-03 Thread Tal Einat
Tal Einat added the comment: As the author of all of the updated patches, I wouldn't mind opening new issues separately for each of the remaining modules. Actually I would prefer it :) -- ___ Python tracker

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Chris Angelico
On Fri, Nov 3, 2017 at 10:26 PM, Rhodri James wrote: > On 02/11/17 20:24, Chris Angelico wrote: >> >> Thank you. I've had this argument with many people, smart people (like >> Steven), people who haven't grokked that all concurrency has costs - >> that threads aren't

[issue31926] compile error when converting selectmodule to AC due to missing #define-s

2017-11-03 Thread STINNER Victor
STINNER Victor added the comment: Thank you Tal Einat for your bug report and your fix. It's now merged into 3.6 and master (future 3.7). -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue31934] Failure to build out of source from a not clean source

2017-11-03 Thread Xavier de Gaye
Change by Xavier de Gaye : -- keywords: +patch pull_requests: +4217 stage: -> patch review ___ Python tracker ___

Re: python3 byte decode

2017-11-03 Thread Chris Angelico
On Fri, Nov 3, 2017 at 8:24 PM, Ali Rıza KELEŞ wrote: > Hi, > > Yesterday, while working with redis, i encountered a strange case. > > I want to ask why is the following `True` > > ``` > "s" is b"s".decode() > ``` > > while the followings are `False`? > > ``` > "so" is

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Grant Edwards
On 2017-11-03, Chris Angelico wrote: > On Sat, Nov 4, 2017 at 2:45 AM, Steve D'Aprano > wrote: >> So, all else being equal, which is likely to have more bugs? >> >> >> 1. Multiprocessing code with very little coupling between processes; or >> >> 2.

[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Re-reading the paragraph now, it also parsed weirdly for me. See the linked PR for a suggested improvement, along with your change. Thanks! -- ___ Python tracker

[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- keywords: +patch pull_requests: +4219 stage: -> patch review ___ Python tracker ___

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Steve D'Aprano
On Sat, 4 Nov 2017 01:50 am, Chris Angelico wrote: > On Fri, Nov 3, 2017 at 10:26 PM, Rhodri James wrote: >> I'm with Steven. To be fair, the danger with threads is that most people >> don't understand thread-safety, and in particular don't understand either >> that they

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Ian Kelly
On Thu, Nov 2, 2017 at 10:27 AM, Israel Brewster wrote: > >> On Nov 1, 2017, at 4:53 PM, Steve D'Aprano >> wrote: >> >> On Thu, 2 Nov 2017 05:53 am, Israel Brewster wrote: >> >> [...] >>> So the end result is that the thread that "updates" the

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Rhodri James
On 03/11/17 14:50, Chris Angelico wrote: On Fri, Nov 3, 2017 at 10:26 PM, Rhodri James wrote: On 02/11/17 20:24, Chris Angelico wrote: Thank you. I've had this argument with many people, smart people (like Steven), people who haven't grokked that all concurrency has

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Chris Angelico
On Sat, Nov 4, 2017 at 3:15 AM, Alexey Muranov wrote: > On Fri, 2017-11-03 at 22:03 +1100, Chris Angelico wrote: >> On Fri, Nov 3, 2017 at 8:48 PM, Alexey Muranov > com> wrote: >> > 'Then' describes what happens next indeed, unless some >> >

[issue31932] setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user AppData

2017-11-03 Thread Stefan Krah
Change by Stefan Krah : -- nosy: +jyrkih ___ Python tracker ___ ___ Python-bugs-list

[issue31415] Add -X option to show import time

2017-11-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Nov 2, 2017, at 22:50, INADA Naoki wrote: > > When adding environment variable option, it should be documented in > man page and `python -h`. I thought about that, but the problem is that none of the -X options

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Alexey Muranov
On Fri, 2017-11-03 at 22:03 +1100, Chris Angelico wrote: > On Fri, Nov 3, 2017 at 8:48 PM, Alexey Muranov com> wrote: > > 'Then' describes what happens next indeed, unless some > > extraordinary > > situation prevents it from happening, for example: > > > > try: > >

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Chris Angelico
On Sat, Nov 4, 2017 at 2:45 AM, Steve D'Aprano wrote: > So, all else being equal, which is likely to have more bugs? > > > 1. Multiprocessing code with very little coupling between processes; or > > 2. Threaded code with shared data and hence higher coupling between

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Jon Ribbens
On 2017-11-03, Chris Angelico wrote: > On Fri, Nov 3, 2017 at 10:49 PM, Jon Ribbens > wrote: >>> It should absolutely not be a syntax error. There's no reason for it >>> to be a syntax error, except to satisfy some arrogant and foolish >>> idea of

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Steve D'Aprano
On Fri, 3 Nov 2017 10:49 pm, Jon Ribbens wrote: > On 2017-11-03, Steve D'Aprano wrote: >> On Fri, 3 Nov 2017 03:31 am, Jon Ribbens wrote: >>> No, it's an obvious bug. You have a 'for...else' with no 'break'. >>> Like I said, that should probably be a syntax error. >>

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Gene Heskett
On Friday 03 November 2017 10:50:13 Chris Angelico wrote: > On Fri, Nov 3, 2017 at 10:26 PM, Rhodri James wrote: > > On 02/11/17 20:24, Chris Angelico wrote: > >> Thank you. I've had this argument with many people, smart people > >> (like Steven), people who haven't

[issue28706] msvc9compiler does not find a vcvarsall.bat of Visual C++ for Python 9.0

2017-11-03 Thread Stefan Krah
Change by Stefan Krah : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user AppData ___ Python tracker

[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry versions: +Python 3.7 -Python 3.8 ___ Python tracker ___

[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Daniel U. Thibault
New submission from Daniel U. Thibault : https://docs.python.org/3/reference/import.html#importsystem "Other mechanisms for invoking the import system (such as importlib.import_module()) may choose to subvert __import__() and use its own solution to implement import

[issue31415] Add -X option to show import time

2017-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I didn't think it's worth enough because import will be much slower than one > dict lookup. I agree. The main value of my patch is handling possible (but very unlike) errors. Implementing negative value caching adds not many

[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- pull_requests: +4220 stage: -> patch review ___ Python tracker ___

[issue31898] Add a `recommended-packages.txt` file

2017-11-03 Thread Éric Araujo
Change by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list

[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a7723d8b09f516a2b75837a3527b8cc7bee89fad by Serhiy Storchaka in branch 'master': bpo-31924: Fix test_curses on NetBSD 8. (#4228) https://github.com/python/cpython/commit/a7723d8b09f516a2b75837a3527b8cc7bee89fad

[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4222 ___ Python tracker ___

[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4221 ___ Python tracker ___

[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset ea80ae04e2ec68c7e289048d3224a24b3c3fb107 by Antoine Pitrou (Miss Islington (bot)) in branch '3.6': bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) (#4261)

[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4223 ___ Python tracker ___

[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset f6f90ff079a22b79a58d47b6117cc8a8c7d366f3 by Antoine Pitrou in branch 'master': bpo-30057: Fix potential missed signal in signal.signal(). (#4258) https://github.com/python/cpython/commit/f6f90ff079a22b79a58d47b6117cc8a8c7d366f3

[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Christian Heimes
Christian Heimes added the comment: New changeset dcfb0e3c04f1b29a0d09bb0a81dcd5ee5a5fef1a by Christian Heimes (Jack O'Connor) in branch 'master': bpo-31933: fix blake2 multi-byte params on big endian platforms (#4250)

[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- pull_requests: +4225 ___ Python tracker ___ ___

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Rhodri James
On 03/11/17 18:12, Israel Brewster wrote: On Nov 3, 2017, at 7:11 AM, Rhodri James wrote: People generally understand how to move data around, and the mistakes are usually pretty obvious when they happen. I think the existence of this thread indicates otherwise :-)

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Jon Ribbens
On 2017-11-03, Steve D'Aprano wrote: > The for loop does not necessarily perform a search: > > count = 1 > for obj in sequence: > if count > MAX_OBJECTS: > print("too many objects, halting") > break > process(obj) > else: > print("finished")

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Ian Kelly
On Fri, Nov 3, 2017 at 8:32 AM, Chris Angelico wrote: > On Fri, Nov 3, 2017 at 10:49 PM, Jon Ribbens > wrote: >> On 2017-11-03, Steve D'Aprano wrote: >>> On Fri, 3 Nov 2017 03:31 am, Jon Ribbens wrote: No, it's an

[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the report! I will push your patch soon. -- versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.5 ___ Python tracker

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Israel Brewster
--- Israel Brewster Systems Analyst II Ravn Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7293 --- > On Nov 3, 2017, at 7:11 AM, Rhodri James wrote: > > On

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

2017-11-03 Thread mickey695
mickey695 added the comment: I think it should be documented properly. In roughly two weeks I will have some time to look into it. So I could probably document the current behaviour by the start of December(unless someone beats me to it) --

[issue31914] Document Pool.(star)map return type

2017-11-03 Thread Дилян Палаузов
Дилян Палаузов added the comment: If the idea is one day to switch the return type to an iterable/generator, returning from starmap() before all parallel executions have completed, this needs to be documented and the typeshed adjusted accordingly. --

[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 ___ Python tracker

[issue31934] Failure to build out of source from a not clean source

2017-11-03 Thread Brett Cannon
Brett Cannon added the comment: What's "unclean" in this case? I mean you can always re-run Make after making changes and the build succeeds, so I'm not quite sure what leads to this state. -- nosy: +brett.cannon ___ Python

[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4224 ___ Python tracker ___

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Michael Torrie
On 11/03/2017 11:44 AM, Jon Ribbens wrote: > And that's leading you into confusion, as you've demonstrated. And indeed I've been led into considerable confusion about the else: clause over the years. Every time I need to use it, I run a python shell and try it out to remind myself how it works.

[issue30057] signal.signal should check tripped signals

2017-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset c713837e91f39dc18740c74729cb7cebcf54fe6e by Antoine Pitrou in branch '2.7': [2.7] bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) (#4263)

[issue31934] Failure to build out of source from a not clean source

2017-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: To build out of the 'src' source tree (a subdirectory of the current directory) in a 'build' subdirectory: $ ls -ld src drwxr-xr-x 21 xavier xavier 4.0K Nov 3 23:50 src/ $ mkdir build $ cd build $ $(cd ../src && pwd)/configure && make

[issue30844] selectors: Add urgent data to read event

2017-11-03 Thread Pim Klanke
Pim Klanke added the comment: On 02-11-17 16:54, STINNER Victor wrote: > STINNER Victor added the comment: > > It seems like kqueue supports urgent data: > > "EV_OOBAND: Read filter on socket may set this flag to indicate the presence > of out of

Re: A use-case for for...else with no break

2017-11-03 Thread Steve D'Aprano
On Fri, 3 Nov 2017 09:13 pm, Serhiy Storchaka wrote: > What the interpreter or configuration do you use? The standard > interpreter uses '>>> ' as a prompt. I have this in my Python startup file: if (sys.version_info[0] >= 3 and os.name == 'posix' and os.environ['TERM'] in ['xterm',

[issue31934] Failure to build out of source from a not clean source

2017-11-03 Thread Xavier de Gaye
New submission from Xavier de Gaye : The error message when building out of a not clean source tree: renaming build/scripts-3.7/2to3 to build/scripts-3.7/2to3-3.7 renaming build/scripts-3.7/pyvenv to build/scripts-3.7/pyvenv-3.7 gcc -pthread -Xlinker -export-dynamic -o

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Chris Angelico
On Fri, Nov 3, 2017 at 10:49 PM, Jon Ribbens wrote: > On 2017-11-03, Steve D'Aprano wrote: >> On Fri, 3 Nov 2017 03:31 am, Jon Ribbens wrote: >>> No, it's an obvious bug. You have a 'for...else' with no 'break'. >>> Like I said, that should

[issue31415] Add -X option to show import time

2017-11-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Nov 3, 2017, at 14:41, Serhiy Storchaka wrote: > > Note that with environment variable you get more information. Fun! -- ___ Python tracker

[issue31934] Failure to build out of source from a not clean source

2017-11-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: When you build out of the source tree and this source tree has been built previously (by running 'make' in the source tree), then you get the error msg printed in msg305486 when you try to build *out* of this not clean source tree. The

[issue31415] Add -X option to show import time

2017-11-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Nov 3, 2017, at 14:23, Terry J. Reedy wrote: > > Does it set the EV for the entire session (which one likely would not want), > or just the one command (which has no Windows equivalent that I know of)? > Please

[issue31939] Support return annotation in signature for Argument Clinic

2017-11-03 Thread STINNER Victor
New submission from STINNER Victor : Argument Clinic supports a few return types like NoneType, int, bool, etc. But the return type is omitted in the private docstring used to build the __text_signature__, finally used to build a Signature object in

[issue31938] Convert selectmodule.c to Argument Clinic

2017-11-03 Thread STINNER Victor
STINNER Victor added the comment: While reviewing PR 4265, I noticed that the return type like "-> None" or "-> int" is removed from the function definition, so the PR removes this information. But it seems to be a limitation of Argument Clinic: I opened the issue

[issue31370] Remove support for threads-less builds

2017-11-03 Thread Berker Peksag
Change by Berker Peksag : -- Removed message: https://bugs.python.org/msg302490 ___ Python tracker ___

[issue31370] Remove support for threads-less builds

2017-11-03 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: right list for SIGABRT python binary question ?

2017-11-03 Thread dieter
Karsten Hilbert writes: > ... > I have posted backtraces taken from the address being > watched. Does that help any at all ? Only in the case that the error is "local", i.e. detected (quite) immediately. You might be in this case as you have observed that the address is

  1   2   >