[issue35118] Add peek() or first() method in queue

2021-03-05 Thread Alexey Volkov
Alexey Volkov added the comment: >For Queue, I'm not sure I've ever seen any use case for peek. What do you >have in mind? I want to examine the first (oldest) element in queue and remove it if it's too old. The queue should not be modified unless the oldest element is too old.

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-03-05 Thread Nicholas Sim
Change by Nicholas Sim : -- pull_requests: +23538 pull_request: https://github.com/python/cpython/pull/24770 ___ Python tracker ___

[issue43415] Typo

2021-03-05 Thread Mariatta
Change by Mariatta : -- keywords: +easy, newcomer friendly ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43366] Unclosed bracket bug in code.interact prevents identifying syntax errors

2021-03-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +lys.nikolaou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43366] Unclosed bracket bug in code.interact prevents identifying syntax errors

2021-03-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > "If mode is 'repl', compile returns None to indicate that the code is > incomplete as is but might become valid if more lines (or maybe just more > code) were added" That would be ideal, but my guess is that is not trivial because even if you can

[issue43415] Typo

2021-03-05 Thread Andrei Kulakov
New submission from Andrei Kulakov : Typo (explicit|ly) in library/dataclasses.rst:139: 139: If :meth:`__hash__` is not explicit defined, or if it is set to ``None``, -- assignee: docs@python components: Documentation messages: 388193 nosy: andrei.avk, docs@python priority:

[issue43374] Apple refuses apps written in Python

2021-03-05 Thread Ned Deily
Change by Ned Deily : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43374] Apple refuses apps written in Python

2021-03-05 Thread Adrian
Adrian added the comment: Terry, After opening issues on this and other mailing lists (PyObjc) Apple validated our app without a comment. Adrian > On 5 Mar 2021, at 21:51, Terry J. Reedy wrote: > > > Terry J. Reedy added the comment: > > Adrian, when responding by email, please

[issue43413] tuple subclasses allow kwargs

2021-03-05 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43413] tuple subclasses allow kwargs

2021-03-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: In particular, [this commit](https://github.com/python/cpython/commit/0b5615926a573c19c887a701a2f7047f4fd06de6). -- ___ Python tracker ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2021-03-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: I suspect change in this issue led to issue43413. -- nosy: +jaraco ___ Python tracker ___ ___

[issue43413] tuple subclasses allow kwargs

2021-03-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: I suspect bpo-20186 is implicated. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43366] Unclosed bracket bug in code.interact prevents identifying syntax errors

2021-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Add compile(..., mode='repl')? "If mode is 'repl', compile returns None to indicate that the code is incomplete as is but might become valid if more lines (or maybe just more code) were added" Deprecate _maybe_compile (and stop trying to patch it).

[issue43414] os.get_terminal_size() should use file descriptors in Windows

2021-03-05 Thread Eryk Sun
New submission from Eryk Sun : Currently os.get_terminal_size() is hard coded to use the process standard handles in Windows. The function, however, is intended for arbitrary file descriptors, so should not be limited as follows: >>> f = open('conout$', 'w') >>>

[issue43413] tuple subclasses allow kwargs

2021-03-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: I see that changelog entry traces back to bpo-29695, but I don't believe it's relevant to this issue. -- ___ Python tracker ___

[issue43407] time.monotonic(): Docs imply comparing call N and call N+M is invalid for M>1

2021-03-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.6, Python 3.7 ___ Python tracker

[issue43407] time.monotonic(): Docs imply comparing call N and call N+M is invalid for M>1

2021-03-05 Thread miss-islington
miss-islington added the comment: New changeset 65f3a0d20c8198443c5c6cb44410114fe8c4bf4e by Miss Islington (bot) in branch '3.9': bpo-43407: Clarify comparisons of time.monotonic() et al results (GH-24757) https://github.com/python/cpython/commit/65f3a0d20c8198443c5c6cb44410114fe8c4bf4e

[issue43413] tuple subclasses allow kwargs

2021-03-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: To be abundantly clear, the downstream issue was a coding error, but the coding error was masked on Python 3.7+ when the subclass didn't reject the invalid usage. -- ___ Python tracker

[issue43413] tuple subclasses allow kwargs

2021-03-05 Thread Jason R. Coombs
New submission from Jason R. Coombs : While troubleshooting a strange problem (https://github.com/jaraco/keyring/issues/498) where a program worked on Python 3.7+ but failed on Python 3.6, I discovered a somewhat unintuitive behavior. On Python 3.7+, keyword arguments to tuple subclasses are

[issue43407] time.monotonic(): Docs imply comparing call N and call N+M is invalid for M>1

2021-03-05 Thread miss-islington
miss-islington added the comment: New changeset e12a9e2f62bea8ddc755e373f17adfbb2740b0b1 by Miss Islington (bot) in branch '3.8': bpo-43407: Clarify comparisons of time.monotonic() et al results (GH-24757) https://github.com/python/cpython/commit/e12a9e2f62bea8ddc755e373f17adfbb2740b0b1

[issue43366] Unclosed bracket bug in code.interact prevents identifying syntax errors

2021-03-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: In any case, the underlying problem here is the fact that codeop is deciding to continue asking for input of not depending on the repr() of the syntax error exception itself, which is the major hack here. Previously, it worked because for unclosed

[issue43407] time.monotonic(): Docs imply comparing call N and call N+M is invalid for M>1

2021-03-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +23537 pull_request: https://github.com/python/cpython/pull/24769 ___ Python tracker ___

[issue43407] time.monotonic(): Docs imply comparing call N and call N+M is invalid for M>1

2021-03-05 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23536 pull_request: https://github.com/python/cpython/pull/24768 ___ Python tracker

[issue43407] time.monotonic(): Docs imply comparing call N and call N+M is invalid for M>1

2021-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset ff5f05934db241dfafc604989b2de3487b09ca82 by Alex Willmer in branch 'master': bpo-43407: Clarify comparisons of time.monotonic() et al results (GH-24757) https://github.com/python/cpython/commit/ff5f05934db241dfafc604989b2de3487b09ca82

[issue43387] Enable pydoc to run as background job

2021-03-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- stage: -> test needed type: behavior -> enhancement versions: -Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

[issue43379] Pasting multiple lines in the REPL is broken since 3.9

2021-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: On both Windows and macOS Mohave with both 3.9 and 3.10 I get normal behavior. If it were not for the $ python3.x line, the missing '... ' in Romain's output would have suggested that he was using IDLE. But IDLE should accept pasted ascii statements just

[issue43366] Unclosed bracket bug in code.interact prevents identifying syntax errors

2021-03-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Maybe we need to add an API (e.g. a flag to compile()) so that we can ask the > actual parser the question we're interested in, rather than having to use > hacks and heuristics? I was thinking about that, but we need to fix some inconsistencies

[issue43374] Apple refuses apps written in Python

2021-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Adrian, when responding by email, please delete the copy of the email you are responding to, except maybe a line or two, as it is redundant when posted on the web page. Have you tried forums where there might be other Apple app developers with similar

[issue43366] Unclosed bracket bug in code.interact prevents identifying syntax errors

2021-03-05 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe we need to add an API (e.g. a flag to compile()) so that we can ask the actual parser the question we're interested in, rather than having to use hacks and heuristics? -- ___ Python tracker

[issue43366] Unclosed bracket bug in code.interact prevents identifying syntax errors

2021-03-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is a change I implemented and is explicitly deactivated in the reprl: https://github.com/python/cpython/blob/master/Parser/pegen.c#L1191 The problem here is that when you call compile() there is no way to know if you are doing it to simulate a

[issue43366] Unclosed bracket bug in code.interact prevents identifying syntax errors

2021-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: #43163 was about the opposite problem of raising SyntaxError too soon, when a valid continuation to imcomplete code is possible. As with that issue, IDLE has the same problem, which is not in code.interact() itself but in codeop._maybe_compile.. Calling

[issue24890] Windows launcher docs don't fully explain shebang semantics

2021-03-05 Thread Eryk Sun
Eryk Sun added the comment: In summary, the launcher documentation needs to be extended as follows: * Include an example of a shebang with a normal Windows path: #!"C:\Program Files\Python310\python.exe" Highlight the importance of quoting paths that contain spaces.

[issue43410] Parser does not handle correctly some errors when parsin from stdin

2021-03-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I modified PR 24763 to implement this idea. -- ___ Python tracker ___ ___

[issue43365] Operation conflict between time package and file

2021-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: I unlinked the preliminary versions of the code minimized in the 3 post. The posted code is buggy: it opens a file and then start an infinite loop. It has to be interrupted someway, and the file may not be properly closed and flushed to disk. When I make

[issue43365] Operation conflict between time package and file in python 3.8 3.9

2021-03-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- Removed message: https://bugs.python.org/msg387908 ___ Python tracker ___ ___ Python-bugs-list

[issue43365] Operation conflict between time package and file in python 3.8 3.9

2021-03-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- Removed message: https://bugs.python.org/msg387907 ___ Python tracker ___ ___ Python-bugs-list

[issue43359] Dead assignment in Py_UniversalNewlineFgets

2021-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Victor and/or Serhiy: This and #43360 and #43361 are similar 1-line changes, suggested by scan-build, to eliminate dead or duplicate initializations in C code. Can either of you either handle these or suggest someone else? Would we have preferred 1 issue

[issue43355] __future__.annotations breaks inspect.signature()

2021-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: 3.7 only gets security fixes -- nosy: +terry.reedy versions: -Python 3.7 ___ Python tracker ___

[issue43332] Make http.client._tunnel send one byte string over the network

2021-03-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: FYI another common socket idiom for this, specifically added for use in old HTTP 1.x servers building up responses, is setting and clearing the TCP_CORK (Linux) or TCP_NOPUSH (FreeBSD, and maybe macos? [buggy?]) socket option before and after the set of

[issue43412] object.h -Wcast-qual warning

2021-03-05 Thread Peter Eisentraut
New submission from Peter Eisentraut : object.h contains an inline function that causes a -Wcast-qual warning from gcc. Since this file ends up visible in third-party code that includes Python.h, this makes it impossible to use -Wcast-qual in such code. The problem is the change

[issue43338] Provide offical installers for security releases

2021-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: This tracker is only concerned with the PSF/python.org Windows and macOS installers, not the *nix distributions, so I assume that one the former is your concern. For those, your request has been made and rejected multiple times before. A request on the

[issue23740] http.client request and send method have some datatype issues

2021-03-05 Thread Alex Willmer
Alex Willmer added the comment: http_dump.py now covers CPython 3.6-3.10 (via Tox), and HTTPSConnection https://github.com/moreati/bpo-23740 -- ___ Python tracker ___

[issue43332] Make http.client._tunnel send one byte string over the network

2021-03-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43332] Make http.client._tunnel send one byte string over the network

2021-03-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: yep, that'd be a worthwhile improvement. note that the send method in that code also accepts BytesIO objects so rather than doing our own sequence of bytes and join we could just buffer in one of those. -- ___

[issue43337] export the set newline value on TextIOBase/TextIOWrapper

2021-03-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43336] document whether io.TextIOBase.readline(size>0) will always read the full newline

2021-03-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43332] Make http.client._tunnel send one byte string over the network

2021-03-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: I changed the title to what a PR/commit title should look like. Your justification is that "Multiple writes possibly cause excessive network usage and increased implementation complexity on the other end." I see no problem with the formatting of your first

[issue28259] Ctypes bug windows

2021-03-05 Thread Eryk Sun
Eryk Sun added the comment: I didn't have time to look deeper into this. I'm sorry for not getting back to you. The rather-large example that you uploaded didn't and doesn't run for me, so I wasn't able to reproduce the problem. The one bit of advice I have is to always declare required

[issue27803] ctypes automatic byref failing on custom classes attributes

2021-03-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43352] Add a Barrier object in asyncio lib

2021-03-05 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43411] wm_manage fails with ttk.Frame

2021-03-05 Thread Martin Cooper
New submission from Martin Cooper : Attempting to use a ttk.Frame with wm_manage() causes a TclError: _tkinter.TclError: window ".!frame" is not manageable: must be a frame, labelframe or toplevel The (Tcl) documentation for wm manage states "Only frame, labelframe and toplevel widgets can

[issue27926] ctypes is too slow to convert a Python list to a C array

2021-03-05 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___

[issue22708] httplib/http.client in method _tunnel used HTTP/1.0 CONNECT method

2021-03-05 Thread Senthil Kumaran
Change by Senthil Kumaran : -- assignee: -> orsenthil nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43409] [Win] Call subprocess.Popen() twice makes Thread.join() interruptible and deadlock

2021-03-05 Thread Eryk Sun
Eryk Sun added the comment: This is a variation on bpo-21822. If join() is called in the main thread, and it gets interrupted immediately after the lock.acquire(block, timeout) call, then subsequent calls will hang. In Windows, the acquire() call is not interruptible with Ctrl+C, so the

[issue43410] Parser does not handle correctly some errors when parsin from stdin

2021-03-05 Thread pmp-p
Change by pmp-p : -- nosy: +pmpp ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43410] Parser does not handle correctly some errors when parsin from stdin

2021-03-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think we should look into having some variable holding all the text that we have parsed so far. All the workarounds to fetch the text from the file or from stdin or whatnot are getting very very complicated. -- stage: patch review ->

[issue43401] dbm module doc page redirects to itself

2021-03-05 Thread Numerlor
Numerlor added the comment: The issue seems to have resolved itself now, but may be worth a look for the cause. -- stage: -> resolved status: open -> closed ___ Python tracker

[issue43410] Parser does not handle correctly some errors when parsin from stdin

2021-03-05 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +23535 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24763 ___ Python tracker

[issue43410] Parser does not handle correctly some errors when parsin from stdin

2021-03-05 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : The parser crashes when there are some syntax errors from stdin: > echo "(1+34" | ./python.exe - [1]54046 doneecho "(1+34" | 54047 segmentation fault ./python.exe - -- components: Interpreter Core messages:

[issue41180] marshal load bypass code.__new__ audit event

2021-03-05 Thread Yunfan Zhan
Change by Yunfan Zhan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43409] [Win] Call subprocess.Popen() twice makes Thread.join() interruptible and deadlock

2021-03-05 Thread Zhang Boyang
New submission from Zhang Boyang : Please run joinbug.py and press Ctrl-C twice. = The output = 1st join PLEASE PRESS CTRL-C TWICE, IGNORE THE 'Press any key to continue' Press any key to continue . . . Press any key to continue . . . thread exit Traceback (most

[issue27803] ctypes automatic byref failing on custom classes attributes

2021-03-05 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5 ___ Python tracker ___ ___

[issue25653] ctypes+callbacks+fork+selinux = crash

2021-03-05 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___

[issue8557] subprocess PATH semantics and portability

2021-03-05 Thread Eryk Sun
Eryk Sun added the comment: The Popen() docs begin by explaining that it has "os.execvp()-like" behavior in POSIX and uses CreateProcess() in Windows. Personally, I do not think it's proper for Python's documentation to discuss details of how CreateProcess() handles lpCommandLine (args),

[issue43408] about the method: title()

2021-03-05 Thread Christian Heimes
Christian Heimes added the comment: This behavior is documented, https://docs.python.org/3/library/stdtypes.html#str.title > The algorithm uses a simple language-independent definition of a word as > groups of consecutive letters. The definition works in many contexts but it > means that

[issue43408] about the method: title()

2021-03-05 Thread Qihao Chen
New submission from Qihao Chen : Hello, I'm a student from China, and I think there is a bug in Python3.7. When I use the method "title()", I think the method should not make "'s" upper. I would appreciate it if you could consider my advice. -- files: title().png messages: 388153

[issue30469] Inconsistent Execution of Generic Descriptor Attributes

2021-03-05 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30469] Inconsistent Execution of Generic Descriptor Attributes

2021-03-05 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue16272] C-API documentation clarification for tp_dictoffset

2021-03-05 Thread Eryk Sun
Change by Eryk Sun : -- type: -> enhancement versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___

[issue16272] C-API documentation clarification for tp_dictoffset

2021-03-05 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg221020 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29533] urllib2 works slowly with proxy on windows

2021-03-05 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.6 ___ Python tracker ___ ___

[issue28356] Windows: os.rename different in python 2.7.12 and python 3.5.2

2021-03-05 Thread Eryk Sun
Change by Eryk Sun : -- type: behavior -> enhancement versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___ ___

[issue42627] urllib.request.getproxies() misparses Windows registry proxy settings

2021-03-05 Thread 狂男风
狂男风 added the comment: I make some black box tests with the HTTPS proxy. Set system proxy `http=https://host:port` and start a HTTPS proxy, then IE, Edge (Chromium) and benrg's code (using `urllib3`) work fine while fetching `http://website`. Then I shutdown the HTTPS proxy and start a HTTP

[issue25731] Assigning and deleting __new__ attr on the class does not allow to create instances of this class

2021-03-05 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue43395] os.path states that bytes can't represent all MBCS paths under Windows

2021-03-05 Thread Eryk Sun
Eryk Sun added the comment: > instead of the stated 'surrogatepass' In Python 3.6 and above, you can check this as follows: >>> sys.getfilesystemencoding() 'utf-8' >>> sys.getfilesystemencodeerrors() 'surrogatepass' In Python 3.5 and previous: >>>

[issue43406] Possible race condition between signal catching and signal.signal

2021-03-05 Thread Antoine Pitrou
Change by Antoine Pitrou : -- pull_requests: +23534 pull_request: https://github.com/python/cpython/pull/24762 ___ Python tracker ___

[issue43406] Possible race condition between signal catching and signal.signal

2021-03-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 68245b7a1030287294c65c298975ab9026543fd2 by Antoine Pitrou in branch 'master': bpo-43406: Fix possible race condition where ``PyErr_CheckSignals`` tries to execute a non-Python signal handler (GH-24756)

[issue43406] Possible race condition between signal catching and signal.signal

2021-03-05 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23533 pull_request: https://github.com/python/cpython/pull/24761 ___ Python tracker