[issue33491] mistype of method's name

2018-05-14 Thread Ivan Gushchin
New submission from Ivan Gushchin : This link https://docs.python.org/2/library/unittest.html#unittest.SkipTest names method from Capital letter. At the same time method name (according to help(unittest) ) is skipTest (starting lowercase). For those who reads

[issue33492] Updating the Evaluation order section to cover *expression in calls

2018-05-14 Thread Martijn Pieters
New submission from Martijn Pieters : Can the *Evaluation order* (_evalorder) section in reference/expressions.rst please be updated to cover this exception in a *call* primary (quoting from the _calls section): A consequence of this is that although the ``*expression``

[issue32393] nav menu jitter in old documentation

2018-05-14 Thread Martin Panter
Martin Panter added the comment: Maybe related to Issue 24712? -- nosy: +martin.panter ___ Python tracker ___

[issue20104] expose posix_spawn(p)

2018-05-14 Thread Martin Panter
Martin Panter added the comment: I suggested the “scheduler” tuple to bring the two related parameters (scheduling policy and sched_param) together, similar to how they are paired as the second and third parameters to “os.sched_setscheduler”, and because I thought it

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-05-14 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- nosy: +jdemeyer ___ Python tracker ___ ___ Python-bugs-list

[issue33481] configparser.write() does not save comments.

2018-05-14 Thread Martin Panter
Martin Panter added the comment: Looks like Issue 1410680 has a new function to merge comments with new config values (among other things). -- nosy: +martin.panter ___ Python tracker

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-05-14 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +6476 stage: -> patch review ___ Python tracker ___

[issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox

2018-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +6478 ___ Python tracker ___

[issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox

2018-05-14 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +6477 stage: -> patch review ___ Python tracker

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Steven D'Aprano
New submission from Steven D'Aprano : As mentioned on the Python-List: https://mail.python.org/pipermail/python-list/2018-May/733061.html random.choices() silently returns the wrong values when cumulative weights are not given, i.e. if the user misreads the

[issue33495] dataclasses: repr of Field objects should use repr of each member

2018-05-14 Thread Eric V. Smith
New submission from Eric V. Smith : This is especially true for the "type" member, since it might be a string that looks like a type name (depending on how #33453 is resolved). But repr should be used for all Field members. -- assignee: eric.smith components:

[issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5c0d462689e1a69537eaeba6ab94e3ff3524fc31 by Serhiy Storchaka (Anders Kaseorg) in branch 'master': bpo-32601: Let test_expanduser use the same user if no others found. (GH-5246)

[issue33493] dataclasses: allow keyword-only arguments

2018-05-14 Thread Eric V. Smith
New submission from Eric V. Smith : I've had several requests for keyword-only arguments. This is a placeholder to remind me to work on it. I have not decided if it's a good idea or not. I propose adding a keyword_only argument to field(), defaulting to False. I'm thinking

[issue20104] expose posix_spawn(p)

2018-05-14 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think that is the biggest argument towards using a tuple: that just setting the priority is not enough (and also is decontextualized as different policies have different priorities). On the other hand one could say that the API

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Mon, May 14, 2018 at 11:54:32AM +, Paul Moore wrote: > Requiring a pre-check on cum_weights (for example, the obvious check > that the sequence is nondecreasing) would add an O(n) step, and so > significantly impact

[issue33496] Accept Pathlib paths for sqlite file

2018-05-14 Thread devala
New submission from devala : I'd love to be able to pass pathlib paths to sqlite's connect conn = sqlite3.connect(DB_FILE) TypeError: argument 1 must be str The workaround is not hard (str(DB_FILE), but reducing friction in using pathlib would be great. --

[issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter

2018-05-14 Thread Thomas Wouters
Change by Thomas Wouters : -- nosy: +ned.deily priority: normal -> release blocker ___ Python tracker ___

[issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox

2018-05-14 Thread miss-islington
miss-islington added the comment: New changeset 48fdbbf6bb0cd0ea9d284ba650a80bffa6310c6b by Miss Islington (bot) in branch '3.6': bpo-32601: Let test_expanduser use the same user if no others found. (GH-5246)

[issue33500] Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows

2018-05-14 Thread Michael Romero
Michael Romero added the comment: "search.zip" on http://ai.berkeley.edu/project_log.html will also display the same performance issue. -- Added file: https://bugs.python.org/file47587/search.zip ___ Python tracker

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: -6490 ___ Python tracker ___ ___

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

2018-05-14 Thread Eric V. Smith
Eric V. Smith added the comment: Followup from our meeting at the sprints: we're going to go with inspecting the type annotation string and use heuristics to determine if the type is a ClassVar or InitVar. I'll follow up with more specifics on the approach. This will

[issue20104] expose posix_spawn(p)

2018-05-14 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Regarding the rationale for when posix_spawn can be useful (from the RATIONALE section of the man page): The posix_spawn() function and its close relation posix_spawnp() have been introduced to overcome the following perceived

[issue31118] Make super() work with staticmethod by using __class__ for both arguments to super()

2018-05-14 Thread Denis Ryzhkov
Denis Ryzhkov added the comment: Simple explanation: if you call a method of a parent, then you are using class information now, so your child method is not static any more. Please use classmethod decorator and super() with no arguments - it will use cls argument

[issue32861] urllib.robotparser: incomplete __str__ methods

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bd08a0af2d88c590ede762102bd42da3437e9980 by Serhiy Storchaka (Michael Lazar) in branch 'master': bpo-32861: urllib.robotparser fix incomplete __str__ methods. (GH-5711)

[issue32861] urllib.robotparser: incomplete __str__ methods

2018-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +6480 ___ Python tracker ___

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +6483 stage: -> patch review ___ Python tracker ___

[issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline

2018-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +6486 ___ Python tracker ___

[issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline

2018-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +6487 ___ Python tracker ___

[issue31607] Add listsize in pdb.py

2018-05-14 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I close this issue because I think we need to use a pair of set/get and not a new command like 'listsize'. -- stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This will just add an overhead for all correct use of bisect. We are adult here. If the user want to break bisect or random.choices, let him to do this. -- nosy: +serhiy.storchaka

[issue33498] pathlib.Path wants an rmtree method

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is wrong with just using shutil.rmtree()? You can't deal with files with only using pathlib. You can't read ZIP archives, open temporary files, import modules, download files from Internet and open them in the webbrowser,

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: +6492 ___ Python tracker ___ ___

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 6798 and PR 6806 are related to issue33495. Fixed links on GitHub, but commit messages and NEWS entries can contain wrong references. -- ___ Python tracker

[issue29235] Allow profile/cProfile to be used as context managers

2018-05-14 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +6495 stage: test needed -> patch review ___ Python tracker ___

[issue21145] Add the @cached_property decorator

2018-05-14 Thread Carl Meyer
Carl Meyer added the comment: > I don't think it makes sense to try to make cached_property itself work > implicitly with both normal attributes and slot entries - instead, > cached_property can handle the common case as simply and efficiently as > possible, and the

[issue31727] FTP_TLS errors when use certain subcommands

2018-05-14 Thread Grégoire Chauvet
Grégoire Chauvet added the comment: I want to confirm that I have this exact same issue as described. To add some information, it occurs on: Python 3.6.3 on Windows Python 3.6.5 on Debian, with OpenSSL 1.0.1t 3 May 2016 Python 3.5.3 on Debian, with OpenSSL 1.1.0f 25

[issue33476] String index out of range in get_group(), email/_header_value_parser.py

2018-05-14 Thread R. David Murray
R. David Murray added the comment: The fix is mostly likely correct, so we need a PR for this that includes tests. -- keywords: +easy stage: -> test needed versions: +Python 3.7, Python 3.8 ___ Python tracker

[issue33476] String index out of range in get_group(), email/_header_value_parser.py

2018-05-14 Thread R. David Murray
Change by R. David Murray : -- type: crash -> behavior ___ Python tracker ___ ___

[issue32861] urllib.robotparser: incomplete __str__ methods

2018-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +6481 ___ Python tracker ___

[issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension

2018-05-14 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- keywords: +patch pull_requests: +6482 stage: -> patch review ___ Python tracker ___

[issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter

2018-05-14 Thread Amber Brown
New submission from Amber Brown : Lack of this parameter means that you may get an exception (if the incoming data is an invalid encoding) you can not get around. This causes Twisted to be unable to provide a compatible API on Python 3.7. -- messages: 316510

[issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension

2018-05-14 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: binascii gets built-in too, so it seems like _hashlib is a good choice. -- ___ Python tracker ___

[issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter

2018-05-14 Thread Amber Brown
Change by Amber Brown : -- keywords: +patch pull_requests: +6489 stage: -> patch review ___ Python tracker ___

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe include it in PY_CFLAGS_NODIST instead of PY_CFLAGS? Or just remove it, since in any case we now use -Wall and -Wextra with GCC. -- nosy: +serhiy.storchaka ___ Python tracker

[issue33495] dataclasses: repr of Field objects should use repr of each member

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +6491 stage: -> patch review ___ Python tracker ___

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +6494 ___ Python tracker ___

[issue33501] split existing optimization levels into granular options

2018-05-14 Thread Steven D'Aprano
Change by Steven D'Aprano : -- nosy: +steven.daprano ___ Python tracker ___ ___

[issue25711] Rewrite zipimport from scratch

2018-05-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +6497 ___ Python tracker ___ ___

[issue20104] expose posix_spawn(p)

2018-05-14 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +6479 ___ Python tracker ___ ___

[issue33499] Environment variable to set alternate location for pycache tree

2018-05-14 Thread Carl Meyer
New submission from Carl Meyer : We would like to set an environment variable that would cause Python to read and write `__pycache__` directories from a separate location on the filesystem (outside the source code tree). We have two reasons for this: 1. In our development

[issue33497] cgi.parse_multipart does not have an associated "errors" parameter with its "encoding" parameter

2018-05-14 Thread Ned Deily
Change by Ned Deily : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: -6483 ___ Python tracker ___ ___

[issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline

2018-05-14 Thread miss-islington
miss-islington added the comment: New changeset 84fc6c59cf286fc4e6b3a700c6db36ecc2bff92b by Miss Islington (bot) in branch '2.7': bpo-22069: Update TextIO documentation (GH-6609)

[issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline

2018-05-14 Thread miss-islington
miss-islington added the comment: New changeset 9fd5b5fdf851d35a5c1314360119850e86a1fd0d by Miss Islington (bot) in branch '3.6': bpo-22069: Update TextIO documentation (GH-6609)

[issue33501] split existing optimization levels into granular options

2018-05-14 Thread Carl Meyer
New submission from Carl Meyer : It doesn't make sense for e.g. docstring-stripping to necessarily imply assert-stripping. These are totally separate options, useful for separate reasons, but currently tied together in the `-O` option. This is not just a theoretical problem;

[issue29235] Allow profile/cProfile to be used as context managers

2018-05-14 Thread Scott Sanderson
Scott Sanderson added the comment: This looks like it's been dormant for a bit. I've posted a patch (with tests and docs) to https://github.com/python/cpython/pull/6808. -- nosy: +Scott Sanderson ___ Python tracker

[issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox

2018-05-14 Thread miss-islington
miss-islington added the comment: New changeset 2e01f7d5fe51b492e39d97bf0da2a83f2efb977d by Miss Islington (bot) in branch '3.7': bpo-32601: Let test_expanduser use the same user if no others found. (GH-5246)

[issue33465] test_from_import_missing_attr_has_name_and_so_path fails when select is a builtin instead of an extension

2018-05-14 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: It seems pretty easy to use an extension module that's less likely to be built-in. What about binascii? -- ___ Python tracker

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -6492 ___ Python tracker ___

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -6494 ___ Python tracker ___

[issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline

2018-05-14 Thread miss-islington
miss-islington added the comment: New changeset 050e041bf7e5260013a74c75a05a3f0fb16447ec by Miss Islington (bot) in branch '3.7': bpo-22069: Update TextIO documentation (GH-6609)

[issue25711] Rewrite zipimport from scratch

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 6809 freezes zipimport.py, adds changes made in zipimport.c since writing the initial Python implementation, and fixes few bugs exposed in the frozen module. Seems Python now works with the zipped stdlib. --

[issue25711] Rewrite zipimport from scratch

2018-05-14 Thread pmpp
Change by pmpp : -- nosy: +pmpp ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue31500] IDLE: Tiny font on HiDPI display

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems IDLE now works on my HiDPI screen without the patch. It looks the same as IDLE in 3.x with the patch. -- ___ Python tracker

[issue20104] expose posix_spawn(p)

2018-05-14 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Notice that https://github.com/python/cpython/pull/6794 is already open to remove posix_spawn from 3.7. -- ___ Python tracker

[issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline

2018-05-14 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks! -- stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.6 ___ Python tracker

[issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline

2018-05-14 Thread Mariatta Wijaya
Change by Mariatta Wijaya : -- resolution: -> fixed ___ Python tracker ___ ___

[issue33498] pathlib.Path wants an rmtree method

2018-05-14 Thread Aaron Hall
New submission from Aaron Hall : pathlib.Path wants the rmtree method from shutil I think we need this method for a couple of reasons. 1. in shell, rm has the -r flag - In Python, we use shutil.rmtree as a best practice for this. 2. I prefer to teach my students about

[issue31849] Python/pyhash.c warning: comparison of integers of different signs

2018-05-14 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +6484 stage: needs patch -> patch review ___ Python tracker

[issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline

2018-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +6485 ___ Python tracker ___

[issue32601] PosixPathTest.test_expanduser fails in NixOS build sandbox

2018-05-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.8 ___ Python tracker

[issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline

2018-05-14 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 7ffd4c58fae08b29259eebd6cbcd2287820b14e8 by Mariatta (Elena Oat) in branch 'master': bpo-22069: Update TextIO documentation (GH-6609) https://github.com/python/cpython/commit/7ffd4c58fae08b29259eebd6cbcd2287820b14e8

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +6490 ___ Python tracker ___

[issue33500] Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows

2018-05-14 Thread Michael Romero
New submission from Michael Romero : Hello, I have recently been working with a PAC-MAN project developed by Berkeley for their A.I. course. My primary workstation is a Touchbar MBP (3.1ghz core i7 w/16gb RAM and an SSD). I had noticed how PAC-MAN's performance would

[issue33495] dataclasses: repr of Field objects should use repr of each member

2018-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +6493 ___ Python tracker ___

[issue33499] Environment variable to set alternate location for pycache tree

2018-05-14 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue20104] expose posix_spawn(p)

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As for the scheduler interface, yet one option is using two mutually exclusive parameters setschedparam and setscheduler. The first take a sched_param, the second takes a pair: int and sched_param. This will not simplify the

[issue33500] Python TKinter for Mac on latest 2.7.15 still extremely slow vs Windows

2018-05-14 Thread Michael Romero
Change by Michael Romero : -- type: -> performance ___ Python tracker ___ ___

[issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline

2018-05-14 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue20104] expose posix_spawn(p)

2018-05-14 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg316526 ___ Python tracker ___

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-14 Thread Paul Moore
Paul Moore added the comment: Supplying cum_weights allows the code to use bisection to locate the correct value to return. This is O(log n), and is significantly faster for large populations than supplying weights (which need to be totalled for the calculation).

[issue32769] Add 'annotations' to the glossary

2018-05-14 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Yes, all this also applies to 3.6. -- ___ Python tracker ___

[issue32769] Add 'annotations' to the glossary

2018-05-14 Thread Andrés Delfino
Change by Andrés Delfino : -- pull_requests: +6513 ___ Python tracker ___ ___

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

2018-05-14 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___

[issue32769] Add 'annotations' to the glossary

2018-05-14 Thread Andrés Delfino
Andrés Delfino added the comment: Yes, Ivan, I was thinking about that. I think it makes sense, and I'll be glad to do it. -- ___ Python tracker

[issue32769] Add 'annotations' to the glossary

2018-05-14 Thread Andrés Delfino
Andrés Delfino added the comment: Shouldn't we have this on 3.6 also? -- ___ Python tracker ___

[issue29412] IndexError thrown on email.message.Message.get

2018-05-14 Thread Terry Thurk
Change by Terry Thurk : -- pull_requests: +6509 stage: -> patch review ___ Python tracker ___

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2018-05-14 Thread R. David Murray
R. David Murray added the comment: OK, I've finally gotten around to looking at this. It looks like quopri and binascii are not stripping trailing whitespace. quoprimime binascii quopri preferred b'=' '' b'' b'='

[issue32769] Add 'annotations' to the glossary

2018-05-14 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > ... but annotations are a slightly more general concept because they may be > used for other purposes than to indicate the type of a variable ... Yes, I agree. -- ___ Python tracker

[issue32769] Add 'annotations' to the glossary

2018-05-14 Thread Andrés Delfino
Andrés Delfino added the comment: I see a conflict here in that annotations can be used for other purpouses, for example variable annotations, they are heavily intended for type hinting (PEP 526 says "This PEP aims at adding syntax to Python for annotating the types of

[issue33440] Possible lazy import opportunities in `pathlib`

2018-05-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Personally I support moving imports of rarely used modules into functions that need them. But this is against PEP 8 and should be discussed more widely. Perhaps this rule should be weaken, we have to state what exceptions are

[issue33505] Optimize asyncio.ensure_future by reordering if conditions

2018-05-14 Thread Jimmy Lai
New submission from Jimmy Lai : `ensure_future` converts the input as future if it's not already a future. The condition is the following: if futures.isfuture(coro_or_future): ... elif coroutines.iscoroutine(coro_or_future): ... elif

[issue31572] Avoid suppressing all exceptions in PyObject_HasAttr()

2018-05-14 Thread STINNER Victor
STINNER Victor added the comment: It seems like this issue caused a regression in _warnings: please see bpo-33509. -- nosy: +vstinner ___ Python tracker

[issue33509] warnings.warn_explicit with module_globals=True raises a SystemError

2018-05-14 Thread STINNER Victor
STINNER Victor added the comment: I choose the release blocker priority, since IMHO it's an easy fix. -- nosy: +ned.deily priority: normal -> release blocker ___ Python tracker

[issue33502] dataclasses: repr of _DataclassParams objects should use repr of each member

2018-05-14 Thread miss-islington
Change by miss-islington : -- pull_requests: +6514 ___ Python tracker ___

[issue33505] Optimize asyncio.ensure_future by reordering if conditions

2018-05-14 Thread Jimmy Lai
Change by Jimmy Lai : -- keywords: +patch pull_requests: +6515 stage: -> patch review ___ Python tracker ___

[issue33443] Typo in Python/import.c

2018-05-14 Thread Brett Cannon
Brett Cannon added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32769] Add 'annotations' to the glossary

2018-05-14 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Maybe we can consider backporting this to 3.7? Andrés, if you think it makes sense, you can cherry-pick the commit and open a PR against 3.7 branch. -- ___ Python tracker

[issue33440] Possible lazy import opportunities in `pathlib`

2018-05-14 Thread Adam Forsyth
Change by Adam Forsyth : -- keywords: +patch pull_requests: +6505 stage: -> patch review ___ Python tracker ___

[issue33346] Syntax error with async generator inside dictionary comprehension

2018-05-14 Thread Guido van Rossum
Guido van Rossum added the comment: > [f: [x async for x in f(x)] for f in fs] Did you mean {} for the outer brackets intead of []? I think it is reasonable that if the presence of 'async for' or 'await' in a comprehension makes it async, then this should also apply if that

  1   2   3   >