[issue38904] "signal only works in main thread" in main thread

2019-11-23 Thread Richard Warfield
Richard Warfield added the comment: I should mention, this behavior is new in 3.8.0. It did not occur in 3.7.x. -- ___ Python tracker ___

[issue38904] "signal only works in main thread" in main thread

2019-11-23 Thread Richard Warfield
New submission from Richard Warfield : I have an application (https://github.com/litxio/ptghci) using embedded Python, which needs to set a signal handler (and use the prompt-toolkit library which itself sets signal handlers). My call to signal.signal is guarded by a check that we're running

[issue2504] Add gettext.pgettext() and variants support

2019-11-23 Thread Eli Schwartz
Eli Schwartz added the comment: Interestingly enough, the final accepted patch (and the 2010 one) also fixes a bug where gettext.install(..., names='ngettext') would incorrectly work, in violation of the documentation. I think it would also incorrectly install 'gettext', too... It used to j

[issue38901] Add a CLI flag to venv to use the pwd basename as the prompt

2019-11-23 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue36682] duplicate method definitions in Lib/test/test_sys_setprofile.py

2019-11-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +16852 pull_request: https://github.com/python/cpython/pull/17366 ___ Python tracker ___ __

[issue38862] IDLE: Include end newlines in whitespace fix.

2019-11-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: patchcheck.py removes even a single newline if that is all that remains after stripping each line. So the revised rule is that a file should be either empty or end with a non-whitespace followed by a newline. My intent is that a file be ready to merge to o

[issue38862] IDLE: Include end newlines in whitespace fix.

2019-11-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +16851 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/17366 ___ Python tracker __

[issue38903] #if 0 block on parsetok.c

2019-11-23 Thread Emmanuel Arias
Change by Emmanuel Arias : -- keywords: +patch pull_requests: +16850 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17365 ___ Python tracker ___ _

[issue38903] #if 0 block on parsetok.c

2019-11-23 Thread Emmanuel Arias
New submission from Emmanuel Arias : Hi, I can see that on parsetok.c there is the next block: ``` #ifdef PY_PARSER_REQUIRES_FUTURE_KEYWORD #if 0 static const char with_msg[] = "%s:%d: Warning: 'with' will become a reserved keyword in Python 2.6\n"; static const char as_msg[] = "%s:%d: Warni

[issue38902] image/webp support in mimetypes

2019-11-23 Thread Lee Ball
New submission from Lee Ball : WebP is currently missing from the list of supported mimetypes. It's an open source image format, using VP8 or VP8L for image data and RIFF for containers. Previously, adding webp support was considered in 2011, but wasn't well supported at the time: ( https://

[issue38901] Add a CLI flag to venv to use the pwd basename as the prompt

2019-11-23 Thread Brett Cannon
New submission from Brett Cannon : I did a Twitter poll to see if there was consistent naming of the directory people created a virtual environment into when done locally to code (the answer is no). But a common theme was people not liking that the prompt defaults to the name of the directory

[issue38899] Document that virtual environment activation for fish should use `source`

2019-11-23 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38871] lib2to3 generates invalid code with filter and ternary operator

2019-11-23 Thread Dong-hee Na
Dong-hee Na added the comment: Dear core developers, I 'd like to discuss fixing this issue. IMHO, There are 2 options to fix this issue. 1. Add parenthesize when creating ListComp. The change will be as follow: new = ListComp(results.get("fp").clone(),

[issue38021] pep425 tag for AIX is inadequate

2019-11-23 Thread Paul Moore
Paul Moore added the comment: Thanks for the clarification, Nick. Yes, I agree that the basic "this is the tag that matches this precise CPython installation" is not the difficult part of the problem here, and if that is all that this issue is targeting, there should be no major problem. My

[issue38895] performance degradation creating a mock object (by factor 7-8)

2019-11-23 Thread Marcel Zięba
Marcel Zięba added the comment: This is the first commit I've observed slow down: 77b3b7701a34ecf6316469e05b79bb91de2addfa Especially this part looks suspicious https://github.com/python/cpython/commit/77b3b7701a34ecf6316469e05b79bb91de2addfa#diff-ff75b1b83c21770847ade91fa5bb2525R366

[issue38483] [venv] Add ~/.venvrc to change module defaults

2019-11-23 Thread Cooper Lees
Change by Cooper Lees : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue37334] Add a cancel method to asyncio Queues

2019-11-23 Thread Martin Teichmann
Martin Teichmann added the comment: I do not think that exposing the lists of futures does any good. I cannot come up with a semantics that could be implemented with that other than the one proposed. Also I think that close() or cancel() is something a reader intuitively understands, while l

[issue38021] pep425 tag for AIX is inadequate

2019-11-23 Thread Nick Coghlan
Nick Coghlan added the comment: For folks that aren't aware, Michael and I have been discussing the AIX package tagging problem via email since his initial distutils-sig posts about it. It's genuinely murky as fixing the AIX problem doesn't *technically* require any PEP 425 changes, as the m

[issue38524] functools.cached_property is not supported for setattr

2019-11-23 Thread Florian Dahlitz
Change by Florian Dahlitz : -- keywords: +patch pull_requests: +16849 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17364 ___ Python tracker ___

[issue38895] performance degradation creating a mock object (by factor 7-8)

2019-11-23 Thread Marcel Zięba
Marcel Zięba added the comment: I've also tested it and can confirm it. Master branch: raw times: 8.43 sec, 7.26 sec, 8.16 sec, 8.4 sec, 7.31 sec

[issue37224] test__xxsubinterpreters fails randomly

2019-11-23 Thread Kyle Stanley
Kyle Stanley added the comment: > So, I was finally able to replicate a failure in test_still_running locally, > it required using a rather ridiculous number of parallel workers I forgot to mention that I was able to replicate the above failure on the latest commit to the 3.8 branch. I was _

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-11-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: I support Antoine's proposal. Let's remove the suspicious option if we cannot handle it correctly in a secured manner. If people still want to use SO_REUSEADDR they can apply it manually, old good transp.get_extra_info("socket") is still available. -

[issue37334] Add a cancel method to asyncio Queues

2019-11-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: Lists of producers/consumers are just lists of future objects. I don't think that we need to expose futures in high-level public API. -- ___ Python tracker

[issue21063] Touch up one-line descriptions of modules for module index

2019-11-23 Thread Sanchit Khurana
Change by Sanchit Khurana : -- pull_requests: +16848 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17363 ___ Python tracker ___ __

[issue38898] Tkinter checkbutton switch on and off together

2019-11-23 Thread zaza hohonini
zaza hohonini added the comment: Hello, I have done a bit of digging and found out that this behavior appeared in python version 3.6.0 alpha2. I think it is related to bpo-27025 (https://bugs.python.org/issue27025) that changed the way that widgets are named. It is my impression that the co

[issue38900] Add a glossary entry for "callable" objects

2019-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I suggest linking to the built-in callable() function: https://docs.python.org/3/library/functions.html#callable -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue38881] unexpected behaviour of random.choices with zero weights

2019-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the suggestions. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 ___ Python tracker

[issue38881] unexpected behaviour of random.choices with zero weights

2019-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 041d8b48a2e59fa642b2c5124d78086baf74e339 by Raymond Hettinger in branch 'master': bpo-38881: choices() raises ValueError when all weights are zero (GH-17362) https://github.com/python/cpython/commit/041d8b48a2e59fa642b2c5124d78086baf74e339

[issue38900] Add a glossary entry for "callable" objects

2019-11-23 Thread Delgan
Delgan added the comment: I agree, it's straightforward. I just thought it could be useful to have a proper definition in the official documentation. For example, this question on StackOverflow actually received many views: https://stackoverflow.com/questions/111234/what-is-a-callable What

[issue38881] unexpected behaviour of random.choices with zero weights

2019-11-23 Thread Mark Dickinson
Mark Dickinson added the comment: Either raising, or treating a zero-weight-sum as undefined behaviour and documenting that the sum of the weights should be positive sounds fine to me. -1 on the suggestion to (deliberately, by documented design) choose at random in this case. Mathematically,

[issue38889] Segmentation fault when using EPF Importer

2019-11-23 Thread Sebastian Szwarc
Sebastian Szwarc added the comment: If someone really want to test The test procedure should be as follows: Get the EPFImporter tool https://affiliate.itunes.apple.com/resources/documentation/epfimporter/ Set up your database and put relevant login information in EPFConfig Get the simple minim

[issue38900] Add a glossary entry for "callable" objects

2019-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 I don't think this would be an improvement. We already have a builtin callable() function documented, and we have the documented Callable() abstract base class, and the __call__ method is documented in the library reference. I don't we need yet anoth

[issue38878] os.PathLike subclasshook causes subclass checks true on abstract implementation

2019-11-23 Thread Bar Harel
Bar Harel added the comment: A better example is this: class A(PathLike): def foo(self): """For all your foo needs""" class B: def __fspath__(self): pass issubclass(B, A) == True A().foo() # Yay, I Foo'd. B().foo() # oh barnacles, I

[issue38900] Add a glossary entry for "callable" objects

2019-11-23 Thread Delgan
New submission from Delgan : Hi. Quick use case explanation about this: I would like to document my function, stating that it accepts any "callable" object and linking to a proper definition of such object. For example, I'm already doing this when my function accepts a "file object". There

[issue37224] test__xxsubinterpreters fails randomly

2019-11-23 Thread Kyle Stanley
Kyle Stanley added the comment: > I was able to consistently reproduce the above failure using 200 parallel > workers, even without `-f`. Oops, I didn't mean without passing `-F`, as this would result in only a single test being ran. I meant without letting it repeat multiple times, as in t