[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 ___

[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 ___

[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

[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

[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 ___ ___

[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:

[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

[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)

[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)

[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:

[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 ___ ___

[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 ___ ___

[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 --

[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 ___

[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' : -- pull_requests: +12658 stage: resolved -> patch review ___ 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: 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

[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,

[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

[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

[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 ___

[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)

[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 --

[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

[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

[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

[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

[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

[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 ___

[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

[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 ___

[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

[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' : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ 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 --

[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

[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]

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

2019-04-08 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thank you for the suggestion. I believe this is a duplicate of issue 32884. -- nosy: +cheryl.sabella resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Adding the ability for getpass to print asterisks when passowrd

[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,

[issue22377] %Z in strptime doesn't match EST and others

2019-04-08 Thread Alex LordThorsen
Alex LordThorsen added the comment: This behavior is currently unchanged and the docs still state that `EST` is an acceptable value. ``` >>> datetime.strptime("2019-01-28 18:54:45 EST", "%Y-%m-%d %H:%M:%S %Z") Traceback (most recent call last): File "", line 1, in File

[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

[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 = {

[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

[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.

[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 Brett Cannon
Brett Cannon added the comment: Could you explain a bit more, Victor, about why you want to avoid importing hashlib and OpenSSL so much? -- nosy: +brett.cannon ___ Python tracker

[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

[issue35907] Unnecessary URL scheme exists to allow file:// reading file in urllib

2019-04-08 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This issue seems to have been assigned CVE-2019-9948 (https://nvd.nist.gov/vuln/detail/CVE-2019-9948) as noted in https://github.com/python/cpython/pull/11842#issuecomment-480930608 -- nosy: +xtreak ___

[issue36560] test_functools leaks randomly 1 memory block

2019-04-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ 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: 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

[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

[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:

[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 : -- keywords: +patch pull_requests: +12656 stage: -> patch review ___ Python tracker ___ ___

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

2019-04-08 Thread STINNER Victor
New submission from STINNER Victor : Disable the compilation of the built-in _abc module. For example, on Python 3.7 apply the following patch: diff --git a/Modules/Setup.dist b/Modules/Setup.dist index 8cc6bf0540..4015527b32 100644 --- a/Modules/Setup.dist +++ b/Modules/Setup.dist @@ -114,7

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

2019-04-08 Thread Paul Ganssle
Change by Paul Ganssle : -- keywords: +patch pull_requests: +12655 stage: -> patch review ___ Python tracker ___ ___

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

2019-04-08 Thread Paul Ganssle
New submission from Paul Ganssle : When reviewing PR 12020 fixing an infinite loop in the e-mail module, I noticed that a *different* infinite loop is documented with a "# XXX" comment on line 2724:

[issue36554] unittest.TestCase: "subTest" cannot be used together with "debug"

2019-04-08 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- resolution: -> duplicate superseder: -> unittest subTests() fails when called from debug() ___ Python tracker ___

[issue36554] unittest.TestCase: "subTest" cannot be used together with "debug"

2019-04-08 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks, just confirmed the commit fix with the given file. -- ___ Python tracker ___

[issue36554] unittest.TestCase: "subTest" cannot be used together with "debug"

2019-04-08 Thread Dieter Maurer
Dieter Maurer added the comment: This is a duplicate of issue34900 -- stage: -> resolved status: open -> closed Added file: https://bugs.python.org/file48249/utest.py ___ Python tracker

[issue36563] pdbrc is read twice if current directory is the home directory

2019-04-08 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +12654 stage: -> patch review ___ Python tracker ___ ___

[issue36563] pdbrc is read twice if current directory is the home directory

2019-04-08 Thread daniel hahler
New submission from daniel hahler : If $HOME is $PWD, .pdbrc is read twice. This confused me when seeing intentional errors from there twice during tests. It should be only read once. -- components: +Library (Lib) title: pdbrc home twice -> pdbrc is read twice if current directory is

[issue36563] pdbrc home twice

2019-04-08 Thread daniel hahler
Change by daniel hahler : -- nosy: blueyed priority: normal severity: normal status: open title: pdbrc home twice ___ Python tracker ___

[issue36554] unittest.TestCase: "subTest" cannot be used together with "debug"

2019-04-08 Thread Dieter Maurer
Change by Dieter Maurer : Added file: https://bugs.python.org/file48248/utest.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35422] misleading error message from ssl.get_server_certificate() when bad port

2019-04-08 Thread Ruluk
Ruluk added the comment: I would still validate the error somewhere, maybe before reaching the OpenSSL library, because that same error is also shown for other cases. E.g: http_connection = HTTPSConnection("localhost") http_connection.request("POST", my_url, my_body, my_headers) The use of

[issue36561] Python argparse doesn't work in the presence of my custom module

2019-04-08 Thread Peter Otten
Peter Otten <__pete...@web.de> added the comment: That's a bug in your code. You create another ArgumentParser in the toplevel code of preprocess.py. When this module is imported directly or indirectly your script will us this parser to parse the command line first. Minimal example: $ cat

[issue36561] Python argparse doesn't work in the presence of my custom module

2019-04-08 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: test.py shown in msg339649 accepts only --data_type DATA_TYPE. Running test.py without import and the non-existent flag would show all the options present like the below I am using from the repo you have shared. You might ./python.exe

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

2019-04-08 Thread Joao Paulo
New submission from Joao Paulo : I'm trying to build a python module in C++ using the Python C API and the code is attached. The problem is when I run my_module.runTester() in PyRun_SimpleString. I get the following error message: SystemError: Bad call flags in PyCFunction_Call.

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

2019-04-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Why do we care about this particular import? It doesn't see slow in any way. 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). Otherwise, it is a false optimization.

[issue36560] test_functools leaks randomly 1 memory block

2019-04-08 Thread STINNER Victor
STINNER Victor added the comment: Current bisection progress: I'm able to reproduce a failure with attached test_functools.py (211 lines) using: ./python -m test -F -j5 -R 3:3 test_functools It takes between 4 and 200 runs to reproduce the failure, I don't understand what triggers the

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

2019-04-08 Thread cagney
cagney added the comment: I think the only pragmatic solution here is to add an optional parameter to logging.basicConfig() that specifies that the logger should use a single global lock; and then start documenting that thread locks and fork() don't work well together. And note that this

[issue36561] Python argparse doesn't work in the presence of my custom module

2019-04-08 Thread JP Zhang
JP Zhang added the comment: >>>python test.py --num_epochs 200 usage: test.py [-h] [--data_type DATA_TYPE] test.py: error: unrecognized arguments: --num_epochs 200 I have a created a colab share link. You can check: https://colab.research.google.com/drive/1TUvt4CCv2d43GD1ccmuRNBJlkbUPXN8Z

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2019-04-08 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36558] Change time.mktime() return type from float to int?

2019-04-08 Thread Paul Ganssle
Paul Ganssle added the comment: I would say that the natural output of mktime is indeed an integer, but I can't say off the top of my head what "compatibility" refers to here, so per the principle of Chesterton's fence, without more research or historical context I'd say the default should

[issue36561] Python argparse doesn't work in the presence of my custom module

2019-04-08 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Can you please post the traceback you are getting and how you are running the script from command line? The custom module has third party dependencies like numpy so it will be helpful if you can attach a reproducer without dependencies to see if

[issue36561] Python argparse doesn't work in the presence of my custom module

2019-04-08 Thread JP Zhang
New submission from JP Zhang : Github repo for reproducing: https://github.com/zjplab/gc-mc-pytorch/tree/bug, test.py. In the presence of my custom data_loader, it will error as unrecognized argument. But without importing it(comment it out) everything is just fine. -- components:

[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-04-08 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- pull_requests: +12653 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36557] Python (Launcher)3.7.3 CMDLine install/uninstall

2019-04-08 Thread Steve Dower
Steve Dower added the comment: Pass /passive to have it automatically close at the end, or /quiet to avoid popping up a window at all. Can you clarify what you mean by launcher? There are a couple different things you could be talking about and I don't want to give you the wrong answer.

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2019-04-08 Thread Zackery Spytz
Zackery Spytz added the comment: I've created a PR based on Martin Panter's patch. -- components: +Extension Modules -Library (Lib) nosy: +ZackerySpytz versions: -Python 3.6 ___ Python tracker

[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2019-04-08 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +12652 stage: -> patch review ___ Python tracker ___ ___

[issue36560] test_functools leaks randomly 1 memory block

2019-04-08 Thread STINNER Victor
New submission from STINNER Victor : Sometimes, each run of test_functools leaks exactly 1 memory block, even when the whole test is "re-run in verbose mode". Sometimes, it doesn't leak. https://buildbot.python.org/all/#/builders/80/builds/550 test_functools leaked [1, 1, 1] memory blocks,

[issue18372] _Pickler_New() doesn't call PyObject_GC_Track(self)

2019-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Tracking objects that do not need this will just add work to the garbage collector. Not all instances of trackable types should be tracked, for example the empty tuple and some dicts are not tracked. >>> gc.is_tracked(()) False >>> gc.is_tracked((1, 2))

[issue36414] Multiple test failures in GCC and Clang optional builds on Travis CI

2019-04-08 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: https://github.com/python/cpython/pull/12708 that seems to fix similar issue (issue36544) for Ubuntu that helps in making Mac OS build green again. Successful build : https://travis-ci.org/python/cpython/jobs/516821454 -- nosy: +xdegaye

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

2019-04-08 Thread Nick Coghlan
Nick Coghlan 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 :) While length_hint is allowed to be somewhat inaccurate, we do expect it to be

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

2019-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: It's a rather oldish gcc in this case. (4.8.4 + whatever ubuntu patches). Here's a full (successful) build log (including the combinations of flags) after patching:

[issue35416] Fix potential resource warnings in distutils

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

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

2019-04-08 Thread STINNER Victor
STINNER Victor added the comment: In the past, some developers complained when an import has been removed in a stdlib module. I vaguely recall code using "import os" to get the "errno" module from "os.errno". That's "What's New in Python 3.7" contains: "Several undocumented internal imports

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

2019-04-08 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +12651 stage: -> patch review ___ Python tracker ___ ___

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

2019-04-08 Thread STINNER Victor
New submission from STINNER Victor : Currently, when the random module is imported, the hashlib module is always imported which loads the OpenSSL library, whereas hashlib is only needed when a Random() instance is created with a string seed. For example, "rnd = random.Random()" and "rnd =

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

2019-04-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > That is a one-off cost for the __length_hint__ of the range object > specifically. Objects with a known length (lists, sets, tuples) would not have that overhead. That seems incorrect. This is not unique of range objects as it affects also objects

[issue35416] Fix potential resource warnings in distutils

2019-04-08 Thread Inada Naoki
Inada Naoki added the comment: New changeset 58721a903074d28151d008d8990c98fc31d1e798 by Inada Naoki (Mickaël Schoentgen) in branch 'master': bpo-35416: fix potential resource warnings in distutils (GH-10918) https://github.com/python/cpython/commit/58721a903074d28151d008d8990c98fc31d1e798

[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/msg339634 ___ Python tracker ___ ___ Python-bugs-list

[issue15903] Make rawiobase_read() read directly to bytes object

2019-04-08 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-04-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > That is a one-off cost for the __length_hint__ of the range object > specifically. Objects with a known length (lists, sets, tuples) would not have that overhead. That seems incorrect. This is not unique of range objects as it affects also objects

[issue36558] Change time.mktime() return type from float to int?

2019-04-08 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +12650 stage: -> patch review ___ Python tracker ___ ___

[issue15994] memoryview to freed memory can cause segfault

2019-04-08 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

  1   2   >