[issue38532] Missing decrefs in the _ctypes module

2020-01-03 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset aa3efea9c5f4d25afc3fa4cfd5e6d789943893c9 by T. Wouters (Miss Islington (bot)) in branch '3.8': bpo-38532: Add missing decrefs in PyCFuncPtr_FromDll() (GH-17811) https://github.com/python/cpython/commit/aa3efea9c5f4d25afc3fa4cfd5e6d789943893c9

[issue39193] Out-of-bound write in ceval.c:_PyEval_EvalFrameDefault

2020-01-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I concur with Antoine, the interpreter does not have any contract around crafting incorrect bytecode and evaluating it (and it will not since by definition the bytecode created by the interpreter is (should) be correct and any extra check in this

[issue38532] Missing decrefs in the _ctypes module

2020-01-03 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset e02ab59fdffa0bb841182c30ef1355c89578d945 by T. Wouters (Zackery Spytz) in branch 'master': bpo-38532: Add missing decrefs in PyCFuncPtr_FromDll() (GH-16857) https://github.com/python/cpython/commit/e02ab59fdffa0bb841182c30ef1355c89578d945

[issue38532] Missing decrefs in the _ctypes module

2020-01-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +17238 pull_request: https://github.com/python/cpython/pull/17811 ___ Python tracker ___

[issue39201] Threading.timer leaks memory in 3.8.0/3.8.1

2020-01-03 Thread Mathias
New submission from Mathias : Hi, I think there is an issue with memory allocating with threading.Timer in 3.8.0/3.8.1. When I run the attached code in Python 3.7.3 I get a memory consumption of approx. 10 MB. If I run the same code with python 3.8.0 or 3.8.1, it keeps consuming memory

[issue39199] Improve the AST documentation

2020-01-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +17239 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17812 ___ Python tracker

[issue39199] Improve the AST documentation

2020-01-03 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : The AST docs need some love as they can be a bit obscure to someone new to the module. Improvements to be considered in this issue: * Document all available nodes (as of 3.8 and not deprecated ones). This helps to know what classes to consider when

[issue39200] Inaccurate TypeError message for `range` without argument

2020-01-03 Thread Julien Férard
New submission from Julien Férard : When passing no argument to `range`, the error message states that (exactly) one argument is expected. Actual: Python 3.9.0a0 (heads/master:d395209653, Jan 3 2020, 11:37:03) [GCC 7.4.0] on linux Type "help", "copyright", "credits" or "license"

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2020-01-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: Sorry, I have updated it now: https://github.com/python/cpython/pull/17774 (I had pushed to a different branch earlier and it didn't reflect in my PR) -- ___ Python tracker

[issue39193] Out-of-bound write in ceval.c:_PyEval_EvalFrameDefault

2020-01-03 Thread ggbang
ggbang added the comment: hello, if a crafting deliberately incorrect bytecode could control the eip of Python interpreter, it's the scope to fix? thx. -- ___ Python tracker

[issue39201] Threading.timer leaks memory in 3.8.0/3.8.1

2020-01-03 Thread Matthew Smith
Matthew Smith added the comment: This issue also affects me, pyth. I tried it out with various combinations of sleep, and durations of tasks, but what I noticed is that threading_shutdown_locks continues to grow at each iteration. for i in range(10): for j in range(10):

[issue39183] Text divided in two strings due to wrong formatting

2020-01-03 Thread Rafael Fontenelle
Rafael Fontenelle added the comment: Fix confirmed, closing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39193] Out-of-bound write in ceval.c:_PyEval_EvalFrameDefault

2020-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think so. I'll let other confirm. -- nosy: +christian.heimes, vstinner ___ Python tracker ___

[issue39201] Threading.timer leaks memory in 3.8.0/3.8.1

2020-01-03 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Please include the script as an attachment or text so that it will be easy to view them. The script as below from the attachment : import threading import time import tracemalloc def callback(): pass tracemalloc.start() for i in

[issue38532] Missing decrefs in the _ctypes module

2020-01-03 Thread Thomas Wouters
Change by Thomas Wouters : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue39193] Out-of-bound write in ceval.c:_PyEval_EvalFrameDefault

2020-01-03 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39193] Out-of-bound write in ceval.c:_PyEval_EvalFrameDefault

2020-01-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems what you're saying is that one can crash Python by crafting deliberately incorrect bytecode. If so, then I'm afraid it's something we won't consider fixing. -- nosy: +pitrou ___ Python tracker

[issue39200] Inaccurate TypeError message for `range` without argument

2020-01-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +17240 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17813 ___ Python tracker

[issue39203] python3 time module misses attributes in Mac installers

2020-01-03 Thread Jason Li
New submission from Jason Li : The issue: AttributeError: module 'time' has no attribute 'clock_gettime'. It probably missed other attributes as well. The problem only appeared with using installers to install python. While Homebrew installed python does not have the issue. The issue

[issue39158] ast.literal_eval() doesn't support empty sets

2020-01-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > The function literal_eval is not safe anymore as the constructor can be > intercepted: Well, actually it can also be done with any other builtin via the same trick, so this is no different but is only slightly more obvious that it can be done. I

[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-01-03 Thread Steve Dower
Steve Dower added the comment: > It looks like there has been a regression in the fix for this issue. You're right. Care to create a pull request to fix it? -- ___ Python tracker

[issue39202] Python shelve __del__ ignored exception

2020-01-03 Thread Ilya
New submission from Ilya : I'm using my own implementation of the memoize by shelve module. In the attachment, there are 2 simple test cases which pass but the console there are a lot of messages like that: Exception ignored in: Traceback (most recent call last): File

[issue39200] Inaccurate TypeError message for `range` without argument

2020-01-03 Thread Dong-hee Na
Dong-hee Na added the comment: I noticed that min/max builtin function also has the same problem. For example, PyPy raise TypeError as TypeError: max() expects at least one argument. PR-17814 is an update patch for this. I suggest changing the title to be "Fix inaccurate TypeError messages

[issue39200] Inaccurate TypeError message for `range` without argument

2020-01-03 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39201] Threading.timer leaks memory in 3.8.0/3.8.1

2020-01-03 Thread Adam
Adam added the comment: I filed a bug for this a few weeks ago, and then found another ticket about the same issue before: https://bugs.python.org/issue37788 My ticket: https://bugs.python.org/issue39074 The memory leak was from a change introduced about 6 months ago:

[issue39200] Fix inaccurate TypeError messages when calling with insufficient arguments

2020-01-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- title: Inaccurate TypeError message for `range` without argument -> Fix inaccurate TypeError messages when calling with insufficient arguments ___ Python tracker

[issue39184] Many command execution functions are not raising auditing events

2020-01-03 Thread Steve Dower
Steve Dower added the comment: Agreed, we should add events for all of these. They can go into the next 3.8 release. Ideally, the lowest level operations (typically os module) should raise events. Where it's convenient to also audit operations at a higher level (shutil, subprocess, etc.)

[issue39204] Automate adding Type Annotations to Documentation

2020-01-03 Thread Cooper Lees
Change by Cooper Lees : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39204] Automate adding Type Annotations to Documentation

2020-01-03 Thread Cooper Lees
New submission from Cooper Lees : What are people's thoughts on automating adding type annotations to documentation now that Typeshed is mature and Python 2 is EOL? (Let us never speak of comment annotations) -- components: Library (Lib) messages: 359249 nosy: cooperlees priority:

[issue39158] ast.literal_eval() doesn't support empty sets

2020-01-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The function literal_eval is not safe anymore as the constructor can be intercepted: >>> import builtins >>> def evil_code(*args): ... print("Something evil") ... >>> builtins.set = evil_code >>> ast.literal_eval("set()") Something evil I think

[issue39158] ast.literal_eval() doesn't support empty sets

2020-01-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The function literal_eval is not safe anymore as the constructor can be intercepted: >>> import builtins >>> def evil_code(*args): ... print("Something evil") ... >>> builtins.set = evil_code >>> import ast >>> ast.literSomething evil

[issue39158] ast.literal_eval() doesn't support empty sets

2020-01-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg359250 ___ Python tracker ___ ___ Python-bugs-list

[issue39200] Inaccurate TypeError message for `range` without argument

2020-01-03 Thread SilentGhost
Change by SilentGhost : -- versions: -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14132] SEO Services Development & PHP development

2020-01-03 Thread joony kohe
joony kohe added the comment: Hi Marie and many thanks for your great interview of Rick Hanson regarding inner strength. Will certainly be watching the interview again. You did a wonderful job I thought of guiding Rick from stepping stone to stepping stone through some of his writing. You

[issue39201] Threading.timer leaks memory in 3.8.0/3.8.1

2020-01-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39200] Inaccurate TypeError message for `range` without argument

2020-01-03 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +17241 pull_request: https://github.com/python/cpython/pull/17814 ___ Python tracker ___

[issue39182] sys.addaudithook(hook) loops indefinitely on mismatch for hook

2020-01-03 Thread Steve Dower
Steve Dower added the comment: I think this is specific to the interactive prompt. Under normal circumstances, any error in calling the hook at the point where an event is being audited (which is immediate when using interactive mode) needs to propagate. Probably the best way to handle it

[issue39158] ast.literal_eval() doesn't support empty sets

2020-01-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am re-closing the issue as I don't think is worth complicating the docs for this edge case and the security concern is non existent. Apologies for the noise. If someone feels strongly about the documentation, they can reopen the issue. --

[issue39203] python3 time module misses attributes in Mac installers

2020-01-03 Thread Ned Deily
Ned Deily added the comment: This is a duplicate of Issue34597. The Pythons provided by the python.org macOS installers are built to run on a range of operating system versions. The current practice is to build installers that work on any macOS version from 10.9 on. To safely provide that

[issue39205] Hang when interpreter exits after ProcessPoolExecutor.shutdown(wait=False)

2020-01-03 Thread Brian Quinlan
New submission from Brian Quinlan : ``` from concurrent.futures import ProcessPoolExecutor import time t = ProcessPoolExecutor(max_workers=3) t.map(time.sleep, [1,2,3]) t.shutdown(wait=False) ``` Results in this exception and then a hang (i.e. Python doesn't terminate): ``` Exception in

[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure

2020-01-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Your code is buggy because 'cursor' is not a dict or anything like one. On the other hand, adding retval to capture and return the return from Widget.configure looks correct. (And it will not prevent kw.update('cursor') from raising. The current code is

[issue6143] IDLE - clear and restart the shell window

2020-01-03 Thread ThePokestarFan
ThePokestarFan added the comment: I would really like to be able to clear IDLE when using it. I do not understand how hard it can be just to clear a window. -- nosy: +ThePokestarFan ___ Python tracker

[issue31242] Add SSLContext.set_verify_callback()

2020-01-03 Thread Kent Watsen
Kent Watsen added the comment: Very much needing this! My situation is a mutli-tenant asynchio-based server whereby each tenant is able to configure other clients that can connect. The current strategy requires all certs to be known up-front that, for now, necessitates a painful restart

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2020-01-03 Thread David Bolen
David Bolen added the comment: Ok, I can confirm that the updated PR 17774 test passes under Windows (and still cleans up after itself). -- ___ Python tracker ___

[issue39207] concurrent.futures.ProcessPoolExecutor does not properly reap jobs and spawns too many workers

2020-01-03 Thread Yusef Shaban
New submission from Yusef Shaban : This came up from a supporting library but the actual issue is within concurrent.futures.ProcessPool. Discussion can be found at https://github.com/agronholm/apscheduler/issues/414 ProcessPoolExecutor does not properly spin down and spin up new processes.

[issue39141] IDLE: system clear function returns 256 on Mac OS Catalina

2020-01-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Among other problems, the patch for #11820 uses a unix-only tcl function. In non-shell editor and output windows, Select all (Control-A at least on windows) Delete (or Backspace, or Cut to clipboard, ^X on Windows) clears the window. Delete does not work

[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure

2020-01-03 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +17242 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17815 ___ Python tracker ___

[issue31242] Add SSLContext.set_verify_callback()

2020-01-03 Thread Kent Watsen
Change by Kent Watsen : -- nosy: +kwatsen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39206] Modulefinder does not consider source file encoding

2020-01-03 Thread Luciana
Luciana added the comment: I just wanted to comment here that I am looking into this. -- nosy: +lucianamarques ___ Python tracker ___

[issue14132] Redirect is not working correctly in urllib2

2020-01-03 Thread Senthil Kumaran
Change by Senthil Kumaran : -- nosy: -Joony898i title: SEO Services Development & PHP development -> Redirect is not working correctly in urllib2 ___ Python tracker ___

[issue6143] IDLE - clear and restart the shell window

2020-01-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: #17632 was instead closed as a duplicate of this issue. The (editor) Run menu now has a custom run item. 'Clear shell before restart' could be added as an alternative to 'no restart'. But this would be a separate issue. -- title: IDLE - an

[issue39208] PDB pm function throws exception without sys import

2020-01-03 Thread Zachary Ware
Zachary Ware added the comment: Try varying the order of what you're doing there: >>> import pdb, sys >>> pdb.pm() Traceback ... >>> pdb.pm() See https://docs.python.org/3/library/sys.html#sys.last_traceback, which notes that this attribute is not always present (it won't be if no

[issue14132] Redirect is not working correctly in urllib2

2020-01-03 Thread Ned Deily
Change by Ned Deily : -- components: +Library (Lib) -XML type: performance -> behavior ___ Python tracker ___ ___ Python-bugs-list

[issue14132] Redirect is not working correctly in urllib2

2020-01-03 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg359255 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39206] Modulefinder does not consider source file encoding

2020-01-03 Thread Nicholas Feix
New submission from Nicholas Feix : The modulefinder._find_module(...) function returns file objects text mode for source modules using the system encoding. ModuleFinder.load_module(...) can run into decoding issues when the source file encoding does not match the system default. The prior

[issue39152] Faulty override of tkinter.Misc.configure in tkinter.ttk.Scale.configure

2020-01-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Giovanni, a Python exception is a intended exit. A crash is when the program either hangs or stops unintentionally without a python exception but with an OS error message. I checked and Scale is the only ttk widget that overrides configure. --

[issue39208] PDB pm function throws exception without sys import

2020-01-03 Thread ThePokestarFan
New submission from ThePokestarFan : When testing PDB in python 3.8.1, PDB throws an exception when I call the pm() function in PDB without importing system. [Fresh session] >>> import pdb >>> pdb.pm() Traceback (most recent call last): File "", line 1, in File

[issue27657] urlparse fails if the path is numeric

2020-01-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: @James - Originally the issue was considered a revert and the versions were set for the merge, but I certainly recognize the problem when parsing can fail for simple URLs like `localhost:8000` which is very common. Another developer had raised the concerns

[issue39154] "utf8" not always a synonym for "utf-8" in lib2to3

2020-01-03 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +benjamin.peterson stage: -> test needed versions: +Python 3.9 -Python 3.6 ___ Python tracker ___

[issue39165] Completeness and symmetry in RE, avoid `findall(...)[0]`

2020-01-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I currently agree with Serhiy and am not persuaded that either new function is needed. 1. findalliter: For 3.0, I might have been more aggressive than we were in turning list-returning functions into iterators, as done with map, etc. But the collective

[issue39174] unicodedata.normalize failing with NFD and NFKD for some characters in Python3

2020-01-03 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list

[issue39169] TypeError: 'int' object is not callable if the signal handler is SIG_IGN

2020-01-03 Thread Terry J. Reedy
Change by Terry J. Reedy : -- stage: -> test needed versions: +Python 3.9 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list

[issue34946] inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used

2020-01-03 Thread anthony shaw
anthony shaw added the comment: Resolved by another bpo -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2020-01-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 5bba60290b4ac8c95ac46cfdaba5deee37be1fab by Senthil Kumaran in branch '2.7': bpo-27973 - Use test.support.temp_dir instead of NamedTemporaryFile for the (#17774)

[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-01-03 Thread Anthony Wee
Change by Anthony Wee : -- pull_requests: +17244 pull_request: https://github.com/python/cpython/pull/17818 ___ Python tracker ___

[issue39196] json fails to encode dictionary view types

2020-01-03 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39196] json fails to encode dictionary view types

2020-01-03 Thread Inada Naoki
Inada Naoki added the comment: If we support more types by default, user can not customize serialization of the type using `default` option. That's why we don't accept "any iterable" but only list and tuple. -- nosy: +inada.naoki ___ Python

[issue39179] pandas tz_convert() seems to report incorrect date conversion

2020-01-03 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> third party stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39182] sys.addaudithook(hook) loops indefinitely on mismatch for hook

2020-01-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I wrote too soon. Entering anything at the next line prints TypeError: 'int' object is not callable twice and a lot of IDLE specific stuff, and not another prompt. I have to restart the remote execution process. --

[issue39206] Modulefinder does not consider source file encoding

2020-01-03 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +17243 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17817 ___ Python tracker ___

[issue27973] urllib.urlretrieve() fails on second ftp transfer

2020-01-03 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +17245 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/17819 ___ Python tracker ___

[issue27657] urlparse fails if the path is numeric

2020-01-03 Thread James Brown
James Brown added the comment: This is a surprising change to put in a minor release. This change totally changes the semantics of parsing scheme-less URLs with ports in them and ended up breaking a significant amount of my software. It turns out that urls like `example.com:80` are more

[issue39204] Automate adding Type Annotations to Documentation

2020-01-03 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am not sure if it was discussed earlier there was a discussion on adding PEP 570 syntax across the docs. This comes at the cost of keeping the types updated. There was also a poc over expanding the signature to view the PEP 570 syntax as needed.

[issue39204] Automate adding Type Annotations to Documentation

2020-01-03 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Some discussion on similar proposal earlier : https://mail.python.org/pipermail/python-dev/2017-November/150234.html -- ___ Python tracker

[issue39204] Automate adding Type Annotations to Documentation

2020-01-03 Thread Guido van Rossum
Guido van Rossum added the comment: This was never blocked on Python 2 (at best we'd do this for the most recent Python 3 release anyway). I expect it will be quite complex to get the quality of the implementation high enough, but I suppose someone should start with a prototype. I'm not

[issue39197] argparse: title and description for mutually exclusive arg groups

2020-01-03 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +rhettinger title: Support the title and description arguments for mutually exclusive argument groups -> argparse: title and description for mutually exclusive arg groups ___ Python tracker

[issue39207] concurrent.futures.ProcessPoolExecutor does not properly reap jobs and spawns too many workers

2020-01-03 Thread Inada Naoki
Inada Naoki added the comment: > ProcessPoolExecutor does not properly spin down and spin up new processes. It is because Process "Pool" is for reusing processes. If you don't want to reuse process, you can use the Process.

[issue39146] too much memory consumption in re.compile unicode

2020-01-03 Thread Andy Lester
Change by Andy Lester : -- components: +Regular Expressions -Library (Lib) nosy: +ezio.melotti, mrabarnett ___ Python tracker ___

[issue39182] sys.addaudithook(hook) loops indefinitely on mismatch for hook

2020-01-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: > I think this is specific to the interactive prompt. In IDLE, which simulates interactive mode with repeated 'exec(user_code, namespace)', no error is printed, let alone a loop. >>> import sys >>> sys.addaudithook(0) >>> -- nosy: +terry.reedy