[issue36560] test_functools leaks randomly 1 memory block

2019-04-08 Thread STINNER Victor
STINNER Victor added the comment: The issue comes maybe from the complex code in Lib/test/libregrtest/refleak.py to handle the ABC cache: abcs = {} for abc in [getattr(collections.abc, a) for a in collections.abc.__all__]: if not isabstract(abc): continue

[issue36551] Optimize list comprehensions with preallocate size and protect against overflow

2019-04-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: 12718-5f06333a4e49.json.gz == Performance version: 0.7.0 Report on macOS-10.14.4-x86_64-i386-64bit Number of logical CPUs: 8 Start date: 2019-04-08 19:40:57.104845 End date: 2019-04-08 20:02:37.392894

[issue36562] Can't call a method from a module built in Python C API

2019-04-08 Thread Joao Paulo
Joao Paulo added the comment: The following modifications solved the problem: static PyMethodDef pyModuleMethods[] = { { "runTester", (PyCFunction)runTesterFunc, METH_VARARGS | METH_KEYWORDS, "Foo Boo." }, { NULL, NULL, 0, NULL } }; static struct PyModuleDef MyModule = {

[issue36564] Infinite loop with short maximum line lengths in EmailPolicy

2019-04-08 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36560] test_functools leaks randomly 1 memory block

2019-04-08 Thread STINNER Victor
STINNER Victor added the comment: Some progress. I'm now able to reproduce the issue with attached test_functools2.py (103 lines, a single test method): $ cp (...)test_functools2.py Lib/test/ $ ./configure -C --with-pydebug CFLAGS=-O0 $ make $ ./python -m test -F -j5 -R 3:3 test_functools2

[issue13947] gdbm reorganize() leaves hanging file descriptor

2019-04-08 Thread sds
sds added the comment: Upstream claims that this is fixed by http://git.gnu.org.ua/cgit/gdbm.git/commit/?id=a0d6c1a8 -- ___ Python tracker ___

[issue36559] "import random" should import hashlib on demand (nor load OpenSSL)

2019-04-08 Thread STINNER Victor
STINNER Victor added the comment: Raymond: > Why do we care about this particular import? It doesn't see slow in any way. I ran a benchmark: $ ./python -m perf command -o ref.json -v -- ./python -c 'import random' $ # apply patch $ ./python -m perf command -o patch.json -v -- ./python -c

[issue36559] "import random" should import hashlib on demand (nor load OpenSSL)

2019-04-08 Thread STINNER Victor
STINNER Victor added the comment: Raymond: > In general, we don't do deferred imports unless there is a compelling reason > (i.e. it is very slow or it is sometimes unavailable). While I was working on adding OpenSSL 1.1.1 to Python 3.4, my _hashopenssl module was broken. In that case,

[issue24565] the f_lineno getter is broken

2019-04-08 Thread Xavier de Gaye
Xavier de Gaye added the comment: Fixed a bug in the implementation of PR 12419 while running the coverage.py test suite: f_lineno must be valid upon 'call' trace events. The confusion stems from the reason why until now we have prevented line jumps from 'call' trace events, see below.

[issue36541] Make lib2to3 grammar more closely match Python

2019-04-08 Thread Tim Hatch
Tim Hatch added the comment: jreese reminded me of pep570, which will make more grammar changes. I'm open to the idea of replacing the grammar with the live one, plus porting the 2isms forward like print, eval, except with comma. My sincere hope is that everyone that depends on this

[issue36566] Support password masking in getpass.getpass()

2019-04-08 Thread Steven Vascellaro
New submission from Steven Vascellaro : Support password masking in getpass.getpass() Currently, getpass.getpass() hides all user input when entering a password. This can throw off non-Unix users who are used to passwords being masked with asterisks *. This has led some users to write their

[issue17561] Add socket.bind_socket() convenience function

2019-04-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch committed as of: https://github.com/python/cpython/commit/eb7e29f2a9d075accc1ab3faf3612ac44f5e2183 For posterity, since the API evolved since the original proposal (as per PR review/suggestions), this is the final incarnation: # IPv4 only

[issue17561] Add socket.bind_socket() convenience function

2019-04-08 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- pull_requests: +12658 stage: resolved -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue31512] Add non-elevated symlink support for dev mode Windows 10

2019-04-08 Thread Eryk Sun
Eryk Sun added the comment: :ping: It seems this was ready to be merged a while ago. -- ___ Python tracker ___ ___

[issue33456] site.py: by default, a virtual environment is *not* isolated from the system-level site-packages directories

2019-04-08 Thread Cheryl Sabella
Change by Cheryl Sabella : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +cheryl.sabella, docs@python, vinay.sajip versions: -Python 3.6 ___ Python tracker

[issue35934] Add socket.create_server() utility function

2019-04-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset eb7e29f2a9d075accc1ab3faf3612ac44f5e2183 by Giampaolo Rodola in branch 'master': bpo-35934: Add socket.create_server() utility function (GH-11784) https://github.com/python/cpython/commit/eb7e29f2a9d075accc1ab3faf3612ac44f5e2183 --

[issue17561] Add socket.bind_socket() convenience function

2019-04-08 Thread STINNER Victor
STINNER Victor added the comment: The change broke multiple buildbots. Example: https://buildbot.python.org/all/#builders/16/builds/2625 Traceback (most recent call last): File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/test/_test_multiprocessing.py", line 4377, in

[issue36568] Typo in socket.CAN_RAW_FD_FRAMES library documentation

2019-04-08 Thread Carl Cerecke
New submission from Carl Cerecke : https://docs.python.org/3/library/socket.html#socket.CAN_RAW_FD_FRAMES The wording "...however, you one must accept..." doesn't make sense. I think the "you one" should be "your application", but I'm not sure. -- assignee: docs@python components:

[issue17561] Add socket.bind_socket() convenience function

2019-04-08 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue26389] Expand traceback module API to accept just an exception as an argument

2019-04-08 Thread Cheryl Sabella
Cheryl Sabella added the comment: The last comment on the original PR for this issue was to wait until an API was decided upon before proceeding with creating a new PR. Bumping this issue to generate new discussion and hopefully reach concession on an API. -- nosy: +cheryl.sabella

[issue36565] Reference hunting (python3 -m test -R 3:3) doesn't work if the _abc module is missing

2019-04-08 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33601] [EASY DOC] Py_UTF8Mode is not documented

2019-04-08 Thread Cheryl Sabella
Change by Cheryl Sabella : -- assignee: docs@python -> Mariatta keywords: -patch nosy: +Mariatta stage: patch review -> needs patch type: -> enhancement ___ Python tracker

[issue19992] subprocess documentation not explicit about fileno()

2019-04-08 Thread Cheryl Sabella
Cheryl Sabella added the comment: Assigning to @Mariatta for the sprints. -- assignee: docs@python -> Mariatta nosy: +Mariatta, cheryl.sabella type: -> enhancement versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.5, Python 3.6 ___ Python

[issue24743] Make _PyTraceback_Add public

2019-04-08 Thread Cheryl Sabella
Change by Cheryl Sabella : -- stage: -> needs patch versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___

[issue36559] "import random" should import hashlib on demand (nor load OpenSSL)

2019-04-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: One other thought. This code has been present for over a decade. There is no evidence that anyone has ever wanted random to defer one of its imports. This seems like an invented problem. -- ___ Python tracker

[issue36478] backport of pickle fixes to Python 3.5.7 uses C99 for loops

2019-04-08 Thread Alexander Mohr
Alexander Mohr added the comment: I hit this as well in debian:jessie, and if I enabled -std=c99 I hit this issue: https://github.com/dvarrazzo/py-setproctitle/issues/62 -- nosy: +thehesiod ___ Python tracker

[issue25922] canceling a repair install breaks the ability to uninstall, repair, or re-install

2019-04-08 Thread Cheryl Sabella
Cheryl Sabella added the comment: Going to close this as the original OP didn't provide the additional information that was requested. Feel free to reopen if additional info is provided. -- nosy: +cheryl.sabella resolution: -> not a bug stage: -> resolved status: open -> closed

[issue28351] statistics.geometric_mean can enter infinite loop for Decimal inputs

2019-04-08 Thread Cheryl Sabella
Cheryl Sabella added the comment: The new version of geometric_mean does not enter an infinite loop for this example, so I am going to close this issue as out of date. -- nosy: +cheryl.sabella, rhettinger resolution: -> out of date stage: -> resolved status: open -> closed

[issue36565] Reference hunting (python3 -m test -R 3:3) doesn't work if the _abc module is missing

2019-04-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +12657 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36565] Reference hunting (python3 -m test -R 3:3) doesn't work if the _abc module is missing

2019-04-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 79b5d29041bd85ea3baa050b3fa2481344ea35c9 by Victor Stinner in branch 'master': bpo-36565: Fix libregrtest for Python without builtin _abc (GH-12733) https://github.com/python/cpython/commit/79b5d29041bd85ea3baa050b3fa2481344ea35c9 --

[issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential)

2019-04-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: The logging library has never guaranteed that it wouldn't interleave or duplicate buffered io output when fork() in involved. We should not start trying to claim that it does. Too complicated and fragile. It can't. Users who want that should implement

[issue35848] readinto is not a method on io.TextIOBase

2019-04-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 7b97ab35b28b761ab1253df427ee674b1a90f465 by Benjamin Peterson (Steve Palmer) in branch 'master': closes bpo-35848: Move all documentation regarding the readinto out of IOBase. (GH-11893)

[issue28043] Sane defaults for SSLContext options and ciphers

2019-04-08 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36551] Optimize list comprehensions with preallocate size and protect against overflow

2019-04-08 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg339665 ___ Python tracker ___ ___ Python-bugs-list

[issue36559] "import random" should import hashlib on demand (nor load OpenSSL)

2019-04-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: In general, deferred imports are code smell that should avoided unless really necessary. They create an on-going maintenance burden (there's a reason most modules don't do this and put their imports at the top). FWIW, a broken hashlib is a localized bug,

[issue1756] -m broken in trunk

2019-04-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Sorry, I accidentally referenced this BPO issue in my commit. -- ___ Python tracker ___ ___

[issue36567] DOC: manpage directive doesn't create hyperlink

2019-04-08 Thread Cheryl Sabella
New submission from Cheryl Sabella : The `manpage` directive in the docs is not creating a hyperlink to the Unix manual page. As of Sphinx 1.7, the `manpage` directive needs to have a `manpages_url` defined in the conf.py file. [1]

[issue36551] Optimize list comprehensions with preallocate size and protect against overflow

2019-04-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Here are the updated results for the benchmark suite. The previous results (unlinked from the issue to reduce noise) were against an old version of the master branch. 2019-04-08_13-08-master-58721a903074.json.gz

[issue36565] Reference hunting (python3 -m test -R 3:3) doesn't work if the _abc module is missing

2019-04-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2368d86ed1249505b10561e005fc57f4884619c1 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-36565: Fix libregrtest for Python without builtin _abc (GH-12733) (GH-12734)

[issue36568] Typo in socket.CAN_RAW_FD_FRAMES library documentation

2019-04-08 Thread Carl Cerecke
Carl Cerecke added the comment: See section 4.1.5 at https://www.kernel.org/doc/Documentation/networking/can.txt -- ___ Python tracker ___

[issue17561] Add socket.bind_socket() convenience function

2019-04-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 8702b67dad62a9084f6c1823dce10653743667c8 by Giampaolo Rodola in branch 'master': BPO-17561: set create_server backlog default to None (GH-12735) https://github.com/python/cpython/commit/8702b67dad62a9084f6c1823dce10653743667c8 --

[issue1756] -m broken in trunk

2019-04-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 8702b67dad62a9084f6c1823dce10653743667c8 by Giampaolo Rodola in branch 'master': BPO-17561: set create_server backlog default to None (GH-12735) https://github.com/python/cpython/commit/8702b67dad62a9084f6c1823dce10653743667c8 --

[issue35848] readinto is not a method on io.TextIOBase

2019-04-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +12659 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24743] Make _PyTraceback_Add public

2019-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks like a hack and is used only three time in the CPython code. What is your use case? How do you use it? -- ___ Python tracker ___

[issue35848] readinto is not a method on io.TextIOBase

2019-04-08 Thread miss-islington
miss-islington added the comment: New changeset 0a16bb15afec28f355bc28203b6b10610293f026 by Miss Islington (bot) in branch '3.7': closes bpo-35848: Move all documentation regarding the readinto out of IOBase. (GH-11893)

[issue24743] Make _PyTraceback_Add public

2019-04-08 Thread SilentGhost
Change by SilentGhost : -- nosy: +serhiy.storchaka versions: -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36569] @staticmethod seems to work with setUpClass, but docs say it shouldn't

2019-04-08 Thread Peter de Blanc
New submission from Peter de Blanc : According to unittest docs: https://docs.python.org/3.7/library/unittest.html#module-unittest `setUpClass is called with the class as the only argument and must be decorated as a classmethod()` and: `tearDownClass is called with the class as the only

[issue36551] Optimize list comprehensions with preallocate size and protect against overflow

2019-04-08 Thread anthony shaw
anthony shaw added the comment: Have just optimized some of the code and pushed another change as 69dce1c552. ran both master and 69dce1c552 using pyperformance with PGO: ➜ ~ python3.8 -m perf compare_to master.json 69dce1c552.json --table

[issue30134] BytesWarning is missing from the documents

2019-04-08 Thread Inada Naoki
Inada Naoki added the comment: New changeset d012d64b6a513e760abb6745f7f7ce5e6a31f274 by Inada Naoki (cocoatomo) in branch '2.7': bpo-30134: add an explanation of BytesWarning (GH-1249) https://github.com/python/cpython/commit/d012d64b6a513e760abb6745f7f7ce5e6a31f274 -- nosy:

[issue30134] BytesWarning is missing from the documents

2019-04-08 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36551] Optimize list comprehensions with preallocate size and protect against overflow

2019-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I was going to note that the algorithm Anthony has pursued here is the same > one we already use for the list constructor and list.extend(), but Inada-san > already pointed that out :) And that optimization looks questionable to me. I tried to reduce an

[issue30134] BytesWarning is missing from the documents

2019-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This PR was not ready to merge. Please address my and Martin's comments. -- ___ Python tracker ___

<    1   2