[issue46841] Inline bytecode caches

2022-03-14 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +29986
pull_request: https://github.com/python/cpython/pull/31888

___
Python tracker 

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



[issue18309] Make python slightly more relocatable

2022-03-14 Thread Shakeeb Alireza


Shakeeb Alireza  added the comment:

Thanks, Mathias. This is all about improving python's 'relocatability'.

Just to expand on my prior point: the scenario we are talking about is where 
one embeds python in a host application's plugin system rather than in the host 
application itself.

In this case, sys.executable is the host application and a relocatable plugin 
embeds a 'python client'. If a full python distribution is not bundled within 
this client[*], it needs to (1) link to libpythonX.Y.dylib and (2) get the 
location of the standard library. 

There are standard cross-platform methods for (1) to be achieved by way of 
symmetrical @rpath lookups on the client and libpythonX.Y.dylib sides. So this 
resolvable even in the case when python is compiled with --enabled-shared.

However, even if (1) is achieved, the client cannot get, programmatically via 
the python c-api, the location of libpythonX.Y.dylib (even if it is properly 
dynamically linking to it), because it cannot rely on sys.executable. I think 
this is crux of Mathias' argument.

Of course there are workarounds, but they are (at least to me) all platform 
specific. 

The first and easiest is to just build using the Framework structure and don't 
ever use --enable-shared, provided you find Greg Neagle's solution 
(https://bugs.python.org/issue42514)

Another workaround which is specific to my context (which I have attached), is 
to use Apple's CoreFoundation library to get the path to the plugin bundle and 
from there find our way to the python distribution in the containing folder 
structure (package).


[*] It is possible to insert a full python distribution into a bundle (in the 
osx meaning), but then it becomes necessarily frozen or 'sealed' due to Apple's 
codesigning and notarization requirements, and it basically means that the user 
cannot extend it with further installations of python packages which contain 
c-extensions unless they jump through some additional codesigning and 
notarization hoops.

--
Added file: https://bugs.python.org/file50677/workaround.c

___
Python tracker 

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



[issue47021] Add separate match and case doc to pydoc

2022-03-14 Thread Duck


New submission from Duck :

Currently pydoc (and therefore things like the interactive help prompt) do not 
have documentation for the soft-keywords "match" and "case".

```
help> match
No Python documentation found for 'match'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.
```

I think that it would make sense for both of these prompts to give the docs for 
the match statement 
(https://docs.python.org/3/reference/compound_stmts.html#the-match-statement) 
similar to the other compound statements.

The "compound" doc already contains the match statement documentation, but is 
unnecessarily long at over 48000 characters, and is only accessed by the 
unhelpful named for this purpose "LOOPING" prompt. As soft keywords, they also 
might be best added in a separate section in "keywords" (and potentially with 
"_", although this already refers to "PRIVATENAMES" and is in "symbols").

A standalone match and case doc is not currently present in the 
Lib/pydoc_data/topics.py file automatically generated from documentation, and 
would need to be added in some way to do this.

--
components: Library (Lib)
messages: 415217
nosy: duckboycool
priority: normal
severity: normal
status: open
title: Add separate match and case doc to pydoc
type: enhancement

___
Python tracker 

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



[issue47015] Update tests from asyncore to asyncio

2022-03-14 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +asvetlov, giampaolo.rodola, josiahcarlson, stutzbach, yselivanov

___
Python tracker 

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



[issue47019] Fatal Python Error in sqlite3 Python 3.10

2022-03-14 Thread hydroflask


hydroflask  added the comment:

If you connect to the sqlite3 database in the example without using the 
factory, it will simply segfault.

--

___
Python tracker 

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



[issue47020] float('nan')==math.nan does NOT evaluate to True (as suggested by documentation).

2022-03-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

Jelle gives the correct reason for what you're seeing.

Also note:

>>> math.nan == math.nan
False
>>> float('nan') == float('nan')
False

If there's some specific part of the documentation that you think is 
misleading, please reopen this and point us to the wording that's confusing.

--
nosy: +eric.smith
resolution:  -> not a bug
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



[issue47020] float('nan')==math.nan does NOT evaluate to True (as suggested by documentation).

2022-03-14 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

I'm guessing you're referring to 
https://docs.python.org/3.8/library/math.html#math.nan. The text says 
explicitly that math.nan is "equivalent" to float("nan"), not that it is equal. 
This is correct.

nan is not equal to itself, because (for better or worse) that's what the IEEE 
standard requires. You can instead use math.isnan() to check whether a number 
is a nan.

--
nosy: +JelleZijlstra

___
Python tracker 

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



[issue47020] float('nan')==math.nan does NOT evaluate to True (as suggested by documentation).

2022-03-14 Thread Pablo Dumas


New submission from Pablo Dumas :

float('nan')==math.nan  does NOT evaluate to True (as suggested by 
documentation).
On the other hand, float('inf')==math.inf  DOES evaluate to True (as 
suggested by documentation).

Documentation we're referring to: https://docs.python.org/3.8/library/math.html

--
assignee: docs@python
components: Documentation
messages: 415213
nosy: docs@python, w0rthle$$
priority: normal
severity: normal
status: open
title: float('nan')==math.nan  does NOT evaluate to True (as suggested by 
documentation).
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



[issue47019] Fatal Python Error in sqlite3 Python 3.10

2022-03-14 Thread hydroflask


New submission from hydroflask :

_destructor in connection.c in Python 3.10+ now calls `PyGILState_Ensure()`, 
this is a problem because if the destructor is being called while the thread is 
being torn down it will cause an unbalanced/erroneous call to 
"PyEval_RestoreThread" in PyGILState_Ensure which will eventually trigger a 
Fatal Python Error. A perfect repro has been attached, should be run on Linux.

My recommended fix is to call sqlite3_close() within 
Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS, and manually Py_DECREF all 
connection-related functions afterward.

--
components: Extension Modules, Library (Lib)
files: sqlite3_fatal_python_error.py
messages: 415212
nosy: erlendaasland, hydroflask
priority: normal
severity: normal
status: open
title: Fatal Python Error in sqlite3 Python 3.10
type: crash
versions: Python 3.10, Python 3.11
Added file: https://bugs.python.org/file50676/sqlite3_fatal_python_error.py

___
Python tracker 

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



[issue43721] Documentation of property.{getter, setter, deleter} fails to mention that a *new* property is returned

2022-03-14 Thread Alex Waygood


Change by Alex Waygood :


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



[issue46950] Windows 11, VENV not working with case sensitive windows paths

2022-03-14 Thread Eryk Sun


Eryk Sun  added the comment:

In 3.10, you should be able to work around the problem for the venv 
site-packages directory by setting the environment variable "PYTHONPLATLIBDIR" 
to "Lib". This sets sys.platlibdir, which the site module uses to create the 
site-packages directory. The default value is "lib", which isn't properly 
capitalized.

In 3.11, sys.platlibdir defaults to "DLLs" in Windows, and the site module 
ignores this attribute. However, the site module does hard code the properly 
capitalized value "Lib".

In POSIX, sys.platlibdir (e.g. "lib" or "lib64") is a common base directory for 
the standard library and its extension modules. It isn't just the directory for 
extension modules, as might be implied by changing the value to "DLLs" in 
Windows. The "DLLs" directory in Windows Python is split off from "Lib" (for 
some legacy reason, I suppose), so Windows would need separate sys.platlibdir 
("Lib") and sys.platextdir ("DLLs") values, if that mattered, which it doesn't 
since the names are fixed.

--
nosy: +eryksun

___
Python tracker 

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



[issue43721] Documentation of property.{getter, setter, deleter} fails to mention that a *new* property is returned

2022-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset f1a5e1b89a526da0d66c5b368c924298291abb1a by Miss Islington (bot) 
in branch '3.9':
bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)
https://github.com/python/cpython/commit/f1a5e1b89a526da0d66c5b368c924298291abb1a


--

___
Python tracker 

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



[issue43721] Documentation of property.{getter, setter, deleter} fails to mention that a *new* property is returned

2022-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset cebdc325580b49f4c7eb3c61a24c9e7f41ca736b by Miss Islington (bot) 
in branch '3.10':
bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)
https://github.com/python/cpython/commit/cebdc325580b49f4c7eb3c61a24c9e7f41ca736b


--

___
Python tracker 

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



[issue47012] Speed up iteration of bytes and bytearray

2022-03-14 Thread Jeremiah Gabriel Pascual


Change by Jeremiah Gabriel Pascual :


--
nosy: +Crowthebird

___
Python tracker 

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



[issue43721] Documentation of property.{getter, setter, deleter} fails to mention that a *new* property is returned

2022-03-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29985
pull_request: https://github.com/python/cpython/pull/31887

___
Python tracker 

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



[issue43721] Documentation of property.{getter, setter, deleter} fails to mention that a *new* property is returned

2022-03-14 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +29984
pull_request: https://github.com/python/cpython/pull/31886

___
Python tracker 

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



[issue43721] Documentation of property.{getter, setter, deleter} fails to mention that a *new* property is returned

2022-03-14 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset e3d348a5252549708fd19338b675a2c23b60d677 by Irit Katriel in 
branch 'main':
bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)
https://github.com/python/cpython/commit/e3d348a5252549708fd19338b675a2c23b60d677


--

___
Python tracker 

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



[issue47016] Create a test verifying bundled pip and setuptools wheels

2022-03-14 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +ned.deily

___
Python tracker 

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



[issue35844] Calling `Multiprocessing.Queue.close()` too quickly causes intermittent failure (BrokenPipeError)

2022-03-14 Thread Géry

Change by Géry :


--
nosy: +maggyero

___
Python tracker 

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



[issue47018] ImportError: cannot import name '_simple_enum' from 'enum'

2022-03-14 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

What makes you think you are supposed to be able to import _simple_enum? It is 
a name with a leading underscore, so even if it exists, it is private and you 
shouldn't touch it.

Unless _simple_enum is documented as something you can use, this is not a bug 
and there is nothing to fix.

I don't see "_simple_enum" listed anywhere in the enum documentation, so why do 
you think you should be able to import it?

https://docs.python.org/3/library/enum.html


By the way, "reinstall Python" is almost never the solution to problems. Why do 
you think you need to "fix the install"?

--
nosy: +steven.daprano
resolution:  -> not a bug
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



[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2022-03-14 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -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



[issue47018] ImportError: cannot import name '_simple_enum' from 'enum'

2022-03-14 Thread AverseMoon54797


New submission from AverseMoon54797 :

Why is this happening? Is there a fix for this I can't even fix the install 
because I get this error trying to reinstall cpython.

--
messages: 415206
nosy: AverseMoon
priority: normal
severity: normal
status: open
title: ImportError: cannot import name '_simple_enum' from 'enum'

___
Python tracker 

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



[issue43253] asyncio open_connection fails when a socket is explicitly closed

2022-03-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Maximilian, thanks for the investigation.

A check for 'fileno != -1' seems correct to me.
Would you prepare a pull request?

--

___
Python tracker 

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



[issue45336] xml.etree.ElementTree.write does not support `standalone` option

2022-03-14 Thread Eric Vergnaud


Eric Vergnaud  added the comment:

Actually there are 2 distinct issues here:
 - ValueError: cannot use non-qualified names with default_namespace option
 - lack of 'standalone' option when writing XML PI

--

___
Python tracker 

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



[issue47017] frozen modules are on by default in dev build

2022-03-14 Thread Guido van Rossum


Change by Guido van Rossum :


--
type:  -> behavior
versions: +Python 3.11

___
Python tracker 

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



[issue47017] frozen modules are on by default in dev build

2022-03-14 Thread Guido van Rossum


New submission from Guido van Rossum :

At least on Windows and macOS, this repro shows that frozen modules are on in a 
dev build:

Mac:

~/cpython$ ./python.exe -c 'import os; print(os._exists.__code__)'
", line 41>

~/cpython$ ./python.exe -Xfrozen_modules=off -c 'import os; 
print(os._exists.__code__)'


On Windows, the same except use .\python.bat.

--
messages: 415203
nosy: eric.snow, gvanrossum
priority: normal
severity: normal
status: open
title: frozen modules are on by default in dev build

___
Python tracker 

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



[issue42863] Python venv inconsistent folder structure on windows

2022-03-14 Thread Steve Dower


Steve Dower  added the comment:

Considering you've just been encountering issues with mismatched case, you're 
likely aware of how much harder that will make it to fix.

First you'll need a proposal on how to ensure deprecation warnings reach those 
who need them. I'd suggest for "Scripts"->"bin", you'll need to generate 
different stubs in "Scripts" that warn when they are called, but not the ones 
in "bin".

This alone affects enough of the ecosystem to need a PEP and a lot of 
coordination. It's not a simple change - sure you're ready for it?

--

___
Python tracker 

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



Re: Weird strace of #! python script

2022-03-14 Thread Barry



> On 14 Mar 2022, at 21:29, Dan Stromberg  wrote:
> 
> I expected to see an exec of /usr/bin/python2, but I don't.  I just see an
> exec of /tmp/t.

I understand that the kernel handles the #! Line itself, which is why you do 
not see it in strace.

Barry



-- 
https://mail.python.org/mailman/listinfo/python-list


[issue46950] Windows 11, VENV not working with case sensitive windows paths

2022-03-14 Thread Steve Dower


Steve Dower  added the comment:

Okay, so that means there's some code somewhere that has a lowercase "lib".

If you change it back to "Lib", can you do "python -m pip"? If that works, but 
a direct "pip" does not, it'll be an issue in pip (or a dependency), as those 
executables are generated by them.

There are likely many places where we rely on case-insensitivity throughout the 
codebase though, and certainly a number of places where we unconditionally 
casefold on Windows before doing comparisons. It's going to take a decent 
amount of time to track these down, and may not always be feasible, but if we 
can start enumerating them then it's worth making the fixes.

--
versions: +Python 3.11 -Python 3.10, Python 3.9

___
Python tracker 

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



[issue47014] ProactorEventLoop ignores Ctrl+C after closing unrelated loop

2022-03-14 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Ctrl-C handling is added by #23057

It uses signal.set_wakeup_fd() 
https://github.com/asvetlov/cpython/blob/main/Lib/asyncio/proactor_events.py#L631-L634

So, the last event loop steals Ctrl+C handling.
Not sure if we can improve it.
Running two concurrent loops in the same thread is a bad idea for many reasons. 
Ctrl+C is not the only reason.

--

___
Python tracker 

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



[issue45336] xml.etree.ElementTree.write does not support `standalone` option

2022-03-14 Thread Eric Vergnaud


Eric Vergnaud  added the comment:

lxml tostring does not support the default_namespace value so not an option

--

___
Python tracker 

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



[issue45336] xml.etree.ElementTree.write does not support `standalone` option

2022-03-14 Thread Eric Vergnaud


Eric Vergnaud  added the comment:

This is not a feature request, it's a bug fix request, so should be fixed asap.

Why is it a bug ?
XML spec says that "the default namespace does not apply to attribute names" 
(see section 6.3), therefore having a simple attribute name when using a 
default namespace is a perfectly valid scenario.

Raising a ValueError in add_qname (line 864) is therefore incorrect if the 
qname being added is a simple name of an attribute

not sure if lxml is able to parse very large documents (>4g) but I'll try it

--
nosy: +ericvergnaud

___
Python tracker 

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



Re: Weird strace of #! python script

2022-03-14 Thread Chris Angelico
On Tue, 15 Mar 2022 at 08:28, Dan Stromberg  wrote:
>
> Hi folks.
>
> First off, I know, python2 is ancient history.  Porting to 3.x is on my
> list of things to do (though I'm afraid it's not yet at the top of the
> list), and the same thing happens with python3.
>
> So anyway, I'm strace'ing a #!/usr/bin/python2 script.
>
> I expected to see an exec of /usr/bin/python2, but I don't.  I just see an
> exec of /tmp/t.
>
> As follows:
> tact@celery_worker:/app$ strace -f -s 1024 -o /tmp/t.strace /tmp/t
> ^Z
> [1]+  Stopped strace -f -s 1024 -o /tmp/t.strace /tmp/t
> tact@celery_worker:/app$ bg
> [1]+ strace -f -s 1024 -o /tmp/t.strace /tmp/t &
> tact@celery_worker:/app$ ps axf
>   PID TTY  STAT   TIME COMMAND
>  1163 pts/0Ss 0:00 bash
>  1363 pts/0S  0:00  \_ strace -f -s 1024 -o /tmp/t.strace /tmp/t
>  1366 pts/0S  0:00  |   \_ /usr/bin/python2 /tmp/t
>  1367 pts/0R+ 0:00  \_ ps axf
> tact@celery_worker:/app$ fg
> bash: fg: job has terminated
> [1]+  Donestrace -f -s 1024 -o /tmp/t.strace /tmp/t
> tact@celery_worker:/app$ grep execve /tmp/t.strace
> 1366  execve("/tmp/t", ["/tmp/t"], 0x7ffd89f9c3b8 /* 49 vars */) = 0
> tact@celery_worker:/app$
>
> I've deleted some irrelevant processes from the 'ps axf'.
>
> /tmp/t is actually just:
> tact@celery_worker:/app$ cat /tmp/t
> #!/usr/bin/python2
>
> import time
>
> time.sleep(10)
>
>
> Was this some sort of security feature I never heard about?  I'm tracing a
> very simple time.sleep(10) here, but the same thing is (not) happening in a
> larger script that I need to track down a bug in.
>
> Is there a way I can coax Linux and/or strace to show all the exec's, like
> they used to?  Not having them makes me wonder what else is missing from
> the strace report.
>
> I'm on a Debian 11.2 system with strace 5.10 and Python 2.7.18.
>
> Thanks!

I'm not sure, but I suspect that strace is skipping the exec into the
process itself. When I try this myself, I can see the trace of the
sleep call itself (it's implemented on top of select()), so it does
seem to be doing the proper trace. My guess is that the shebang is
being handled inside the exec of /tmp/t itself, rather than being a
separate syscall.

In any case, it doesn't seem to be a Python thing; I can trigger the
same phenomenon with other interpreters.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31415] Add -X option to show import time

2022-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset 73943ce7d31595d152dc01bf0008b37c802c0d3b by Miss Islington (bot) 
in branch '3.9':
bpo-31415: importtime was made by Inada Naoki (GH-31875)
https://github.com/python/cpython/commit/73943ce7d31595d152dc01bf0008b37c802c0d3b


--

___
Python tracker 

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



[issue47016] Create a test verifying bundled pip and setuptools wheels

2022-03-14 Thread Illia Volochii


Change by Illia Volochii :


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

___
Python tracker 

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



[issue47016] Create a test verifying bundled pip and setuptools wheels

2022-03-14 Thread Illia Volochii


Change by Illia Volochii :


--
nosy: +pablogsal

___
Python tracker 

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



[issue42863] Python venv inconsistent folder structure on windows

2022-03-14 Thread Darrel O'Pry


Darrel O'Pry  added the comment:

steve,

I would be willing to champion this change. The process seems pretty 
straightforward. Create a release that creates the consistent layout on 
windows, symlinks the legacy paths, and adds some deprecation warnings.  Then 
in a later release remove the symlinks and deprecation warnings.. Any way you 
would be willing to guide me through the process?

--
nosy: +darrel.opry

___
Python tracker 

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



Weird strace of #! python script

2022-03-14 Thread Dan Stromberg
Hi folks.

First off, I know, python2 is ancient history.  Porting to 3.x is on my
list of things to do (though I'm afraid it's not yet at the top of the
list), and the same thing happens with python3.

So anyway, I'm strace'ing a #!/usr/bin/python2 script.

I expected to see an exec of /usr/bin/python2, but I don't.  I just see an
exec of /tmp/t.

As follows:
tact@celery_worker:/app$ strace -f -s 1024 -o /tmp/t.strace /tmp/t
^Z
[1]+  Stopped strace -f -s 1024 -o /tmp/t.strace /tmp/t
tact@celery_worker:/app$ bg
[1]+ strace -f -s 1024 -o /tmp/t.strace /tmp/t &
tact@celery_worker:/app$ ps axf
  PID TTY  STAT   TIME COMMAND
 1163 pts/0Ss 0:00 bash
 1363 pts/0S  0:00  \_ strace -f -s 1024 -o /tmp/t.strace /tmp/t
 1366 pts/0S  0:00  |   \_ /usr/bin/python2 /tmp/t
 1367 pts/0R+ 0:00  \_ ps axf
tact@celery_worker:/app$ fg
bash: fg: job has terminated
[1]+  Donestrace -f -s 1024 -o /tmp/t.strace /tmp/t
tact@celery_worker:/app$ grep execve /tmp/t.strace
1366  execve("/tmp/t", ["/tmp/t"], 0x7ffd89f9c3b8 /* 49 vars */) = 0
tact@celery_worker:/app$

I've deleted some irrelevant processes from the 'ps axf'.

/tmp/t is actually just:
tact@celery_worker:/app$ cat /tmp/t
#!/usr/bin/python2

import time

time.sleep(10)


Was this some sort of security feature I never heard about?  I'm tracing a
very simple time.sleep(10) here, but the same thing is (not) happening in a
larger script that I need to track down a bug in.

Is there a way I can coax Linux and/or strace to show all the exec's, like
they used to?  Not having them makes me wonder what else is missing from
the strace report.

I'm on a Debian 11.2 system with strace 5.10 and Python 2.7.18.

Thanks!
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue46950] Windows 11, VENV not working with case sensitive windows paths

2022-03-14 Thread Darrel O'Pry


Darrel O'Pry  added the comment:

renaming Lib to lib seems to also resolve the problem...

--

___
Python tracker 

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



[issue31415] Add -X option to show import time

2022-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset 9f1587e8d3f18729a0982774c6c4409472cbd9e3 by Miss Islington (bot) 
in branch '3.10':
bpo-31415: importtime was made by Inada Naoki (GH-31875)
https://github.com/python/cpython/commit/9f1587e8d3f18729a0982774c6c4409472cbd9e3


--

___
Python tracker 

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



[issue47016] Create a test verifying bundled pip and setuptools wheels

2022-03-14 Thread Illia Volochii

New submission from Illia Volochii :

Bundled pip and setuptools wheels have to be verified manually at the moment 
when they are upgraded.
We can automate this by comparing their checksums to ones provided by 
Warehouse’s JSON API (e.g., https://pypi.org/pypi/pip/json.)

Since such a check requires network activity and not to slow down tests, 
creating a GitHub Actions workflow that runs only when the files are changed is 
a good option.

I suggested this in 
https://github.com/python/cpython/pull/30178#issuecomment-998765841 originally.

--
components: Library (Lib)
messages: 415193
nosy: illia-v
priority: normal
severity: normal
status: open
title: Create a test verifying bundled pip and setuptools wheels
type: enhancement
versions: Python 3.10, Python 3.11, 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



[issue46950] Windows 11, VENV not working with case sensitive windows paths

2022-03-14 Thread Steve Dower


Steve Dower  added the comment:

As a quick (wild) guess, is it expecting the "Lib" directory to be lowercase 
"lib"?

Could you try renaming that directory in your venv and see if it changes 
anything?

--

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread Ned Deily


Change by Ned Deily :


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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread STINNER Victor


STINNER Victor  added the comment:

Ned Deily:
> My apologies for not testing running the test suite with installed Pythons as 
> I usually do and thanks, Victor, for noting the buildbot failures.

Well, the change didn't land into a Python release. Right now, the test suite 
is only run on an installed Python on buildbots.

The regression was noticed early, so it's fine.

Yeah, a revert is better to unblock the releases, to have more time to 
investigate what's going on.

--

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread Ned Deily


Ned Deily  added the comment:


New changeset 1b1239205d1b7ace1b054477c14fe77d54f471c4 by Ned Deily in branch 
'3.9':
Revert "bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820)" (GH-31881)
https://github.com/python/cpython/commit/1b1239205d1b7ace1b054477c14fe77d54f471c4


--

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread Ned Deily


Ned Deily  added the comment:


New changeset 0cfcc0cbee4a0d48c412169f46b7199728fb298a by Ned Deily in branch 
'3.10':
Revert "bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820)" (GH-31880)
https://github.com/python/cpython/commit/0cfcc0cbee4a0d48c412169f46b7199728fb298a


--

___
Python tracker 

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



[issue31415] Add -X option to show import time

2022-03-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29982
pull_request: https://github.com/python/cpython/pull/31884

___
Python tracker 

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



[issue31415] Add -X option to show import time

2022-03-14 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 12.0 -> 13.0
pull_requests: +29981
pull_request: https://github.com/python/cpython/pull/31883

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread Ned Deily


Ned Deily  added the comment:


New changeset 80cc10fa7d5f41daaf59ae9173022303f35a403c by Ned Deily in branch 
'3.7':
Revert "bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820)" (GH-31882)
https://github.com/python/cpython/commit/80cc10fa7d5f41daaf59ae9173022303f35a403c


--

___
Python tracker 

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



[issue30677] [doc] mention that os.mkdir() raises FileNotFound if path does not exist

2022-03-14 Thread Irit Katriel


Change by Irit Katriel :


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



[issue30677] [doc] mention that os.mkdir() raises FileNotFound if path does not exist

2022-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset b4fd91b4d931dd97ceaf76750d227dd042c236f8 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-30677: [doc] mention that os.mkdir() can raise FileNotFoundError 
(GH-31548) (GH-31878)
https://github.com/python/cpython/commit/b4fd91b4d931dd97ceaf76750d227dd042c236f8


--

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +29980
pull_request: https://github.com/python/cpython/pull/31882

___
Python tracker 

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



[issue30677] [doc] mention that os.mkdir() raises FileNotFound if path does not exist

2022-03-14 Thread miss-islington


miss-islington  added the comment:


New changeset efa72501599029d9ac3f8a2e5ce900302c7d8f56 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-30677: [doc] mention that os.mkdir() can raise FileNotFoundError 
(GH-31548) (GH-31877)
https://github.com/python/cpython/commit/efa72501599029d9ac3f8a2e5ce900302c7d8f56


--

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +29979
pull_request: https://github.com/python/cpython/pull/31881

___
Python tracker 

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



[issue47015] Update tests from asyncore to asyncio

2022-03-14 Thread Oleg Iarygin


Change by Oleg Iarygin :


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

___
Python tracker 

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



[issue47015] Update tests from asyncore to asyncio

2022-03-14 Thread Oleg Iarygin

New submission from Oleg Iarygin :

PEP 594 – Removing dead batteries from the standard library [1] removes 
asyncore and asynchat in 3.12 with the following note:

> The asyncore module is also used in stdlib tests. The tests for ftplib, 
> logging, smptd, smtplib, and ssl are partly based on asyncore. These tests 
> must be updated to use asyncio or threading.

(Note: the tests for `os` module are not mentioned and smtpd will be removed in 
3.12 along with its tests anyway)

I'm performing the update now to avoid keeping asynchat and asyncore as private 
subpackages of `test` package.

[1] https://peps.python.org/pep-0594/

--
components: Tests
messages: 415185
nosy: arhadthedev
priority: normal
severity: normal
status: open
title: Update tests from asyncore to asyncio
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +29977
pull_request: https://github.com/python/cpython/pull/31880

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread Ned Deily


Ned Deily  added the comment:


New changeset 19f69993ae97db0bbea3b845a33b060b73b658b3 by Ned Deily in branch 
'main':
Revert "bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820)" (GH-31879)
https://github.com/python/cpython/commit/19f69993ae97db0bbea3b845a33b060b73b658b3


--

___
Python tracker 

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



[issue46975] clang: error: linker command failed with exit code 1 (use -v to see invocation) on m1 mac

2022-03-14 Thread Ned Deily


Change by Ned Deily :


--
resolution:  -> third party
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



[issue46975] clang: error: linker command failed with exit code 1 (use -v to see invocation) on m1 mac

2022-03-14 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I've had the same issue and fixed it with:

  brew remove --ignore-dependencies gettext

@Ned thanks for help!

--
nosy: +andrei.avk

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +29976
pull_request: https://github.com/python/cpython/pull/31879

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread Ned Deily


Ned Deily  added the comment:

My apologies for not testing running the test suite with installed Pythons as I 
usually do and thanks, Victor, for noting the buildbot failures. I'm reverting 
these setuptools updates to avoid blocking releases. We can track the issue 
with setuptools in bpo-47013.

--

___
Python tracker 

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



[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-14 Thread Steve Dower


Steve Dower  added the comment:

> I do process the shebang to restrict searching, or did you mean something 
> else?

That's what I meant. Guess I missed seeing it when scanning the code (probably 
I should've read the docs :D )

> And registry support [is 
> planned](https://github.com/brettcannon/python-launcher/issues/15).

It's attached to a milestone with no due date and 0% completion ;) Being aware 
that you'll need to do it isn't the same as planning to do it.

--

___
Python tracker 

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



[issue47013] test_bdb and test_distutils fail on installed Python 3.9, 3.10 and 3.11 (setuptools 60.9.3, pip 22.0.4)

2022-03-14 Thread Ned Deily


Ned Deily  added the comment:

(The buildbot failures were triggered by yesterday's merges for Issue46986 
which updated the bundled setuptools in ensurepip. I'm reverting those merges 
now to unblock planned releases.)

--
nosy: +jaraco, ned.deily
versions: +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



[issue30677] [doc] mention that os.mkdir() raises FileNotFound if path does not exist

2022-03-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29975
pull_request: https://github.com/python/cpython/pull/31878

___
Python tracker 

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



[issue30677] [doc] mention that os.mkdir() raises FileNotFound if path does not exist

2022-03-14 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +29974
pull_request: https://github.com/python/cpython/pull/31877

___
Python tracker 

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



[issue30677] [doc] mention that os.mkdir() raises FileNotFound if path does not exist

2022-03-14 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 879fbd9472753149b627f32add3ddca90ac47ab7 by slateny in branch 
'main':
bpo-30677: [doc] mention that os.mkdir() can raise FileNotFoundError (GH-31548)
https://github.com/python/cpython/commit/879fbd9472753149b627f32add3ddca90ac47ab7


--
nosy: +iritkatriel

___
Python tracker 

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



[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-14 Thread Brett Cannon


Brett Cannon  added the comment:

"Practically nothing can be reused - there's no registry, no shebang handling, 
and our process launching on Windows is already very complex (and has to remain 
that way for compatibility)."

I do process the shebang to restrict searching, or did you mean something else?

And registry support [is 
planned](https://github.com/brettcannon/python-launcher/issues/15).

--

___
Python tracker 

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



Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-14 Thread Marco Sulla
On Mon, 14 Mar 2022 at 18:33, Loris Bennett  wrote:
> I am not sure how different the two situations are.  Ubuntu is
> presumably relying on the Debian security team as well as other
> volunteers and at least one company, namely Canonical.

So do you think that Canonical contributes to the LTS security team of
Debian? It could be. In this perspective, there should be little
difference between Debian and Ubuntu. Debian 11 with XFCE is really
tempting...
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue47008] Add Lib/site-packages to .gitignore

2022-03-14 Thread Dennis Sweeney


Change by Dennis Sweeney :


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



Re: Reportlab / platypus bug?

2022-03-14 Thread Dennis Lee Bieber
On Mon, 14 Mar 2022 19:17:31 +0100, Les  declaimed the
following:

>Unfortunately, the reportlab-users mailing list is unavailable (I cannot
>subscribe). There is paid support but since I already have a workaround, I
>won't pay for this. I think this is a documentation error of the reportlab
>package. (They do not mention that stories cannot be reused.)
>

https://github.com/eduardocereto/reportlab/blob/master/src/reportlab/platypus/doctemplate.py
"""
A document is built when a DocumentTemplate is fed a sequence of Flowables.
The action of the build consumes the flowables in order and places them
onto frames on pages as space allows.  When a frame runs out of space the
next frame of the page is used.  If no frame remains a new page is created.
A new page can also be created if a page break is forced.
"""

Well, the code does use the term "consumes"

And down near the bottom (line 980 or so; this is a section that does
multiple passes for special cases)
"""
# work with a copy of the story, since it is consumed
tempStory = story[:]
self.build(tempStory, **buildKwds)
#self.notify('debug',None)
"""



-- 
Wulfraed Dennis Lee Bieber AF6VN
wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Reportlab / platypus bug?

2022-03-14 Thread Les
Unfortunately, the reportlab-users mailing list is unavailable (I cannot
subscribe). There is paid support but since I already have a workaround, I
won't pay for this. I think this is a documentation error of the reportlab
package. (They do not mention that stories cannot be reused.)

I think we can say that my original problem is solved, because I have a
workaround that always works.

Schachner, Joseph  ezt írta (időpont: 2022.
márc. 14., H 19:09):

> I realize this is Python code, but I doubt that the question is a Python
> question.  I have used Python +numpy, scipy, matplotlib for years.   I have
> not used reportlab and have no idea about the reported problem except that
> I will be very surprised if it turns out to be a Python language issue.
>  Is there possibly a better place to ask this question?
>
>
> Teledyne Confidential; Commercially Sensitive Business Data
>
> -Original Message-
> From: Les 
> Sent: Sunday, March 13, 2022 4:56 PM
> To: python-list@python.org
> Subject: Reportlab / platypus bug?
>
>   Hello,
>
> I have found an error, and I created a minimal working example. The
> minimal working example starts with the very first example from Platypus
> user guide:
>
> from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer from
> reportlab.lib.styles import getSampleStyleSheet from
> reportlab.lib.pagesizes import A4 from reportlab.lib.units import inch
>
> PAGE_HEIGHT = A4[1]
> PAGE_WIDTH = A4[0]
> styles = getSampleStyleSheet()
>
> Title = "Hello world"
> pageinfo = "platypus example"
>
>
> def myFirstPage(canvas, doc):
> canvas.saveState()
> canvas.setFont('Times-Bold', 16)
> canvas.drawCentredString(PAGE_WIDTH / 2.0, PAGE_HEIGHT - 108, Title)
> canvas.setFont('Times-Roman', 9)
> canvas.drawString(inch, 0.75 * inch, "First Page / %s" % pageinfo)
> canvas.restoreState()
>
>
> def myLaterPages(canvas, doc):
> canvas.saveState()
> canvas.setFont('Times-Roman', 9)
> canvas.drawString(inch, 0.75 * inch, "Page %d %s" % (doc.page,
> pageinfo))
> canvas.restoreState()
>
>
> def go():
> Story = [Spacer(1, 2 * inch)]
> style = styles["Normal"]
> for i in range(100):
> bogustext = ("This is Paragraph number %s. " % i) * 20
> p = Paragraph(bogustext, style)
> Story.append(p)
> Story.append(Spacer(1, 0.2 * inch))
> doc = SimpleDocTemplate("phello.pdf")
> doc.build(Story, onFirstPage=myFirstPage, onLaterPages=myLaterPages)
>
>
> go()
>
>
> If I change it to this (e.g. generate two identical files):
>
> doc = SimpleDocTemplate("phello.pdf")
> doc.build(Story, onFirstPage=myFirstPage, onLaterPages=myLaterPages) doc =
> SimpleDocTemplate("phello2.pdf") doc.build(Story, onFirstPage=myFirstPage,
> onLaterPages=myLaterPages)
>
>
> then it builds phello.pdf correctly, but builds a totally empty phello2.pdf
> (960 bytes, a single white empty page).
>
> It is hard to explain as it is, but something even more interesting
> happens if you try to make them totally independent, and create a copy of
> the story as well:
>
> import copy
> doc = SimpleDocTemplate("phello.pdf")
> doc.build(copy.copy(Story), onFirstPage=myFirstPage,
> onLaterPages=myLaterPages) doc = SimpleDocTemplate("phello2.pdf")
> doc.build(copy.copy(Story), onFirstPage=myFirstPage,
> onLaterPages=myLaterPages)
>
>
> This will render phello.pdf correctly, and it will throw this error when
> rendering phello2.pdf:
>
> Traceback (most recent call last):
>   File "C:\Projects\test\test2.py", line 48, in 
> go()
>   File "C:\Projects\test\test2.py", line 45, in go
> doc.build(copy.copy(Story), onFirstPage=myFirstPage,
> onLaterPages=myLaterPages)
>   File
>
> "C:\Users\nagyl\.virtualenvs\test-NC9-O-tN\lib\site-packages\reportlab\platypus\doctemplate.py",
> line 1314, in build
> BaseDocTemplate.build(self,flowables, canvasmaker=canvasmaker)
>   File "C:\Users\nagyl\.virtualenvs\
> test-NC9-O-tN\lib\site-packages\reportlab\platypus\doctemplate.py", line
> 1079, in build
> self.handle_flowable(flowables)
>   File "C:\Users\nagyl\.virtualenvs\
> test-NC9-O-tN\lib\site-packages\reportlab\platypus\doctemplate.py", line
> 958, in handle_flowable
> raise LayoutError(ident)
> reportlab.platypus.doctemplate.LayoutError: Flowable  0x148e102cb80 frame=normal>This is Paragraph number 6. This is Paragraph
> number 6. This(439.27559055118115 x 72) too large on page 1 in frame
> 'normal'(439.27559055118115 x 685.8897637795277) of template 'First'
>
> And finally, here is the "solution" that solves all problems:
>
>
> def go():
> def create_story():
> Story = [Spacer(1, 2 * inch)]
> style = styles["Normal"]
> for i in range(100):
> bogustext = ("This is Paragraph number %s. " % i) * 20
> p = Paragraph(bogustext, style)
> Story.append(p)
> Story.append(Spacer(1, 0.2 * inch))
> return Story
>
> doc = SimpleDocTemplate("phello.pdf")
> 

[issue46785] On Windows, os.stat() can fail if called while another process is creating or deleting the file

2022-03-14 Thread Steve Dower


Steve Dower  added the comment:

> It would probably be better to skip tests if the filesystem of the current 
> working directory doesn't support the test, 

Yes, this would be good. Then whoever is configuring the test runner can 
move where tests are run to make sure it is supported. There are command 
line options specifically for this, that also correctly handle 
multiprocessing.

Tests that bypass the CWD make this unfixable by the runner, which is 
why they should just use CWD.

--

___
Python tracker 

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



RE: Reportlab / platypus bug?

2022-03-14 Thread Schachner, Joseph
I realize this is Python code, but I doubt that the question is a Python 
question.  I have used Python +numpy, scipy, matplotlib for years.   I have not 
used reportlab and have no idea about the reported problem except that I will 
be very surprised if it turns out to be a Python language issue.   Is there 
possibly a better place to ask this question?


Teledyne Confidential; Commercially Sensitive Business Data

-Original Message-
From: Les  
Sent: Sunday, March 13, 2022 4:56 PM
To: python-list@python.org
Subject: Reportlab / platypus bug?

  Hello,

I have found an error, and I created a minimal working example. The minimal 
working example starts with the very first example from Platypus user guide:

from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer from 
reportlab.lib.styles import getSampleStyleSheet from reportlab.lib.pagesizes 
import A4 from reportlab.lib.units import inch

PAGE_HEIGHT = A4[1]
PAGE_WIDTH = A4[0]
styles = getSampleStyleSheet()

Title = "Hello world"
pageinfo = "platypus example"


def myFirstPage(canvas, doc):
canvas.saveState()
canvas.setFont('Times-Bold', 16)
canvas.drawCentredString(PAGE_WIDTH / 2.0, PAGE_HEIGHT - 108, Title)
canvas.setFont('Times-Roman', 9)
canvas.drawString(inch, 0.75 * inch, "First Page / %s" % pageinfo)
canvas.restoreState()


def myLaterPages(canvas, doc):
canvas.saveState()
canvas.setFont('Times-Roman', 9)
canvas.drawString(inch, 0.75 * inch, "Page %d %s" % (doc.page, pageinfo))
canvas.restoreState()


def go():
Story = [Spacer(1, 2 * inch)]
style = styles["Normal"]
for i in range(100):
bogustext = ("This is Paragraph number %s. " % i) * 20
p = Paragraph(bogustext, style)
Story.append(p)
Story.append(Spacer(1, 0.2 * inch))
doc = SimpleDocTemplate("phello.pdf")
doc.build(Story, onFirstPage=myFirstPage, onLaterPages=myLaterPages)


go()


If I change it to this (e.g. generate two identical files):

doc = SimpleDocTemplate("phello.pdf")
doc.build(Story, onFirstPage=myFirstPage, onLaterPages=myLaterPages) doc = 
SimpleDocTemplate("phello2.pdf") doc.build(Story, onFirstPage=myFirstPage, 
onLaterPages=myLaterPages)


then it builds phello.pdf correctly, but builds a totally empty phello2.pdf
(960 bytes, a single white empty page).

It is hard to explain as it is, but something even more interesting happens if 
you try to make them totally independent, and create a copy of the story as 
well:

import copy
doc = SimpleDocTemplate("phello.pdf")
doc.build(copy.copy(Story), onFirstPage=myFirstPage, onLaterPages=myLaterPages) 
doc = SimpleDocTemplate("phello2.pdf") doc.build(copy.copy(Story), 
onFirstPage=myFirstPage, onLaterPages=myLaterPages)


This will render phello.pdf correctly, and it will throw this error when 
rendering phello2.pdf:

Traceback (most recent call last):
  File "C:\Projects\test\test2.py", line 48, in 
go()
  File "C:\Projects\test\test2.py", line 45, in go
doc.build(copy.copy(Story), onFirstPage=myFirstPage,
onLaterPages=myLaterPages)
  File
"C:\Users\nagyl\.virtualenvs\test-NC9-O-tN\lib\site-packages\reportlab\platypus\doctemplate.py",
line 1314, in build
BaseDocTemplate.build(self,flowables, canvasmaker=canvasmaker)
  File "C:\Users\nagyl\.virtualenvs\
test-NC9-O-tN\lib\site-packages\reportlab\platypus\doctemplate.py", line 1079, 
in build
self.handle_flowable(flowables)
  File "C:\Users\nagyl\.virtualenvs\
test-NC9-O-tN\lib\site-packages\reportlab\platypus\doctemplate.py", line 958, 
in handle_flowable
raise LayoutError(ident)
reportlab.platypus.doctemplate.LayoutError: Flowable This is Paragraph number 6. This is Paragraph number 
6. This(439.27559055118115 x 72) too large on page 1 in frame
'normal'(439.27559055118115 x 685.8897637795277) of template 'First'

And finally, here is the "solution" that solves all problems:


def go():
def create_story():
Story = [Spacer(1, 2 * inch)]
style = styles["Normal"]
for i in range(100):
bogustext = ("This is Paragraph number %s. " % i) * 20
p = Paragraph(bogustext, style)
Story.append(p)
Story.append(Spacer(1, 0.2 * inch))
return Story

doc = SimpleDocTemplate("phello.pdf")
doc.build(create_story(), onFirstPage=myFirstPage,
onLaterPages=myLaterPages)
doc = SimpleDocTemplate("phello2.pdf")
doc.build(create_story(), onFirstPage=myFirstPage,
onLaterPages=myLaterPages)


This does not throw an error, and it renders both files correctly. But I do not 
see why this last version works, and the previous one (that uses
copy.copy) does not.

I was looking for an explanation in the user guide. I was looking for a note, 
telling me that a story can be used for document generation only once. But 
there is no such thing in the docs. Or maybe I just did not find it. Can 
somebody please explain what is happening here?

Environment details: Python 3.10.1 amd64 on Windows, 

[issue46785] On Windows, os.stat() can fail if called while another process is creating or deleting the file

2022-03-14 Thread Eryk Sun


Eryk Sun  added the comment:

I was following the pattern of StatAttributeTests.test_access_denied(), which 
uses the current user's temp directory to get a filesystem that supports 
security. 

It would probably be better to skip tests if the filesystem of the current 
working directory doesn't support the test, e.g. if it needs NTFS or needs 
support for security, hard links, or reparse points. For example, 
Win32JunctionTests should be skipped if reparse points aren't supported. The 
os_helper module could implement a function that calls GetVolumeInformationW() 
to get the filesystem name (e.g. "Ntfs") and flags (e.g. FILE_PERSISTENT_ACLS, 
FILE_SUPPORTS_HARD_LINKS, FILE_SUPPORTS_REPARSE_POINTS).

--

___
Python tracker 

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



[issue46890] getpath problems with framework build

2022-03-14 Thread Steve Dower


Steve Dower  added the comment:

The sys module gets initialised in _PySys_UpdateConfig() in Python/sysmodule.c. 
It gets called later in pylifecycle.c. But it ought to just copy directly from 
the config.

However, it's the site.py module that actually updates sys.prefix for the venv. 
So you may just be inspecting at the wrong point? Or possibly it's in a 
codepath that doesn't run on macOS because *previously* it was being set 
correctly in getpath instead of being deferred until later?

--

___
Python tracker 

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



[issue46950] Windows 11, VENV not working with case sensitive windows paths

2022-03-14 Thread Darrel O'Pry


Darrel O'Pry  added the comment:

I've done some additional troubleshooting today. I have case sensitivity 
enabled in my git checkouts where I am creating the virtual env. I do this for 
a more consistent cross-platform experience for managing code with team members 
also using linux and macos. I have had issues in the past with case changes in 
filenames causing issue on projects and enabling case sensitivity has eliminate 
these issues when working with my counterparts on other platforms. 


I've tested the following with both powershell and bash. 

```
mkdir test-venv-case-sensitivity
cd test-venv-case-sensitivity
fsutil.exe file setCaseSensitiveInfo . enable
python -m venv ./venv
./venv/Scripts/Activate.ps1
pip # you should get the error "No module named 'pip'
cd ./venv/
fsutil.exe file setCaseSensitiveInfo . disable
pip # the command now works
```

This wasn't an issue prior to upgrading to Windows 11, so something may have 
changed in the handling of the case sensitivity flag on Windows. 

I have a venv created on windows 10, prior to my windows 11 upgrade that does 
work. 

I didn't encounter the issue until setting up an installation of Python 3.9.10 
to support another project, then trying to create a new 3.10.2 venv. 

I can work around the issue by specifically disabling case sentitivity in my 
venv folders, but it would be nice if venvs worked out of the box with case 
sensitive filesytems on windows. 


It seems like some code is making assumptions about case sensitivity on 
windows. 




I found that if I disable case sensitivity in the venv folder, the venv starts 
working again.

--
title: Windows 11 venv -> Windows 11, VENV not working with case sensitive 
windows paths

___
Python tracker 

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



[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-14 Thread Steve Dower


Steve Dower  added the comment:

I'd like to, the main challenge with that is it'd invalidate the code signature 
on the file, which will make it basically unusable (at the very least, you'll 
get warnings). A simple rename does not.

But yeah, it can probably go in. Hopefully my restructure will make it easier 
to follow where certain things get checked.

--

___
Python tracker 

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



[issue18309] Make python slightly more relocatable

2022-03-14 Thread Mathias Fröhlich

Mathias Fröhlich  added the comment:

Hey,

Shakeeb Alireza is right, the original problem was an application that links 
and embeds against libpython*{so,dll,dynlib} and should more easily find 
components like /*/lib*/python*.*/site.py and most probably now it needs to 
find getpath.py as well.

While I am no longer working on that application where I wanted to have that 
feature, I still believe it would be worthwhile to find the *.py files in the 
file system relative to the location of the libpython*{so,dll,dynlib} file.

Thanks for taking care.

Mathias

--

___
Python tracker 

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



[issue47001] deadlock in ctypes?

2022-03-14 Thread Rocco Matano


Rocco Matano  added the comment:

I forgot to say thank you. I would like to make up for that:
Thank you, Eryk.

--

___
Python tracker 

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



[issue31415] Add -X option to show import time

2022-03-14 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 29624e769c5c3c1e59c6acc8b69383ead53e8a9f by Victor Stinner in 
branch 'main':
bpo-31415: importtime was made by Inada Naoki (GH-31875)
https://github.com/python/cpython/commit/29624e769c5c3c1e59c6acc8b69383ead53e8a9f


--

___
Python tracker 

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



Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-14 Thread Loris Bennett
Marco Sulla  writes:

> On Fri, 11 Mar 2022 at 19:10, Michael Torrie  wrote:
>> Both Debian stable and Ubuntu LTS state they have a five year support
>> life cycle.
>
> Yes, but it seems that official security support in Debian ends after
> three years:
>
> "Debian LTS is not handled by the Debian security team, but by a
> separate group of volunteers and companies interested in making it a
> success"
> https://wiki.debian.org/LTS
>
> This is the only problem for me.

I am not sure how different the two situations are.  Ubuntu is
presumably relying on the Debian security team as well as other
volunteers and at least one company, namely Canonical.

The sysadmins I know who are interested in long-term stability and
avoiding unnecessary OS updates use Debian rather than Ubuntu, but
that's maybe just my bubble.

Cheers,

Loris

-- 
This signature is currently under construction.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue47014] ProactorEventLoop ignores Ctrl+C after closing unrelated loop

2022-03-14 Thread Maximilian Hils


New submission from Maximilian Hils :

When a (second) ProactorEventLoop is garbage-collected, the current 
ProactorEventLoop starts to ignore Ctrl+C on Windows until it is woken up. The 
attached repro shows a minimal example. Uncommenting the `create_task` call or 
not using a second event loop fixes the behavior.

I couldn't find any shared/global objects in asyncio/windows_events.py, so I'm 
not sure what is causing this, or why the wakeup task helps.

FWIW, the second event loop in our code base originated from a stray 
`get_event_loop()` call, one more example that speaks in favor of 
`get_running_loop()`!

--
components: asyncio
files: proactor-repro.py
messages: 415169
nosy: asvetlov, mhils, yselivanov
priority: normal
severity: normal
status: open
title: ProactorEventLoop ignores Ctrl+C after closing unrelated loop
type: behavior
versions: Python 3.10
Added file: https://bugs.python.org/file50675/proactor-repro.py

___
Python tracker 

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



[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-14 Thread Paul Moore


Paul Moore  added the comment:

> as well as potentially being able to be a script or .pyz launcher with a 
> simple rename.

Would it be possible to also make the launcher work when prepended to a 
zipfile? That's a really useful use-case (make a zipapp automatically runnable, 
but still a single file) that at the moment needs a 3rd party launcher (Vinay's 
simple-launcher project).

If not, then that's fine, but if we're already doing a significant rewrite that 
might be a good time to add it.

--

___
Python tracker 

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



[issue46785] On Windows, os.stat() can fail if called while another process is creating or deleting the file

2022-03-14 Thread Steve Dower


Steve Dower  added the comment:

>> Why can't the filename of the "foo"-like file in the test be
>> simply os_helper.TESTFN, as done in some other tests?
> 
> I suppose the current working directory will be fine. I was looking to keep 
> the test on a NTFS filesystem, with known behavior, but there's no hard 
> guarantee that the user's temp directory is on the system volume.

All tests should use the current working directory, or the test helper 
for getting other directories. *Do not look up other directories*, 
because it prevents test runners from ensuring that tests run in valid 
locations (and skips implicit tests for directories with spaces/Unicode 
characters/etc.)

--

___
Python tracker 

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



[issue46920] Remove code made dead long ago with #if 0

2022-03-14 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Oleg Iarygin for the cleanup!

--

___
Python tracker 

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



[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-14 Thread Steve Dower


Steve Dower  added the comment:

> If it's already turning into a rewrite, how feasible would it be to adopt 
> Brett's `py` launcher?

I looked at it already, and I'd have to write literally the same code to 
implement what's needed :) (as well as learning Rust and convincing everyone to 
let us use Rust in CPython...). Practically nothing can be reused - there's no 
registry, no shebang handling, and our process launching on Windows is already 
very complex (and has to remain that way for compatibility).

For now, the old launcher will remain to be used for venv redirectors, but I've 
got the setup in the new one to be able to play the same role, as well as 
potentially being able to be a script or .pyz launcher with a simple rename.

If Brett's proposal for extensions (other executables on PATH that know how to 
identify Python installs) happens, we'll probably copy it, though PEP 514 
covers Windows adequately (and the rewrite allows non-PythonCore installs to be 
found/launched). But the codebase itself isn't helpful.

--

___
Python tracker 

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



[issue31415] Add -X option to show import time

2022-03-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29973
pull_request: https://github.com/python/cpython/pull/31875

___
Python tracker 

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



[issue46920] Remove code made dead long ago with #if 0

2022-03-14 Thread Oleg Iarygin


Change by Oleg Iarygin :


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



[issue45786] Avoid allocating when exiting frame; it may be unsafe.

2022-03-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner
nosy_count: 2.0 -> 3.0
pull_requests: +29972
pull_request: https://github.com/python/cpython/pull/31874

___
Python tracker 

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



[issue47013] test_bdb and test_distutils fail on installed Python 3.9, 3.10 and 3.11 (setuptools 60.9.3, pip 22.0.4)

2022-03-14 Thread STINNER Victor


STINNER Victor  added the comment:

> $ ./configure --prefix /opt/py310 && make clean && make && make install 
> $ cd /somewhere/else/
> $ /opt/py310/bin/python3 -m test -v test_bdb

I also reproduce test_bdb and test_distutils failures on the main branch.

--

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread STINNER Victor


STINNER Victor  added the comment:

> This update broke the "s390x Fedora Rawhide Clang Installed 3.10" buildbot: 
> bpo-47013.

test_bdb and test_distutils fail on 3.9, 3.10 and main branches when run on an 
installed Python. I didn't check Python 3.7.

--

___
Python tracker 

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



[issue47013] test_bdb and test_distutils fail on installed Python 3.9, 3.10 and 3.11 (setuptools 60.9.3, pip 22.0.4)

2022-03-14 Thread STINNER Victor


STINNER Victor  added the comment:

AMD64 Fedora Stable Clang Installed 3.x:
https://buildbot.python.org/all/#builders/350/builds/1621

2 re-run tests:
test_bdb test_distutils

--
title: test_bdb and test_distutils fail on installed Python 3.9 and 3.10 
(setuptools 60.9.3, pip 22.0.4) -> test_bdb and test_distutils fail on 
installed Python 3.9, 3.10 and 3.11 (setuptools 60.9.3, pip 22.0.4)
versions: +Python 3.11, Python 3.9

___
Python tracker 

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



[issue47013] test_bdb and test_distutils fail on installed Python 3.9 and 3.10 (setuptools 60.9.3, pip 22.0.4)

2022-03-14 Thread STINNER Victor


STINNER Victor  added the comment:

x86 Gentoo Installed with X 3.9:
https://buildbot.python.org/all/#builders/527/builds/474

4 tests failed:
test_bdb test_distutils test_importlib test_peg_generator

Python 3.9 gets two more issues: test_importlib and test_peg_generator.

==
FAIL: test_package_discovery (test.test_importlib.test_main.DiscoveryTests)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.installed/build/target/lib/python3.9/test/test_importlib/test_main.py",
 line 159, in test_package_discovery
assert all(
AssertionError

0:06:27 load avg: 3.96 [ 83/425/3] test_peg_generator failed (uncaught 
exception) -- running: test_multiprocessing_forkserver (1 min 27 sec)
Warning -- warnings.filters was modified by test_peg_generator
Failed to import test module: test.test_peg_generator.test_c_parser
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.installed/build/target/lib/python3.9/unittest/loader.py",
 line 436, in _find_test_path
module = self._get_module_from_name(name)
  File 
"/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.installed/build/target/lib/python3.9/unittest/loader.py",
 line 377, in _get_module_from_name
__import__(name)
  File 
"/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.installed/build/target/lib/python3.9/test/test_peg_generator/test_c_parser.py",
 line 4, in 
from distutils.tests.support import TempdirManager
ModuleNotFoundError: No module named 'distutils.tests'

--
title: 3.10: test_bdb test_distutils fail on s390x Fedora Rawhide Clang 
Installed 3.10 -> test_bdb and test_distutils fail on installed Python 3.9 and 
3.10 (setuptools 60.9.3, pip 22.0.4)

___
Python tracker 

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



[issue47013] 3.10: test_bdb test_distutils fail on s390x Fedora Rawhide Clang Installed 3.10

2022-03-14 Thread STINNER Victor


STINNER Victor  added the comment:

See: [BUG] Having setuptools installed causes cpython stdlib build to fail
https://github.com/pypa/setuptools/issues/3007

--

___
Python tracker 

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



[issue46986] Upgrade ensurepip bundled setuptools to 60.9.3

2022-03-14 Thread STINNER Victor


STINNER Victor  added the comment:

This update broke the "s390x Fedora Rawhide Clang Installed 3.10" buildbot: 
bpo-47013.

--
nosy: +vstinner

___
Python tracker 

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



[issue47013] 3.10: test_bdb test_distutils fail on s390x Fedora Rawhide Clang Installed 3.10

2022-03-14 Thread STINNER Victor


STINNER Victor  added the comment:

Reproduce:

$ ./configure --prefix /opt/py310 && make clean && make && make install 
$ cd /somewhere/else/
$ /opt/py310/bin/python3 -m test -v test_bdb
...
FAIL: test_skip (test.test_bdb.StateTestCase)
...
$ /opt/py310/bin/python3 -m test -v test_distutils 
...
ModuleNotFoundError: No module named 'distutils.tests'
...

setuptools installs this file:

$ cat /opt/py310/lib/python3.10/site-packages/distutils-precedence.pth
import os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get(var, 
'local') == 'local'; enabled and __import__('_distutils_hack').add_shim();

--

___
Python tracker 

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



[issue47013] 3.10: test_bdb test_distutils fail on s390x Fedora Rawhide Clang Installed 3.10

2022-03-14 Thread STINNER Victor


New submission from STINNER Victor :

Since build 298, test_bdb test_distutils fail on s390x Fedora Rawhide Clang 
Installed 3.10:
https://buildbot.python.org/all/#/builders/694/builds/298

2 changes of build 298:

* bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820)(21 hours ago)
* [3.10] bpo-46985: Upgrade bundled pip to 22.0.4 (GH-31819) (GH-31849)(21 
hours ago)

Logs:

0:02:03 load avg: 9.95 [213/427/1] test_distutils failed (uncaught exception) 
-- running: test_concurrent_futures (42.4 sec)
test test_distutils crashed -- Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.10.edelsohn-fedora-rawhide-z.clang-installed/build/target/lib/python3.10/test/libregrtest/runtest.py",
 line 335, in _runtest_inner
refleak = _runtest_inner2(ns, test_name)
  File 
"/home/dje/cpython-buildarea/3.10.edelsohn-fedora-rawhide-z.clang-installed/build/target/lib/python3.10/test/libregrtest/runtest.py",
 line 280, in _runtest_inner2
the_module = importlib.import_module(abstest)
  File 
"/home/dje/cpython-buildarea/3.10.edelsohn-fedora-rawhide-z.clang-installed/build/target/lib/python3.10/importlib/__init__.py",
 line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1050, in _gcd_import
  File "", line 1027, in _find_and_load
  File "", line 1006, in _find_and_load_unlocked
  File "", line 688, in _load_unlocked
  File "", line 883, in exec_module
  File "", line 241, in _call_with_frames_removed
  File 
"/home/dje/cpython-buildarea/3.10.edelsohn-fedora-rawhide-z.clang-installed/build/target/lib/python3.10/test/test_distutils.py",
 line 15, in 
import distutils.tests
ModuleNotFoundError: No module named 'distutils.tests'

==
FAIL: test_skip (test.test_bdb.StateTestCase)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.10.edelsohn-fedora-rawhide-z.clang-installed/build/target/lib/python3.10/test/test_bdb.py",
 line 730, in test_skip
with TracerRun(self, skip=skip) as tracer:
  File 
"/home/dje/cpython-buildarea/3.10.edelsohn-fedora-rawhide-z.clang-installed/build/target/lib/python3.10/test/test_bdb.py",
 line 448, in __exit__
self.test_case.fail(err_msg)
  File 
"/home/dje/cpython-buildarea/3.10.edelsohn-fedora-rawhide-z.clang-installed/build/target/lib/python3.10/test/test_bdb.py",
 line 582, in fail
raise self.failureException(msg) from None
AssertionError: Wrong event type at expect_set item 2, got 'call'
  Expected: ('line', 3, 'tfunc_import')
  Got:  ('call', 84, 'find_spec'),  ('quit',),

--
components: Tests
messages: 415157
nosy: vstinner
priority: normal
severity: normal
status: open
title: 3.10: test_bdb test_distutils fail on s390x Fedora Rawhide Clang 
Installed 3.10
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



[issue46587] datetime and time tests use non-portable "%4Y" format

2022-03-14 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue46920] Remove code made dead long ago with #if 0

2022-03-14 Thread STINNER Victor


STINNER Victor  added the comment:

Can this issue be closed? Or is there remaining dead code that you want to 
remove?

--

___
Python tracker 

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



  1   2   >