[issue43892] Make match patterns explicit in the AST

2021-04-28 Thread Brandt Bucher


Brandt Bucher  added the comment:


New changeset 1e7b858575d0ad782939f86aae4a2fa1c29e9f14 by Nick Coghlan in 
branch 'master':
bpo-43892: Make match patterns explicit in the AST (GH-25585)
https://github.com/python/cpython/commit/1e7b858575d0ad782939f86aae4a2fa1c29e9f14


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43968] os.path.realpath() unexpected breaking change: resolves subst'd paths to real paths

2021-04-28 Thread Eryk Sun


Eryk Sun  added the comment:

A substitute drive is not a mount point, strictly speaking. It's a symlink in 
the object namespace that targets an arbitrary path on a device, or even on 
another mapped/substitute drive. A mapped drive is a similar case that targets 
an arbitrary path on a UNC share. Any number of these path components may be 
filesystem symlinks, which can in turn target other substitute drives and 
mapped drives.

The object manager reparses your example substitute drive "Z:" to its target 
path r"C:\example\dir" before the I/O manager and filesystem ever see the path. 
Thus, hypothetically, if r"Z:\symlink" targets r"\spam", it resolves to 
r"C:\spam", not r"Z:\spam", i.e. not r"C:\example\dir\spam". If r"Z:\symlink" 
targets r"..\spam", it resolves to r"C:\example\spam". 

Also, substitute drives are almost always defined for the current logon session 
only. If you think it's not an issue because you're the only user on the 
machine, there's still typically a linked logon to worry about in the case of a 
UAC split standard/administrator logon; plus there are service processes 
running as SYSTEM, NETWORK SERVICE, and LOCAL SERVICE; and maybe also 
non-interactive tasks running as the user account in a separate logon session. 
Given that Windows is inherently a multiple-logon system, a path that's only 
accessible by one logon session in the system is not the best candidate for a 
real path if it's possible to resolve it further to a path that's globally 
accessible.

---

A mount point, unlike a symlink, is a graft point that behaves like a regular 
subtree. Classical mount points in Windows are the root paths of volume devices 
(e.g. "C:\\", where "C:" is a volume device name) and redirected filesystems 
mounted as UNC shares (e.g. r"\\server\share"). Windows 2000 added support for 
bind mount points (i.e. junctions, e.g. r"C:\Mount\F"). Unfortunately, 
switching to junctions probably won't solve your problem. The current design of 
ntpath.realpath() doesn't always retain a bind mount point in the resolved 
path, not unless it's the canonical path of a local volume -- or unless it's in 
a UNC path since it's impossible to resolve a remote junction to an accessible 
target path.

--
components: +Windows
nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41608] IDLE: multiple space deletion by Backspace after non-spaces

2021-04-28 Thread ปพนพัชร์ บรรพจันทร์

Change by ปพนพัชร์ บรรพจันทร์ :


--
nosy: +ttx11529
Added file: https://bugs.python.org/file4/pb_tool-3.1.0-py3-none-any.whl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2021-04-28 Thread Bryan Silverthorn


Bryan Silverthorn  added the comment:

I submitted this patch 14 years ago and am sure of nothing. :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-28 Thread ปพนพัชร์ บรรพจันทร์

Change by ปพนพัชร์ บรรพจันทร์ :


--
nosy: +ttx11529

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41139] cgi uses the locale encoding for log files

2021-04-28 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41139] cgi uses the locale encoding for log files

2021-04-28 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset e52ab42cedd2a5ef4c3c1a47d0cf96a8f06d051f by Inada Naoki in branch 
'master':
bpo-41139: Deprecate `cgi.log()` (GH-25625)
https://github.com/python/cpython/commit/e52ab42cedd2a5ef4c3c1a47d0cf96a8f06d051f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-28 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset a69256527f93d2aa32e76658deab829e324d97b6 by Inada Naoki in branch 
'master':
bpo-43651: Fix EncodingWarning in `os.fdopen()` and test_os (GH-25654)
https://github.com/python/cpython/commit/a69256527f93d2aa32e76658deab829e324d97b6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-28 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset fa51c0c448aca9fe5d4e8bc02e71de528931778b by Inada Naoki in branch 
'master':
bpo-43651: Fix EncodingWarning in tests. (GH-25655)
https://github.com/python/cpython/commit/fa51c0c448aca9fe5d4e8bc02e71de528931778b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24275] lookdict_* give up too soon

2021-04-28 Thread Inada Naoki


Change by Inada Naoki :


--
resolution: remind -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24275] lookdict_* give up too soon

2021-04-28 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 8557edbfa8f74514de82feea4c62f5963e4e0aa7 by Hristo Venev in 
branch 'master':
bpo-24275: Don't downgrade unicode-only dicts to mixed on lookups (GH-25186)
https://github.com/python/cpython/commit/8557edbfa8f74514de82feea4c62f5963e4e0aa7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43972] Simple HTTP Request Handler in http.server does not set a content-length and does not close connections on 301s

2021-04-28 Thread Stephen Rosen


Change by Stephen Rosen :


--
keywords: +patch
pull_requests: +24395
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25705

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43972] Simple HTTP Request Handler in http.server does not set a content-length and does not close connections on 301s

2021-04-28 Thread Stephen Rosen


New submission from Stephen Rosen :

If you use the `http.server` simple server and handler to serve a directory, 
navigating to a directory name without a trailing slash will trigger a 301 to 
add the trailing slash.

For example, if "foo/" is a directory under the file server, a GET for "/foo" 
will receive a 301 Moved Permanently response with a Location header pointing 
at "/foo/".

However, the response is sent without a "Content-Length: 0" and the connection 
is not closed. Unfortunately, certain clients will hang indefinitely and wait 
under these conditions, without processing the redirect. In my testing, curl 
7.68 and Firefox 87 both exhibted this behavior.

If a Content-Length header is set, these clients behave correctly.
For example, subclass the handler and add

def send_response(self, code):
super().send_response(code)
if code == HTTPStatus.MOVED_PERMANENTLY:
self.send_header("Content-Length", "0")

--
components: Library (Lib)
messages: 392272
nosy: sirosen
priority: normal
severity: normal
status: open
title: Simple HTTP Request Handler in http.server does not set a content-length 
and does not close connections on 301s
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43971] documentation: no spacing around default args in annotated function

2021-04-28 Thread Mohamed Moselhy


Change by Mohamed Moselhy :


--
keywords: +patch
pull_requests: +24393
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25702

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43971] documentation: no spacing around default args in annotated function

2021-04-28 Thread Mohamed Moselhy


New submission from Mohamed Moselhy :

See https://www.python.org/dev/peps/pep-0008/#function-annotations

The first section of https://docs.python.org/3/library/dataclasses.html shows 
quantity_on_hand: int=0, when there should be spacing around the '=' according 
to PEP 8 (see link above).

--
assignee: docs@python
components: Documentation
files: screen.png
messages: 392271
nosy: docs@python, eric.araujo, ezio.melotti, mdk, moselhy, willingc
priority: normal
severity: normal
status: open
title: documentation: no spacing around default args in annotated function
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49998/screen.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1227748] doc: subprocess: inheritance of std descriptors inconsistent

2021-04-28 Thread Eryk Sun


Eryk Sun  added the comment:

> If one calls Popen with stdin = stdout = stderr = None,
> the caller's std descriptors are inherited on *x, but
> not on Windows

In the default case, CreateProcessW() is called with bInheritHandles as false 
and without explicitly setting the standard-handle values. Also, creationflags 
is 0 in the default case, not CREATE_NEW_CONSOLE, CREATE_NO_WINDOW, or 
DETACHED_PROCESS. In this case, the child's standard handles are implicitly 
duplicated from the parent if the child shares the parent's console session. 
Contra "1227748.patch", the standard handles are not "attached to the console 
window". For example, if the parent's stdout is redirected to a handle for an 
open disk file, the child's stdout will be redirected to the same open file. It 
has nothing to do with a window, and the console session doesn't even need to 
have a window (i.e. created with CREATE_NO_WINDOW; or a pseudoconsole session).

In particular, if the executable image of the child is a console application, 
the system duplicates the parent's standard handles to the child, as well as a 
handle for the parent's console session, if any. If the child can connect to 
the parent's console at startup, then the duplicated standard handles are used, 
whatever they are. (In general, they need to be handles for pipe, character, or 
disk files opened in synchronous mode, as required by C standard I/O.) If the 
child can't connect to a console session, it allocates a new console and opens 
the console "Input" and "Output" as its standard handles. 

On the other hand, if the executable image of the child is not a console 
application, the system does not implicitly duplicate standard handles from the 
parent to the child. The window manager and graphical shell even explicitly 
reuse the standard-handle values (via STARTUPINFO) to implement features that 
aren't I/O file related when running GUI apps, including configuring an 
activation hotkey (stdin) or passing a handle for the preferred output monitor 
(stdout).

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43958] Importlib.metadata docs claim PackagePath is a Path subclass

2021-04-28 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Thanks Paul!

--
nosy: +jaraco
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-04-28 Thread Miguel Brito


Miguel Brito  added the comment:

Hello, first time here. I created an PR for that. Managed to reproduce the 
issue both manually and via unit test.

I hope there's no edge case but all tests pass on my machine.

--
nosy: +miguendes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43970] Optimize Path.cwd() in pathlib

2021-04-28 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm merging this not so much because of the performance aspect, but just to 
remove some unnecessary code.

But in any event, thanks for the contribution!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43970] Optimize Path.cwd() in pathlib

2021-04-28 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 4a85718212fd032c922ca7d630b2602dd4b29a35 by kfollstad in branch 
'master':
bpo-43970: Optimize Path.cwd() in pathlib by not instantiating a class 
unnecessarily (GH-25699)
https://github.com/python/cpython/commit/4a85718212fd032c922ca7d630b2602dd4b29a35


--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37903] IDLE Shell sidebar.

2021-04-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 15d386185659683fc044ccaa300aa8cd7d49cc1a by Tal Einat in branch 
'master':
bpo-37903: IDLE: Shell sidebar with prompts (GH-22682)
https://github.com/python/cpython/commit/15d386185659683fc044ccaa300aa8cd7d49cc1a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43012] Remove pathlib accessors

2021-04-28 Thread Barney Gale


Change by Barney Gale :


--
keywords: +patch
pull_requests: +24391
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25701

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24132] Direct sub-classing of pathlib.Path

2021-04-28 Thread Barney Gale


Change by Barney Gale :


--
pull_requests: +24392
pull_request: https://github.com/python/cpython/pull/25701

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43954] Possible missing word on unittest doc

2021-04-28 Thread Larry Hastings


Change by Larry Hastings :


--
nosy:  -larry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43913] unittest module cleanup functions not run unless tearDownModule() is defined

2021-04-28 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 5.0 -> 6.0
pull_requests: +24390
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25700

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

In any case, that's my personal opinion of course.

What we should do is decide collectively if immutability is defined behaviour. 
If we decide that it is, we need regression tests. If we define that as "nice 
to have" but ultimately "implementation-defined" we don't.

In any case, I would argue that having tests is good and allow us to know when 
the behaviour flips without people intending it to, like what happened in this 
case.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Immutability of the type is mainly an implementation detail

I kindly disagree and based on the title of this issue I think more people have 
a similar opinion.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am not sure tests are needed here. Immutability of the type is mainly an 
implementation detail. We keep the types immutable because we don't want users 
to use the feature of mutating these types. I don't think anything bad will 
happen if in some Python implementation some of these types are Python classes 
and are mutable. It is not easy to make a Python class immutable. Users will 
not intentionally write a code depending on mutability of these types because 
it does not work in CPython.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39232] asyncio crashes when tearing down the proactor event loop

2021-04-28 Thread Steve Dower


Steve Dower  added the comment:

I'm also seeing (and annoyed by) this.

Do we need to do anything more than suppress the error? If we're just failing 
to notify the event loop that we're closing because the loop is gone, does the 
notification even matter?

--
nosy: +steve.dower

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24247] Docs: "unittest discover" modifies sys.path

2021-04-28 Thread Irit Katriel


Irit Katriel  added the comment:

This is alluded to in the "caution" under 
https://docs.python.org/3/library/unittest.html#test-discovery

But the workaround is not explained.

--
keywords: +easy
nosy: +iritkatriel
title: "unittest discover" modifies sys.path -> Docs: "unittest discover" 
modifies sys.path
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9 -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2021-04-28 Thread Glenn Travis

Glenn Travis  added the comment:

I see that this remains alive. I do have a newer question. Apple continues to 
say that they are going to drop all their included versions of python and I 
believe ruby in some future version of macOS. I thought that this would happen 
in Big Sur, but python versions 2.7.16 still remains with us, why, I don’t know.

> On Apr 28, 2021, at 3:21 PM, Irit Katriel  wrote:
> 
> 
> Change by Irit Katriel :
> 
> 
> --
> versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.6, 
> Python 3.7, Python 3.8
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18125] Out-of-tree build cannot regenerate Makefile.pre

2021-04-28 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Build Python outside the source directory

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16062] Socket closed prematurely in httplib for https

2021-04-28 Thread Irit Katriel


Irit Katriel  added the comment:

Issue5542 was fixed, so if it's the same thing this is also fixed. If it's not 
the same thing, then python 2.7 is past EOL so please create a new issue if you 
can reproduce this problem in 3.8+.

--
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-28 Thread Paul Moore


Paul Moore  added the comment:

To be explicit, I'm +1 on breaking backward compatibility in the minor form 
described by Ethan: if NamedTemporaryFile is used as a context manager, the 
file is closed *on context manager exit* and *not* when the file is closed.

Breaking compatibility is allowed in minor versions (3.11 at this point, as 
this won't make it in before 3.10 feature freeze). So this is an acceptable 
change.

I don't personally think this needs a transition period or deprecation, and in 
particular I don't think that Jason's "gradual transition" proposal is 
necessary.

I'd be sad if we ended up with an over-complicated solution for no better 
reason than an excess of caution over a backward compatibility issue that we're 
not sure will impact anyone. Do we have any actual examples of code that needs 
the current CM behaviour (as opposed to a general concern that someone might be 
using the functionality)?

(My original over-complicated proposal was based on a mistaken belief that it 
had already been established that backward incompatibility was absolutely not 
allowed. But I never subscribed to that view myself.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43970] Optimize Path.cwd() in pathlib

2021-04-28 Thread Kevin Follstad


Change by Kevin Follstad :


--
keywords: +patch
pull_requests: +24388
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25699

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43970] Optimize Path.cwd() in pathlib

2021-04-28 Thread Kevin Follstad


New submission from Kevin Follstad :

python3.10 -m timeit -r 5 -n 10 -s 'from pathlib import Path' 'Path.cwd()'
10 loops, best of 5: 206 usec per loop

python3.10-mypatch -m timeit -r 5 -n 10 -s 'from pathlib import Path' 
'Path.cwd()'
10 loops, best of 5: 156 usec per loop

--
components: Library (Lib)
messages: 392255
nosy: kfollstad
priority: normal
severity: normal
status: open
title: Optimize Path.cwd() in pathlib
type: performance
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43969] "bad magic number" when Python 2's pyc file exists without py file

2021-04-28 Thread Mitchell Hentges


New submission from Mitchell Hentges :

Python 3 imports may fail if a Python 2 .pyc file exists without an 
accompanying .py file.

-

My project vendors code, and we recently updated "requests" to a drastically 
newer version.

As part of this version change, `requests/packages/__init__.py` was removed, 
and  `requests/packages.py` was added.

This project is long-lived, and many people have imported `requests` with 
Python 2. So, `requests/packages/__init__.pyc` exists.

After making this update, importing requests with Python 3 fails:
`ImportError: bad magic number in 'parent.child': b'\x03\xf3\r\n'`

Interestingly, deleting `requests/packages/__init__.pyc` allows Python 3 to 
work again.

-

I've attached a "reproduction" script that produces the directory structure and 
tweak required to cause the failure.
I'm running Python 2.7.18 and Python 3.9.1.

--
components: Interpreter Core
files: repro.sh
messages: 392254
nosy: mitchhentges
priority: normal
severity: normal
status: open
title: "bad magic number" when Python 2's pyc file exists without py file
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49997/repro.sh

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site

2021-04-28 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.6, Python 
3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-28 Thread Evgeny


Evgeny  added the comment:

On Mon, Apr 12, 2021 at 12:51 AM Jason R. Coombs  wrote:

> Jason R. Coombs  added the comment:

> At least I and Ethan and Martin have expressed a desire for the default, 
> preferred usage work well in a portable environment. Requiring 
> `delete_on_close=False` violates that expectation.

Separately to my previous message. If the only issue with my PR is that default 
solution is not portable, then this can be simply changed within current PR by 
setting default of delete_on_close to fe equal to False.

As I mentioned, I was assuming I cannot break backwards compatibility.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2021-04-28 Thread Evgeny


Evgeny  added the comment:

Dear all, thank you very much for the discussion, I will just try to summarize 
the results of it.


In my PR I used solution, proposed by Eryk. My solution involves introduction 
of the extra flag delete_on_close and making sure, that new situation is fully 
backwards compatible, because I did not feel I have an authority to propose 
anything which would break backwards compatibility (as Python 4.0 I think is 
not on the horizon yet)


As I see from the discussion, the following decisions need to be taken:

WHICH FLAG TO USE

Eryk was proposing that it shall be delete_on_close  (which I have implemented)

Jason thinks, that we shall introduce flag delete_when, however when I read his 
proposal, the functionality which he proposes is not that different from what I 
implemented with  delete_on_close.

Ethan however thinks, that no extra flags are necessary at all



USAGE OF O_TEMPORARY ON WINDOWS

Ethan, Steve thinks, it is not needed

Eryk prefers to provide a way to omit O_TEMPORARY, but still use it by default, 
when it's omitted



CHANGING OF THE CURRENT BEHAVIOUR / BREAKING BACKWARDS COMPATIBILITY
Ethan thinks, that we shall slightly change backwards compatibility in a way 
that if CM is used, than file is deleted on CM exit and not on close as now

Jason thinks that backwards compatibility shall be changed gradually over 
several releases with the advanced depreciation warning 

Question: does everybody definitely agree then, that backwards compatibility 
shall definitely be altered, whether immediately or gradually?



Any other decision to be taken which I missed?


CONCLUSION: 
There seems to be still disagreements and I don't really know how to move this 
forward as  I am not sure I understand the decision making mechanism in the 
Python community (especially when it comes to breaking backwards 
compatibility). Any thoughts on this?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

ok.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Shreyan, see msg391954 earlier in this thread:
"I also think you should try to separately land small patches that add the 
IMMUTABLETYPE flag to a few very public types, e.g. array.array and the three 
in _sre (which are exported by re.py)."

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33040] Make itertools.islice supports negative values for start and stop arguments for sized iterable object

2021-04-28 Thread Yaroslav Nikitenko


Yaroslav Nikitenko  added the comment:

Sorry for a typo. The paragraph before the last should read

Negative *step* fundamentally changes the algorithm:... flow[-1:None:-1].

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Erlend, wouldn't it be easy to apply all the changes in 1 PR?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> We don't have immutability tests for static types then why heap types?

Because all static types are immutable, and some have been converted to heap 
types changing the contract, therefore is a regression and therefore we need 
regression tests for those.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33040] Make itertools.islice supports negative values for start and stop arguments for sized iterable object

2021-04-28 Thread Yaroslav Nikitenko


Yaroslav Nikitenko  added the comment:

I hope it's fine to add to closed topics here.

I agree with the decision that islice should not handle a special case of sized 
containers vs iterables.

However, I think that the support of negative indices in islice would be nice. 
A simple use case would be to get the last element of an iterable.
I had to write my own code for that (you may read and/or use it if needed), 
because I needed this algorithm in my analysis. Here is the link to my function 
ISlice._run_negative_islice in my architectural framework for data analysis: 
https://github.com/ynikitenko/lena/blob/master/lena/flow/iterators.py#L150 or 
on https://lena.readthedocs.io/en/latest/flow.html#lena.flow.iterators.ISlice 
(I'm afraid the correct link might change later).

I also agree that to support negative indices would require more work. Indeed, 
it seems that for each combination of positive/negative start/stop it required 
a new algorithm! I didn't implement negative steps.

However, I think that because it's not easy to implement, it would be even 
better to include that in the standard library (because it would save other 
people from writing that).

If we care about code reuse: I think that negative indices make the algorithm 
more useful, while non-trivial steps are redundant, because they can be 
implemented by a composition of a slice with step=1 with a simple slice with 
start, stop=None, None with step!=1.

Negative slice fundamentally changes the algorithm: if one wants to have the 
flow inverted, fflow[0, None, -1], one would have to store it all in memory! 
Anyway it's easy to make this in a separate function. So I think it's more 
functional to implement negative indices and discard negative steps (or 
non-trivial steps at all).

About drop_first, drop_last suggested above: I also think that they are 
redundant and would be better incorporated into islice.

--
nosy: +ynikitenko

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43592] test_importlib: test_multiprocessing_pool_circular_import() fails with "Too many open files" error on os.pipe()

2021-04-28 Thread Liel Fridman


Liel Fridman  added the comment:

I have the same error when running the tests on my machine (Same macOS version).

--
nosy: +lielfr

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1227748] doc: subprocess: inheritance of std descriptors inconsistent

2021-04-28 Thread Irit Katriel


Irit Katriel  added the comment:

The patch needs to be converted into a github PR.

--
keywords: +easy
nosy: +iritkatriel
title: subprocess: inheritance of std descriptors inconsistent -> doc: 
subprocess: inheritance of std descriptors inconsistent
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.1, Python 
3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2021-04-28 Thread Irit Katriel


Irit Katriel  added the comment:

Are you sure this assertion is correct? tp_traverse is optional.

--
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23750] doc: Clarify difference between os.system/subprocess.call in section "Replacing os.system()"

2021-04-28 Thread Irit Katriel


Irit Katriel  added the comment:

The patch needs to be converted to a github PR.

--
keywords: +easy
nosy: +iritkatriel
title: Clarify difference between os.system/subprocess.call in section 
"Replacing os.system()" -> doc: Clarify difference between 
os.system/subprocess.call in section "Replacing os.system()"
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42998] pathlib.Path: add `username` argument to `home()`

2021-04-28 Thread Barney Gale


Barney Gale  added the comment:

So far I've been keen to keep the Path and AbstractPath APIs the same, but 
perhaps this case warrants an exception.

What if AbstractPath lacked both home() and expanduser(), and those methods 
only existed on Path? Of all the methods on Path, these two are the *least* 
useful for non-local filesystems.

We can then circle back round to this issue when the fate of expanduser() 
becomes clearer.

Does that sound any good?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24475] The docs never define what a pool "task" is

2021-04-28 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Library (Lib)
versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9 -Python 2.7, Python 
3.4, Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Is it necessary to add tests just for testing type immutability? We don't have 
immutability tests for static types then why heap types?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 103d5e420dd90489933ad9da8bb1d6008773384d by Victor Stinner in 
branch 'master':
bpo-28254: _posixsubprocess uses PyGC_Enable/PyGC_Disable (GH-25693)
https://github.com/python/cpython/commit/103d5e420dd90489933ad9da8bb1d6008773384d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +24387
pull_request: https://github.com/python/cpython/pull/25697

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +24386
pull_request: https://github.com/python/cpython/pull/25696

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3b52c8d66b25415f09478ab43f93d59a3547dc13 by Erlend Egeberg 
Aasland in branch 'master':
bpo-43908: Add Py_TPFLAGS_IMMUTABLETYPE flag (GH-25520)
https://github.com/python/cpython/commit/3b52c8d66b25415f09478ab43f93d59a3547dc13


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

See msg391933, Shreyan. I think Christian will take care of his types :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43908] array.array should remain immutable

2021-04-28 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Was EVPtype_spec in _hashopenssl.c converted to heap type?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Oh, well, SQLITE_DEFAULT_MEMSTATUS=0 does in fact affect PRAGMA 
soft_heap_limit. Looks like I'm left with only SQLITE_OMIT_AUTOINIT, then :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43968] os.path.realpath() unexpected breaking change: resolves subst'd paths to real paths

2021-04-28 Thread sfmc


New submission from sfmc :

For example if I mount directory
  C:\example\dir
to
  Z:\
the
  os.path.realpath('Z:\\')
returns the real directory.

Use following commands in Windows to reproduce the issue:

  md C:\example\dir
  subst Z: C:\example\dir
  python.exe -c "import os; print(os.path.realpath('Z:\\'))"

Python 3.8 outputs:
  C:\example\dir
Python 3.7 outputs:
  Z:\

This is unexpected behavior change and it breaks our scripts in many places, 
because we use mounts in Windows ("subst" command) and Linux ("mount" command).

We had to add our own implementation for realpath to our scripts, but it also 
affects other tools, such as Python debugger (breakpoints stopped working) and 
IDEs (such as PyCharm).

It can be argued whether the behavior to resolve mounts is good.

But this change breaks the ability to work with Python scripts in mounts.
I hope it can be fixed in Python 3.8.10.


I propose to fix it in Python 3.8.10 by adding to function
os.path.realpath(path)
a new parameter (named for example "resolve_mounts"), like that:
os.path.realpath(path, *, resolve_mounts=False)

And if resolve_mounts==False, then the function should not resolve mounts in 
Windows ("subst" command) and Linux ("mount" command).


Let me know if you wish to get a Pull Request with the proposed fix. I can try 
to implement it.

--
components: Library (Lib)
messages: 392234
nosy: sfmc
priority: normal
severity: normal
status: open
title: os.path.realpath() unexpected breaking change: resolves subst'd paths to 
real paths
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Here's a list of the SQLite recommended compile-time options (only):

- macOS (v11.2.3) (SQLite v3.32.3) defines SQLITE_DEFAULT_WAL_SYNCHRONOUS=1
- Homebrew (SQLite v3.35.4) does not define any of the recommended compile-time 
options
- Debian Buster (SQLite v3.27.2) defines SQLITE_LIKE_DOESNT_MATCH_BLOBS
- Ubuntu 20.04 (SQLite v3.31.1) defines SQLITE_LIKE_DOESNT_MATCH_BLOBS

AFAICS, adding SQLITE_DEFAULT_MEMSTATUS=0 and SQLITE_OMIT_AUTOINIT is safe, as 
it only affects the C API that we use, and nothing else.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43295] datetime.strptime emits IndexError on parsing 'z' as %z

2021-04-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24385
pull_request: https://github.com/python/cpython/pull/25695

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43349] [doc] incorrect tuning(7) manpage link

2021-04-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24384
pull_request: https://github.com/python/cpython/pull/25694

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43472] [security][subinterpreters] Add auditing hooks to subinterpreter module

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0252ce35712f4a12e824fb8b40a867ec3460443e by Miss Islington (bot) 
in branch '3.9':
bpo-43472: Ensure PyInterpreterState_New audit events are raised when called 
through _xxsubinterpreters module (GH-25506) (GH-25508)
https://github.com/python/cpython/commit/0252ce35712f4a12e824fb8b40a867ec3460443e


--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +24383
pull_request: https://github.com/python/cpython/pull/25693

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-28 Thread Stefan Behnel


Change by Stefan Behnel :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py

2021-04-28 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks for your major contribution, Ken! Agreed, that bugfix can come later.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3cc481b9de43c234889c8010e7da3af7c0f42319 by scoder in branch 
'master':
bpo-28254: Add a C-API for controlling the GC state (GH-25687)
https://github.com/python/cpython/commit/3cc481b9de43c234889c8010e7da3af7c0f42319


--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43847] [Windows] ntpath.realpath() of bytes root directory may raise TypeError in some cases

2021-04-28 Thread Steve Dower


Change by Steve Dower :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43757] pathlib: move 'resolve()' logic out of path flavour

2021-04-28 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43757] pathlib: move 'resolve()' logic out of path flavour

2021-04-28 Thread Steve Dower


Steve Dower  added the comment:


New changeset baecfbd849dbf42360d3a84af6cc13160838f24d by Barney Gale in branch 
'master':
bpo-43757: Make pathlib use os.path.realpath() to resolve symlinks in a path 
(GH-25264)
https://github.com/python/cpython/commit/baecfbd849dbf42360d3a84af6cc13160838f24d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py

2021-04-28 Thread Ken Jin


Ken Jin  added the comment:

The last of the patches have landed. Guido, thank you so much for helping me 
through this 5 month long process. Please enjoy your vacation!

PS: I need to send in a bugfix for typing.py later to ignore ``ParamSpec`` in 
the ``__parameters__`` of invalid locations like ``typing.List`` (this just 
ensures consistency with the builtin ``list``). That can be done as a bugfix 
patch after the 3.10 beta freeze (as it isn't a new feature at all). I'll open 
a new issue after beta 1 for that when you're back. Thanks!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2021-04-28 Thread Guido van Rossum

Guido van Rossum  added the comment:

Well, in the normal course of running multiple Python programs on the same 
machine, pyc files may be rewritten, and this should not cause crashes. So 
perhaps there’s a real bug here?

--
nosy: +Guido.van.Rossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the fix Irit!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b52cc7c5f1a6c5b48d51cd718719a766c37d6e38 by Miss Islington (bot) 
in branch '3.8':
bpo-43960: test_pdb resets breakpoints to make tests deterministic (GH-25691) 
(GH-25692)
https://github.com/python/cpython/commit/b52cc7c5f1a6c5b48d51cd718719a766c37d6e38


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43954] Possible missing word on unittest doc

2021-04-28 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +larry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-28 Thread Petr Viktorin


Petr Viktorin  added the comment:

I hope the PR fixes that. I plan to merge tomorrow if there ar no objections to 
it.

On April 28, 2021 5:15:19 PM GMT+02:00, STINNER Victor  
wrote:
>
>STINNER Victor  added the comment:
>
>Right now, running "make regen-limited-abi" adds again functions which
>were removed from Doc/data/stable_abi.dat:
>https://github.com/python/cpython/pull/25687#issuecomment-828520575
>
>diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat
>index cdc7160250..6fe61743d6 100644
>--- a/Doc/data/stable_abi.dat
>+++ b/Doc/data/stable_abi.dat
>@@ -351,11 +351,17 @@ PyMapping_Length
> PyMapping_SetItemString
> PyMapping_Size
> PyMapping_Values
>+PyMarshal_ReadObjectFromString
>+PyMarshal_WriteLongToFile
>+PyMarshal_WriteObjectToFile
>+PyMarshal_WriteObjectToString
> PyMem_Calloc
> PyMem_Free
> PyMem_Malloc
> PyMem_Realloc
> PyMemberDescr_Type
>+PyMember_GetOne
>+PyMember_SetOne
> PyMemoryView_FromMemory
> PyMemoryView_FromObject
> PyMemoryView_GetContiguous
>
>
>I guess that you should not be added until this issue is solved.
>
>--
>
>___
>Python tracker 
>
>___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11975] Fix referencing of built-in types (list, int, ...)

2021-04-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I don't see a clear solution here, but I think 
> it's very worth rethinking.

If you come up with a clear improvement for adding link targets, please open it 
in a separate tracker issue.  The other proposals in this thread have all been 
mostly voted down.

--
nosy: +rhettinger
resolution:  -> rejected
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py

2021-04-28 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 859577c24981d6b36960d309f99f7fc810fe75c2 by Ken Jin in branch 
'master':
bpo-41559: Change PEP 612 implementation to pure Python (#25449)
https://github.com/python/cpython/commit/859577c24981d6b36960d309f99f7fc810fe75c2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11975] Fix referencing of built-in types (list, int, ...)

2021-04-28 Thread Kieran Siek


Kieran Siek  added the comment:

I don't disagree, just having linkable directives for lists and tuples would 
already make the documentation a lot more useful.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43961] [Windows] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43961] [Windows] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 629ef0fb9cad6ac340d3be884af7b47fb393ae99 by Miss Islington (bot) 
in branch '3.9':
bpo-43961: Fix test_logging.test_namer_rotator_inheritance() (GH-25684) 
(GH-25688)
https://github.com/python/cpython/commit/629ef0fb9cad6ac340d3be884af7b47fb393ae99


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks everyone for fixing these issues and thanks Shreyan for the bug report.

The main initial is now fixed, so I close the issue.

Let's continue the discussions in remaining open issues:

* bpo-37387: test_compileall fails randomly on Windows when tests are run in 
parallel
* bpo-43960: test_pdb fails when only some tests are run
* bpo-43961 [Windows] test_logging.test_namer_rotator_inheritance() logs a 
logging error

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread Steve Dower


Steve Dower  added the comment:


New changeset c1a9535989cc7323099725503519a17f79d083f5 by Steve Dower in branch 
'master':
bpo-43955: Handle the case where the distutils warning has already been 
triggered (GH-25675)
https://github.com/python/cpython/commit/c1a9535989cc7323099725503519a17f79d083f5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24382
pull_request: https://github.com/python/cpython/pull/25692

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2dc6b1789ec86dc80ea290fe33edd61140e47f6f by Irit Katriel in 
branch '3.9':
bpo-43960: test_pdb resets breakpoints to make tests deterministic (GH-25691)
https://github.com/python/cpython/commit/2dc6b1789ec86dc80ea290fe33edd61140e47f6f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

> Another issue with the tests is that it has become terribly slow. It's taking 
> about 45 minutes to complete 1 run of the test suite. A few days ago, it took 
> only 10 - 15 minutes.

It took 49 minutes on my Windows 10 VM. Are you sure that you ran the test 
suite sequentially when it was slower?

I advice you run using -j0 option to run tests in parallel: it's much faster, 
and it's also more reliable.

== Tests result: FAILURE ==

384 tests OK.

1 test failed:
test_distutils

41 tests skipped:
test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_epoll
test_fcntl test_fork1 test_gdb test_grp test_ioctl test_kqueue
test_multiprocessing_fork test_multiprocessing_forkserver test_nis
test_openpty test_ossaudiodev test_pipes test_poll test_posix
test_pty test_pwd test_readline test_resource test_smtpnet
test_socketserver test_spwd test_syslog test_threadsignals
test_timeout test_tix test_tk test_ttk_guionly test_urllib2net
test_urllibnet test_wait3 test_wait4 test_winsound test_xmlrpc_net
test_xxlimited test_xxtestfuzz test_zipfile64

Total duration: 49 min 12 sec
Tests result: FAILURE

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

I ran "python -m test" on an up to date master branch (commit 
fe52eb62191e640e720d184a9a1a04e965b8a062), there is a single remaining issue. 
test_distutils failed because the deprecation warning was already emited: issue 
fixed by PR 25675. The other issues are gone.

Shreyan Avigyan: "Same errors."

IMO it's a mistake on your side. You ran an outdated version or you didn't 
rebuild Python cleanly.

"FYI test_signal is no longer modifying sys.gettrace thanks to your fix. But 
test_threading still does. (...) I ran the test again and test_signal still 
modifies sys.gettrace()"

It's not my case on my machine, again it sounds like an issue on your side.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11975] Fix referencing of built-in types (list, int, ...)

2021-04-28 Thread Éric Araujo

Éric Araujo  added the comment:

I don’t think consistency should be the main goal, but usefulness.

--
versions:  -Python 2.7, Python 3.11, Python 3.4, Python 3.5, Python 3.6, Python 
3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43959] Improve documentation of PyContextVar C-API

2021-04-28 Thread Stefan Behnel


Change by Stefan Behnel :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43954] Possible missing word on unittest doc

2021-04-28 Thread Julien Palard


Julien Palard  added the comment:

> I propose to remove the namespace package support entirely.

I'm no unittest expert, but I have nothing against removing it.

I totally agree to at least remove it from the doc while it does not work.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Right now, running "make regen-limited-abi" adds again functions which were 
removed from Doc/data/stable_abi.dat:
https://github.com/python/cpython/pull/25687#issuecomment-828520575

diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat
index cdc7160250..6fe61743d6 100644
--- a/Doc/data/stable_abi.dat
+++ b/Doc/data/stable_abi.dat
@@ -351,11 +351,17 @@ PyMapping_Length
 PyMapping_SetItemString
 PyMapping_Size
 PyMapping_Values
+PyMarshal_ReadObjectFromString
+PyMarshal_WriteLongToFile
+PyMarshal_WriteObjectToFile
+PyMarshal_WriteObjectToString
 PyMem_Calloc
 PyMem_Free
 PyMem_Malloc
 PyMem_Realloc
 PyMemberDescr_Type
+PyMember_GetOne
+PyMember_SetOne
 PyMemoryView_FromMemory
 PyMemoryView_FromObject
 PyMemoryView_GetContiguous


I guess that you should not be added until this issue is solved.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43959] Improve documentation of PyContextVar C-API

2021-04-28 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset ff7266efd0ef6b42dad30c9c0d210f843cc44f39 by Miss Islington (bot) 
in branch '3.8':
bpo-43959: clarify the documentation of the PyContextVar C-API (GH-25671) 
(GH-25690)
https://github.com/python/cpython/commit/ff7266efd0ef6b42dad30c9c0d210f843cc44f39


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43959] Improve documentation of PyContextVar C-API

2021-04-28 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset fdb11897d7c8f9e6bdf96fcef802f784ef90f726 by Miss Islington (bot) 
in branch '3.9':
bpo-43959: clarify the documentation of the PyContextVar C-API (GH-25671) 
(GH-25689)
https://github.com/python/cpython/commit/fdb11897d7c8f9e6bdf96fcef802f784ef90f726


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43659] AIX: test_curses crashes buildbot

2021-04-28 Thread Michael Felt

Michael Felt  added the comment:

Dome some 'dumb' testing - and I hope this helps understand why it is failing:

With the the last two func() calls commented out, the function passes:

def test_output_string(self):
stdscr = self.stdscr
encoding = stdscr.encoding
# addstr()/insstr()
for func in [stdscr.addstr, stdscr.insstr]:
with self.subTest(func.__qualname__):
stdscr.move(0, 0)
func('abcd')
func(b'abcd')
s = 'à▒^▒ç▒^▒'
try:
func(s)
except UnicodeEncodeError:
self.assertRaises(UnicodeEncodeError, s.encode, encoding)
func('abcd', curses.A_BOLD)
# func(1, 2, 'abcd')
# func(2, 3, 'abcd', curses.A_BOLD)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43725] Create a release branch ABI stability regression test

2021-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

You are using Fedora, which is not the same docker container and likely the 
same compiler version that is used to check the dump

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43725] Create a release branch ABI stability regression test

2021-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

As I mentioned here:

https://bugs.python.org/msg390213

the dump needs to be generated in a docker container using the same compiler 
version that is used in the CI

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-28 Thread Berker Peksag


Berker Peksag  added the comment:

As long as we don't introduce behavior changes between SQLite versions in 
mainstream Linux distributions and macOS/Windows (i.e. an application should 
continue working in Linux, macOS, Windows), it sounds good to me.

Maybe it's worth checking what compile options Debian (and others) are using 
when packaging SQLite.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >