[issue45053] MD5SumTests.test_checksum_fodder fails on Windows

2021-08-30 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

I would love to work on this issue :)

--

___
Python tracker 

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



[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

Two new issues created:
1. https://bugs.python.org/issue45053
2. https://bugs.python.org/issue45052

--

___
Python tracker 

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



[issue14088] sys.executable generating canonical path

2021-08-30 Thread Ned Deily


Ned Deily  added the comment:

> I'm not against making Python even better: attempt to normalize the path ;-)

I would be very cautious about doing that. I'm pretty sure it would break some 
existing code.

--
nosy: +ned.deily

___
Python tracker 

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



[issue34561] Replace list sorting merge_collapse()?

2021-08-30 Thread Tim Peters


Tim Peters  added the comment:

New runstack.py mostly adds comments about a surprise: the idea that 
length-adaptive ShiversSort eeks out better results than powersort appears 
nearly unique to the specific "0.80" cutoff used in the random-case generation 
code to pick between two uniform distributions. Change that cutoff, and 
powersort almost always does better.

So powersort remains the best known overall, although shivers4 remains 
competitive with it.

--
Added file: https://bugs.python.org/file50246/runstack.py

___
Python tracker 

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



[issue16379] SQLite error code not exposed to python

2021-08-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 86d8b465231473f850cc5e906013ba8581ddb503 by Erlend Egeberg 
Aasland in branch 'main':
bpo-16379: expose SQLite error codes and error names in `sqlite3` (GH-27786)
https://github.com/python/cpython/commit/86d8b465231473f850cc5e906013ba8581ddb503


--
nosy: +pablogsal

___
Python tracker 

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



[issue43398] [sqlite3] sqlite3.connect() segfaults if given a faulty Connection factory

2021-08-30 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> Is something missing here?

No; all good. Thanks!

--

___
Python tracker 

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



[issue45001] Date parsing helpers in email module incorrectly raise IndexError for some malformed inputs

2021-08-30 Thread Ned Deily


Ned Deily  added the comment:


New changeset e9b85afd7dc004460f6d914375ab67d617a8a7ff by Miss Islington (bot) 
in branch '3.7':
bpo-45001: Make email date parsing more robust against malformed input 
(GH-27946) (GH-27975)
https://github.com/python/cpython/commit/e9b85afd7dc004460f6d914375ab67d617a8a7ff


--
nosy: +ned.deily

___
Python tracker 

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



[issue45053] MD5SumTests.test_checksum_fodder fails on Windows

2021-08-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Test is failing because TESTFN contains now non-ASCII characters.

The path is written to stdout using the default stdout encoding on Windows 
(like cp1252), but test searches the path encoded with UTF-8. This test should 
fail also on other platforms with non-UTF-8 locale.

The simplest way to "fix" the test is using TESTFN_ASCII instead of TESTFN.

But there is also an issue in the script itself. It fails or produces a 
mojibake when the filesystem encoding and the stdout encoding do not match. 
There are similar issues in other scripts which output file names.

--
components: +Unicode
nosy: +ezio.melotti, serhiy.storchaka, vstinner

___
Python tracker 

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



[issue45001] Date parsing helpers in email module incorrectly raise IndexError for some malformed inputs

2021-08-30 Thread Ned Deily


Ned Deily  added the comment:


New changeset da9d6c554697414b1d275c8502e00a07c2ce06e6 by Miss Islington (bot) 
in branch '3.6':
bpo-45001: Make email date parsing more robust against malformed input 
(GH-27946) (GH-27976)
https://github.com/python/cpython/commit/da9d6c554697414b1d275c8502e00a07c2ce06e6


--

___
Python tracker 

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



[issue45001] Date parsing helpers in email module incorrectly raise IndexError for some malformed inputs

2021-08-30 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PR!

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



[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-08-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It may be a bug in the constructor of SharedMemory. It ignores the size 
argument on Windows.

--
components: +Library (Lib), Windows
nosy: +davin, paul.moore, pitrou, serhiy.storchaka, 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



[issue45020] Freeze all modules imported during startup.

2021-08-30 Thread Gregory Szorc


Gregory Szorc  added the comment:

> For stdlib modules it wouldn't be a big problem to set __file__ on
> frozen modules.
> Would that be enough to solve the problem?

What do you set __file__ to? Do you still materialize the .py[c] files on disk 
and set to that? (This would make the most sense.) If you support setting 
__file__ on a frozen module, how does this work at the C level? A stdlib module 
would want a different __file__ from a 3rd party module using the frozen module 
API. This would seemingly require enhancements to the frozen modules C API or 
some kind of hackery only available to stdlib frozen modules.

>> When I investigated freezing the standard library for PyOxidizer, I ran into 
>> a rash
>> of problems. The frozen importer doesn't behave like PathFinder. It doesn't
>> (didn't?) set some common module-level attributes
> This is mostly fixable for stdlib modules.  Which attributes would
> need to be added?  Are there other missing behaviors?

It was a few years ago and I can't recall specifics. I just remember that after 
encountering a couple unrelated limitations with the frozen importer I decided 
it was far too primitive to work as a general importer and decided I'd have to 
roll my own.

> Good point.  Supporting more of the FileLoader API on the frozen
> loader is something to look into, at least for stdlib modules.

>> I agree that we should shore up the frozen importer -- probably in a 
>> separate PR though.
>> (@Eric: do you think this is worth its own bpo issue?)
> Yeah.

I have some observations about the implications of this. I typed up a long 
comment but then realized someone would probably complain about me distracting 
from the technical parts of this issue. Which forum is most appropriate for 
this less technical commentary? (I want to lay out the case for building out an 
official importer far more advanced than frozen importer.)

--

___
Python tracker 

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



[issue43124] [security] smtplib multiple CRLF injection

2021-08-30 Thread Ned Deily


Ned Deily  added the comment:


New changeset d2cc04cd3024869101e894f73307944d98d187c8 by Miss Islington (bot) 
in branch '3.7':
[3.7] bpo-43124: Fix smtplib multiple CRLF injection (GH-25987) (GH-28037)
https://github.com/python/cpython/commit/d2cc04cd3024869101e894f73307944d98d187c8


--

___
Python tracker 

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



[issue16379] SQLite error code not exposed to python

2021-08-30 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Thanks, Torsten for this nice suggestion, Daniel & Aviv for the initial 
patches, Gerhard & Ezio for helping improving the API, and Pablo, Asif, Hai 
Shi, & Michael for reviewing and merging!

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



[issue43124] [security] smtplib multiple CRLF injection

2021-08-30 Thread Ned Deily


Ned Deily  added the comment:


New changeset 29d97d17fb7adab3b0df9e178b73f70292d1cf64 by Miss Islington (bot) 
in branch '3.6':
[3.6] bpo-43124: Fix smtplib multiple CRLF injection (GH-25987) (GH-28038)
https://github.com/python/cpython/commit/29d97d17fb7adab3b0df9e178b73f70292d1cf64


--

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-08-30 Thread Guido van Rossum


Guido van Rossum  added the comment:

> FWIW, I asked Ned Batchelder about this and he said this approach 
> ("fullcoverage" [1]) was added to support running coverage on the stdlib. 
> [...]

The docs you pointed out in [3] (where it talks about a *horrible hack you 
should never use" :-) should be amended with something explaining that "you 
need to comment out the line "" from frozen_module.py for this to 
work, else the frozen version of the encodings module will take priority over 
the imposter from "fullcoverage"."

--

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-08-30 Thread Guido van Rossum


Guido van Rossum  added the comment:

[Gregory Szorc]


> What do you set __file__ to? [...]

Exactly. I think it should not be set, just like it's not set for builtin 
modules.

> I have some observations about the implications of this. I typed up a long 
> comment but then realized someone would probably complain about me 
> distracting from the technical parts of this issue. Which forum is most 
> appropriate for this less technical commentary? (I want to lay out the case 
> for building out an official importer far more advanced than frozen importer.)

That seems to be something for python-dev. (There used to be an "import-sig" 
but the last mention I have from it is about that list shutting down for lack 
of traffic.) Or if you're still looking for more brainstorming you could try 
python-ideas first.

--

___
Python tracker 

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



[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2021-08-30 Thread Jordan Borean


Change by Jordan Borean :


--
pull_requests: +26517
pull_request: https://github.com/python/cpython/pull/28073

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-08-30 Thread Guido van Rossum


Guido van Rossum  added the comment:

> At this point, here are the open questions I'm seeing:

> + The editing-stdlib-.py-files problem: [...]

> + Compatibility: [...]

? + Penalty for too many frozen modules: [...]

> FWIW, I think the ideal mechanism for a dev build will be to opt in to using 
> frozen modules (instead of the source modules).  Otherwise it is too easy for 
> the unaware contributor to waste substantial time figuring out why their 
> changes are not getting used.

Agreed. I don't care much about people (even myself) editing installed modules. 
But I care a lot about people who do a git checkout and build from source 
editing modules and testing them without doing an install (Personally I never 
install what I build from source except to test the installation process.)

> Consequently, here's my order of preference for ignoring frozen modules:

> 1. use Py_DEBUG as an opt-out flag
>(if we think contributors are editing stdlib modules on a build without 
> Py_DEBUG then that isn't good enough)
> 2. automatically skip frozen modules if it's a dev build, with an explicit 
> configure flag to opt in to frozen modules.

I propose to only opt in by default in **PGO builds**. After all what we're 
doing is another extreme optimization.

It should always be possible to opt in using some -X flag (e.g. to debug the 
freeze import loader) and it should also always be possible to opt *out* (for 
those cases where you want to edit an installed stdlib module in-place in 
anger).

I don't know how the -X mechanism works exactly but probably we could make the 
spelling

  python -X freeze=on|off

with a dynamic default.

--

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-08-30 Thread Guido van Rossum


Guido van Rossum  added the comment:

FWIW, I'd be okay with doing the -X flag in a separate PR.

--

___
Python tracker 

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



[issue45041] [sqlite3] simplify executescript()

2021-08-30 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +26518
pull_request: https://github.com/python/cpython/pull/28074

___
Python tracker 

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



[issue44756] In ./Doc, "make html" and "make build" should depend on "make venv"

2021-08-30 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +26519
pull_request: https://github.com/python/cpython/pull/28075

___
Python tracker 

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



[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-30 Thread Guido van Rossum


Guido van Rossum  added the comment:

I think we shouldn't change *which* code object contains the docstring 
(changing anything about that is likely to disturb someone's workflow in a way 
that's hard to fix) -- only how PyFunction_New finds that docstring in the code 
object (if that breaks someone's workflow, the fix will be obvious).

--

___
Python tracker 

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



[issue24139] Use sqlite3 extended error codes

2021-08-30 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +26520
pull_request: https://github.com/python/cpython/pull/28076

___
Python tracker 

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



[issue45041] [sqlite3] simplify executescript()

2021-08-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset e34bb409197d72711ae2c6197f9d8305533034d4 by Erlend Egeberg 
Aasland in branch 'main':
bpo-45041: Increase coverage for sqlite3.Cursor.executescript() (GH-28074)
https://github.com/python/cpython/commit/e34bb409197d72711ae2c6197f9d8305533034d4


--
nosy: +pablogsal

___
Python tracker 

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



[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-08-30 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks! This comes right in time, because we're working on freezing many more 
modules, and modules containing frozen sets didn't have a consistent frozen 
representation. Now they do!

(See issue45019, issue45020)

--
nosy: +gvanrossum

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-08-30 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks, the rewrite is great!

I have one nit: did you consider which of these two idioms is better?

if __name__ == "__main__":
main()

vs.

if __name__ == "__main__":
sys.exit(main())

Your docs seem to promote the second, whereas I've usually preferred the 
former. Was this a considered choice on your part?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue44756] In ./Doc, "make html" and "make build" should depend on "make venv"

2021-08-30 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 5246dbc2a12bf8e64e18efee2fdce02a350bbf09 by Łukasz Langa in 
branch 'main':
bpo-44756: Remove misleading NEWS entries of a change that was reverted before 
release (GH-28075)
https://github.com/python/cpython/commit/5246dbc2a12bf8e64e18efee2fdce02a350bbf09


--

___
Python tracker 

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



[issue44756] In ./Doc, "make html" and "make build" should depend on "make venv"

2021-08-30 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 9ef1843892500e209afe5d916db26ecdbccd5e62 by Łukasz Langa in 
branch '3.9':
bpo-44756: Remove misleading NEWS entries of a change that was reverted before 
release (GH-28075)
https://github.com/python/cpython/commit/9ef1843892500e209afe5d916db26ecdbccd5e62


--

___
Python tracker 

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



[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docs lie)

2021-08-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> So I really *do* want to see the ability of __float__ 
> to return a non-float eventually removed.

Note, the __str__ method on strings does not require an exact str.

class S:
def __str__(self):
return self

print(type(str(S('hello world'

--

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-08-30 Thread Eric Snow


Eric Snow  added the comment:

On Mon, Aug 30, 2021 at 2:22 PM Guido van Rossum  wrote:
> I propose to only opt in by default in **PGO builds**. After all what we're 
> doing is another extreme optimization.
>
> It should always be possible to opt in using some -X flag (e.g. to debug the 
> freeze import loader) and it should also always be possible to opt *out* (for 
> those cases where you want to edit an installed stdlib module in-place in 
> anger).
>
> I don't know how the -X mechanism works exactly but probably we could make 
> the spelling
>
>   python -X freeze=on|off
>
> with a dynamic default.

+1 to all that

--

___
Python tracker 

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



[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2021-08-30 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 4.0 -> 5.0
pull_requests: +26521
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28077

___
Python tracker 

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



[issue45019] Freezing modules has manual steps but could be automated.

2021-08-30 Thread Eric Snow


Eric Snow  added the comment:


New changeset 044e8d866fdde3804bdb2282c7d23a8074de8f6f by Eric Snow in branch 
'main':
bpo-45019: Add a tool to generate list of modules to include for frozen modules 
(gh-27980)
https://github.com/python/cpython/commit/044e8d866fdde3804bdb2282c7d23a8074de8f6f


--

___
Python tracker 

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



[issue45019] Freezing modules has manual steps but could be automated.

2021-08-30 Thread Guido van Rossum


Guido van Rossum  added the comment:

Is this ready to close?

--

___
Python tracker 

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



[issue45054] json module should issue warning about duplicate keys

2021-08-30 Thread Kevin Mills


New submission from Kevin Mills :

The json module will allow the following without complaint:

import json
d1 = {1: "fromstring", "1": "fromnumber"}
string = json.dumps(d1)
print(string)
d2 = json.loads(string)
print(d2)

And it prints:

{"1": "fromstring", "1": "fromnumber"}
{'1': 'fromnumber'}

This would be extremely confusing to anyone who doesn't already know that JSON 
keys have to be strings. Not only does `d1 != d2` (which the documentation does 
mention as a possibility after a round trip through JSON), but `len(d1) != 
len(d2)` and `d1['1'] != d2['1']`, even though '1' is in both.

I suggest that if json.dump or json.dumps notices that it is producing a JSON 
document with duplicate keys, it should issue a warning. Similarly, if 
json.load or json.loads notices that it is reading a JSON document with 
duplicate keys, it should also issue a warning.

--
components: Library (Lib)
messages: 400678
nosy: Zeturic
priority: normal
severity: normal
status: open
title: json module should issue warning about duplicate keys
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



[issue45019] Freezing modules has manual steps but could be automated.

2021-08-30 Thread Eric Snow


Eric Snow  added the comment:

I'm just waiting for the buildbots to finish.

--

___
Python tracker 

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



[issue45054] json module should issue warning about duplicate keys

2021-08-30 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +bob.ippolito

___
Python tracker 

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



[issue45055] Fresh build on Windows fails the first time for zlib.c

2021-08-30 Thread Guido van Rossum


New submission from Guido van Rossum :

When I make a fresh checkout of the main branch on Windows and type 
"pcbuild\build" it starts downloading some distributions (e.g. sqlite) and then 
starts building. Fine. But at some point there's a whole bunch of errors that 
seem to come from building zlibmodule.c. Re-running pcbuild\build then 
downloads some extra thing and then everything builds to completion.

First set of downloads and selected logs:

Using py -3.9 (found 3.9 with py.exe)
Fetching external libraries...
Fetching bzip2-1.0.6...   
Fetching sqlite-3.35.5.0...
Fetching xz-5.2.2...
Fetching zlib-1.2.11...
Traceback (most recent call last):
  File "C:\Users\gvanrossum\deepfreeze\PCbuild\get_external.py", line 60, in 

main()
  File "C:\Users\gvanrossum\deepfreeze\PCbuild\get_external.py", line 56, in 
main
extract_zip(args.externals_dir, zip_path).replace(final_name)
  File 
"C:\Users\gvanrossum\AppData\Local\Programs\Python\Python39\lib\pathlib.py", 
line 1395, in 
replace
self._accessor.replace(self, target)
PermissionError: [WinError 5] Access is denied: 
'C:\\Users\\gvanrossum\\deepfreeze\\PCbuild\\..\\externals\\cpython-source-deps-zlib-1.2.11'
 -> 'C:\\Users\\gvanrossum\\deepfreeze\\PCbuild\\..\\externals\\zlib-1.2.11'
Fetching external binaries...
Fetching libffi-3.3.0...
Fetching openssl-bin-1.1.1l...
Fetching tcltk-8.6.11.0...
Finished.
Using "C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" (found in the Visual 
Studio installation)
Using py -3.9 (found 3.9 with py.exe)

C:\Users\gvanrossum\deepfreeze>"C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" 
"C:\Users\gvanrossum\deepfreeze\PCbuild\pcbuild.proj" /t:Build /m /nologo /v:m 
/clp:summary /p:Configuration=Release /p:Platform=x64 /p:IncludeExternals=true 
/p:IncludeCTypes=true /p:IncludeSSL=true /p:IncludeTkinter=true 
/p:UseTestMarker= /p:GIT="C:\Program Files\Git\cmd\git.exe"
  Killing any running python.exe instances...
  Regenerate pycore_ast.h pycore_ast_state.h Python-ast.c
  C:\Users\gvanrossum\deepfreeze\Python\Python-ast.c, 
C:\Users\gvanrossum\deepfreeze\Include\inte
  rnal\pycore_ast.h, 
C:\Users\gvanrossum\deepfreeze\Include\internal\pycore_ast_state.h regenerat
  ed.
  Regenerate opcode.h opcode_targets.h
  Include\opcode.h regenerated from Lib\opcode.py
  Jump table written into Python\opcode_targets.h
  Regenerate token-list.inc token.h token.c token.py
  Generated sources are up to date
  Getting build info from "C:\Program Files\Git\cmd\git.exe"
  Building heads/deepfreeze:044e8d866f deepfreeze
  _abc.c

...

Errors:

  Compiling...
  thread.c
  traceback.c
  zlibmodule.c
C:\Users\gvanrossum\deepfreeze\Modules\zlibmodule.c(10,10): fatal error C1083: 
Cannot open includ
e file: 'zlib.h': No such file or directory 
[C:\Users\gvanrossum\deepfreeze\PCbuild\pythoncore.vc
xproj]
  adler32.c
c1 : fatal error C1083: Cannot open source file: 
'C:\Users\gvanrossum\deepfreeze\externals\zlib-1 
.2.11\adler32.c': No such file or directory 
[C:\Users\gvanrossum\deepfreeze\PCbuild\pythoncore.vc 
xproj]
  compress.c
c1 : fatal error C1083: Cannot open source file: 
'C:\Users\gvanrossum\deepfreeze\externals\zlib-1
.2.11\compress.c': No such file or directory 
[C:\Users\gvanrossum\deepfreeze\PCbuild\pythoncore.v
cxproj]
  crc32.c
c1 : fatal error C1083: Cannot open source file: 
'C:\Users\gvanrossum\deepfreeze\externals\zlib-1
.2.11\crc32.c': No such file or directory 
[C:\Users\gvanrossum\deepfreeze\PCbuild\pythoncore.vcxp 
roj]
  deflate.c
c1 : fatal error C1083: Cannot open source file: 
'C:\Users\gvanrossum\deepfreeze\externals\zlib-1
.2.11\deflate.c': No such file or directory 
[C:\Users\gvanrossum\deepfreeze\PCbuild\pythoncore.vc 
xproj]
  infback.c
c1 : fatal error C1083: Cannot open source file: 
'C:\Users\gvanrossum\deepfreeze\externals\zlib-1
.2.11\infback.c': No such file or directory 
[C:\Users\gvanrossum\deepfreeze\PCbuild\pythoncore.vc 
xproj]
  inffast.c
c1 : fatal error C1083: Cannot open source file: 
'C:\Users\gvanrossum\deepfreeze\externals\zlib-1
.2.11\inffast.c': No such file or directory 
[C:\Users\gvanrossum\deepfreeze\PCbuild\pythoncore.vc 
xproj]
  inflate.c
c1 : fatal error C1083: Cannot open source file: 
'C:\Users\gvanrossum\deepfreeze\externals\zlib-1
.2.11\inflate.c': No such file or directory 
[C:\Users\gvanrossum\deepfreeze\PCbuild\pythoncore.vc 
xproj]
  inftrees.c
c1 : fatal error C1083: Cannot open source file: 
'C:\Users\gvanrossum\deepfreeze\externals\zlib-1
.2.11\inftrees.c': No such file or directory 
[C:\Users\gvanrossum\deepfreeze\PCbuild\pythoncore.v 
cxproj]
  trees.c
c1 : fatal error C1083: Cannot open source file: 
'C:\Users\gvanrossum\deepfreeze\externals\zlib-1
.2.11\trees.c': No such file or directory 
[C:\Users\gvanrossum\deepfreeze\PCbuild\pythoncore.vcxp 
roj]
  uncompr.c
c1 : fatal error C1083: Cannot open source file: 
'C:\Users\gvanrossum\deepfreeze\externals\zlib-1
.2.1

[issue39218] Assertion failure when calling statistics.variance() on a float32 Numpy array

2021-08-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 793f55bde9b0299100c12ddb0e6949c6eb4d85e5 by Raymond Hettinger in 
branch 'main':
bpo-39218: Improve accuracy of variance calculation (GH-27960)
https://github.com/python/cpython/commit/793f55bde9b0299100c12ddb0e6949c6eb4d85e5


--

___
Python tracker 

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



[issue39218] Assertion failure when calling statistics.variance() on a float32 Numpy array

2021-08-30 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-30 Thread Inada Naoki


Inada Naoki  added the comment:

I grepped top 5000 downloaded packages and I can not find any real use of 
PyFunction_New(WithQualName).
So I don't know what is current workflow of PyFunction_New.

My current wip implementation adds new API (e.g. PyFunction_NewWithDoc()).
Old API keep using co_consts[0] for docstring for backward compatibility.

Adding code.co_doc is not free.

* All code objects have one additional pointer. So it eats memory.
* Unmarshal need to call `r_object()` for all code objects. So it increase 
startup time.

Note that code objects is not for only functions. Class, modules, lambdas, 
comprehensions uses code objects without docstring.
And if PEP 649 is accepted, even function annotations will use code objects. It 
will double the number of code objects in the highly annotated source files.

--

___
Python tracker 

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



[issue45056] compiler: Unnecessary None in co_consts

2021-08-30 Thread Inada Naoki


New submission from Inada Naoki :

Python 3.10 compiler adds None to co_consts even when None is not used at all.

```
$ cat x1.py
def foo():
"docstring"
return 42

import dis
dis.dis(foo)
print(foo.__code__.co_consts)

$ python3.9 x1.py
  3   0 LOAD_CONST   1 (42)
  2 RETURN_VALUE
('docstring', 42)

$ python3.10 x1.py
  3   0 LOAD_CONST   1 (42)
  2 RETURN_VALUE
('docstring', 42, None)
```

--
components: Interpreter Core
keywords: 3.10regression
messages: 400683
nosy: methane
priority: normal
severity: normal
status: open
title: compiler: Unnecessary None in co_consts
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



[issue36521] Consider removing docstrings from co_consts in code objects

2021-08-30 Thread Inada Naoki


Inada Naoki  added the comment:

This is WIP pull request. https://github.com/methane/cpython/pull/35
Some tests are failing because of bpo-36521.

--

___
Python tracker 

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



[issue42414] unable to document fields of dataclass

2021-08-30 Thread Laurie Opperman


Laurie Opperman  added the comment:

No new mailing list thread, but there is one from January 2020: 
https://mail.python.org/archives/list/python-id...@python.org/thread/RHB6XFGFVM66AZTRKNTBAKFEVVEYUDD3/

--
nosy: +Epic_Wink

___
Python tracker 

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



[issue44983] Wrong definition of a starred expression in the Language Reference

2021-08-30 Thread Takuo Matsuoka

Takuo Matsuoka  added the comment:

Thanks Éric Araujo, for the information. Actually, I sought for a
similar issue here in the tracker, but didn't find one filed, so this
report appears to be unique.

--

___
Python tracker 

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



[issue45056] compiler: Unnecessary None in co_consts

2021-08-30 Thread Guido van Rossum


Guido van Rossum  added the comment:

I wonder what the 3.10 compiler does different to cause this -- in 3.9 that 
extra None is not in co_consts.

(Note: Mark is on vacation for 2 weeks.)

--
nosy: +Mark.Shannon, gvanrossum

___
Python tracker 

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



[issue45056] compiler: Unnecessary None in co_consts

2021-08-30 Thread Inada Naoki


Inada Naoki  added the comment:

I think LOAD_CONST None + RETURN_VALUE is added here. And it removed by 
optimize_cfg().

https://github.com/python/cpython/blob/793f55bde9b0299100c12ddb0e6949c6eb4d85e5/Python/compile.c#L7795-L7797

I don't know how easy to remove this unnecessary None.
But LOAD_COMMON_CONST idea can remove all None from co_consts.
https://github.com/iritkatriel/cpython/pull/27

--

___
Python tracker 

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



[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-08-30 Thread Eryk Sun


Eryk Sun  added the comment:

> It may be a bug in the constructor of SharedMemory. It ignores 
> the size argument on Windows.

The `size` argument is always ignored when `create` is false, on all platforms, 
not that I understand the reason for it. The difference compared to POSIX is 
that the size of a mapping that's backed by the paging file is rounded up to a 
multiple of the page size in Windows (e.g. 4 KiB).

--
nosy: +eryksun

___
Python tracker 

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



[issue45021] Race condition in thread.py

2021-08-30 Thread hai shi


hai shi  added the comment:

Is it a defined behavior?
I got this sentence from pep-3148: Deadlock can occur when the callable 
associated with a Future waits on the results of another Future.

--
nosy: +shihai1991

___
Python tracker 

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



[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Update vendored copy to expat 2.4.1

2021-08-30 Thread Ned Deily

Ned Deily  added the comment:


New changeset 79101b890ee021a901a8b6837a3a320d57adb725 by Łukasz Langa in 
branch '3.7':
[3.7] bpo-44394: Update libexpat copy to 2.4.1 (GH-26945) (GH-28042)
https://github.com/python/cpython/commit/79101b890ee021a901a8b6837a3a320d57adb725


--

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-08-30 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue45056] compiler: Unnecessary None in co_consts

2021-08-30 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue45054] json module should issue warning about duplicate keys

2021-08-30 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2021-08-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26522
pull_request: https://github.com/python/cpython/pull/28079

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2021-08-30 Thread Ned Deily


Ned Deily  added the comment:


New changeset 8934bb0c3179e4c020cd6f08dea64bccbf56ffa2 by Miss Islington (bot) 
in branch '3.6':
bpo-38965: Fix faulthandler._stack_overflow() on GCC 10 (GH-17467) (GH-28079)
https://github.com/python/cpython/commit/8934bb0c3179e4c020cd6f08dea64bccbf56ffa2


--
nosy: +ned.deily

___
Python tracker 

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



[issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10

2021-08-30 Thread Ned Deily


Ned Deily  added the comment:

I decided to also backport this fix for 3.6.15 since the problem causes test 
hangs when using GCC 10, as is now that case on one of my test machines. Note 
that the devguide says: "You should also consider fixing hard-failing tests in 
open security branches since it is important to be able to run the tests 
successfully before releasing."

https://devguide.python.org/devcycle/#security-branches

--
versions: +Python 3.6

___
Python tracker 

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



[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Update vendored copy to expat 2.4.1

2021-08-30 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +26523
pull_request: https://github.com/python/cpython/pull/28080

___
Python tracker 

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



[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Update vendored copy to expat 2.4.1

2021-08-30 Thread Ned Deily


Ned Deily  added the comment:


New changeset 910886a6448e4bf1edf49eeace4aa240b6403772 by Ned Deily in branch 
'3.6':
[3.6] bpo-44394: Update libexpat copy to 2.4.1 (GH-26945) (GH-28042) (GH-28080)
https://github.com/python/cpython/commit/910886a6448e4bf1edf49eeace4aa240b6403772


--

___
Python tracker 

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



<    1   2