[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow


Eric Snow  added the comment:


New changeset 9fd87a5fe5c468cf94265365091267838b004b7f by Eric Snow in branch 
'main':
bpo-45020: Revert "Drop the frozen .h files from the repo." (gh-28380)
https://github.com/python/cpython/commit/9fd87a5fe5c468cf94265365091267838b004b7f


--

___
Python tracker 

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



[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-15 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



[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +26795
pull_request: https://github.com/python/cpython/pull/28380

___
Python tracker 

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



[issue45180] possible wrong result for difflib.SequenceMatcher.ratio()

2021-09-15 Thread Tim Peters


Tim Peters  added the comment:

Please stop re-opening this. The issue tracker is not a "help desk", and your 
confusions aren't necessarily Python bugs ;-) If you post something that looks 
like an actual bug, I'll re-open the report.

SequenceMatcher works on sequences.

HtmlFiff works on sequences OF sequences (typically lists of lines). Very 
different things. For example,

h = difflib.HtmlDiff()
h.make_file(['aaab'], ['aaa'])

finds nothing at all in common. It finds that the two lines don't match, and 
then finds that the lines aren't "similar enough" to bother looking any deeper. 
But, obviously, they do share 'aaa' as a common prefix, and calling 
SequenceMatcher directly on the two strings will find their common prefix.

There's no reason to imagine they'll produce the same results - they're not 
doing the same things. SequenceMatcher is used, in several places, as a 
building block to do the more complicated things HtmlDiff does. But HtmlDiff 
works on _lines_ first; SequenceMatcher has no concept of "line".

As to 1-(delta/totalSize), I have no idea where that came from. What 
SequenceMatcher.ratio() returns is documented:

"""
Where T is the total number of elements in both sequences, and M is the number 
of matches, this is 2.0*M / T. Note that this is 1.0 if the sequences are 
identical, and 0.0 if they have nothing in common.
"""

--
status: open -> closed

___
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-09-15 Thread Eric Snow


Eric Snow  added the comment:

Never mind.  It's pretty late here so I'm going to revert it and sort it out in 
the morning.

--

___
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-09-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

FWIW, Python/frozen_modules/__hello__.h is still in the repo somehow.

--

___
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-09-15 Thread Eric Snow


Eric Snow  added the comment:

Looks like that last commit broke one of the buildbots:

https://buildbot.python.org/all/#/builders/483/builds/812

I'll fix that right away.

--

___
Python tracker 

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



[issue45186] Marshal output isn't completely deterministic.

2021-09-15 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +26794
pull_request: https://github.com/python/cpython/pull/28379

___
Python tracker 

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



[issue45180] possible wrong result for difflib.SequenceMatcher.ratio()

2021-09-15 Thread Nabeel Alzahrani


Nabeel Alzahrani  added the comment:

Here are the steps that I used to calculate 0.2 for the last example:

I used class difflib.HtmlDiff to find the number of changed chars (addedChars, 
deletedChars, and changedChars) which is 1172 (let us call it delta)

The size of both strings a and b in this example is 1470

I calculated the similality ratio using 1-(delta/totalSize) = 1-(1172/1470)=0.2

I am assuming both classes difflib.SequenceMatcher and difflib.HtmlDiff are 
both using the same algorithms and arguments and if so they should produce the 
same ratio. Is that right?

--
status: closed -> open

___
Python tracker 

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



[issue45180] possible wrong result for difflib.SequenceMatcher.ratio()

2021-09-15 Thread Tim Peters


Tim Peters  added the comment:

I have no idea why you think the result should be 0.2. 0.5630188679245283 looks 
correct to me with autojunk disabled:

sm = SequenceMatcher(None, a, b, autojunk=False)
total = 0
for m in sm.get_matching_blocks():
print(m, repr(a[m.a : m.a + m.size]))
total += m.size

Running that displays every matching block:

Match(a=0, b=0, size=73) '\n#include \n#include \nusing 
namespace std;\nint main() {\n'
Match(a=74, b=73, size=10) '   string '
Match(a=87, b=84, size=1) 'r'
Match(a=138, b=85, size=2) 'i;'
Match(a=141, b=87, size=11) '\n   cin >> '
Match(a=155, b=99, size=1) 'r'
Match(a=160, b=101, size=1) ';'
Match(a=200, b=102, size=10) '\n   for (i'
Match(a=210, b=116, size=9) ' = 0; i <'
Match(a=220, b=125, size=1) ' '
Match(a=221, b=130, size=1) 's'
Match(a=228, b=133, size=1) 'e'
Match(a=230, b=136, size=2) '; '
Match(a=232, b=139, size=2) '++'
Match(a=235, b=141, size=1) ')'
Match(a=237, b=142, size=1) '{'
Match(a=274, b=143, size=11) '\n  if ('
Match(a=285, b=156, size=1) 'i'
Match(a=288, b=161, size=1) 'i'
Match(a=294, b=163, size=8) " == 'i')"
Match(a=305, b=171, size=10) '\n '
Match(a=315, b=183, size=1) 'i'
Match(a=318, b=188, size=1) 'i'
Match(a=324, b=190, size=14) " = '1';\n  "
Match(a=380, b=204, size=4) 'if ('
Match(a=384, b=210, size=1) 'i'
Match(a=387, b=215, size=1) 'i'
Match(a=393, b=217, size=8) " == 'a')"
Match(a=404, b=225, size=10) '\n '
Match(a=414, b=237, size=1) 'i'
Match(a=417, b=242, size=1) 'i'
Match(a=423, b=244, size=14) " = '@';\n  "
Match(a=479, b=258, size=4) 'if ('
Match(a=483, b=264, size=1) 'i'
Match(a=486, b=269, size=1) 'i'
Match(a=492, b=271, size=8) " == 'm')"
Match(a=503, b=279, size=10) '\n '
Match(a=513, b=291, size=1) 'i'
Match(a=516, b=296, size=1) 'i'
Match(a=522, b=298, size=14) " = 'M';\n  "
Match(a=578, b=312, size=4) 'if ('
Match(a=582, b=318, size=1) 'i'
Match(a=585, b=323, size=1) 'i'
Match(a=591, b=325, size=8) " == 'B')"
Match(a=602, b=333, size=10) '\n '
Match(a=612, b=345, size=1) 'i'
Match(a=615, b=350, size=1) 'i'
Match(a=621, b=352, size=14) " = '8';\n  "
Match(a=677, b=366, size=4) 'if ('
Match(a=681, b=372, size=1) 'i'
Match(a=684, b=377, size=1) 'i'
Match(a=690, b=379, size=8) " == 's')"
Match(a=701, b=387, size=10) '\n '
Match(a=711, b=399, size=1) 'i'
Match(a=714, b=404, size=1) 'i'
Match(a=720, b=406, size=14) " = '$';\n  "
Match(a=763, b=420, size=1) '}'
Match(a=822, b=421, size=12) '\n   cout << '
Match(a=837, b=436, size=26) ' << endl;\n\n   return 0;\n}\n'
Match(a=863, b=462, size=0) ''

and then

>>> total
373
>>> 2 * total / (len(a) + len(b))
0.5630188679245283
>>> sm.ratio()
0.5630188679245283

give identical results.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue45180] possible wrong result for difflib.SequenceMatcher.ratio()

2021-09-15 Thread Nabeel Alzahrani


Change by Nabeel Alzahrani :


--
resolution: not a bug -> 
status: closed -> open

___
Python tracker 

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



[issue45155] Add default arguments for int.to_bytes()

2021-09-15 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


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



[issue45155] Add default arguments for int.to_bytes()

2021-09-15 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:


New changeset 07e737d002cdbf0bfee53248a652a86c9f93f02b by Barry Warsaw in 
branch 'main':
bpo-45155 : Default arguments for int.to_bytes(length=1, 
byteorder=sys.byteorder) (#28265)
https://github.com/python/cpython/commit/07e737d002cdbf0bfee53248a652a86c9f93f02b


--

___
Python tracker 

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



[issue45215] Add docs for Mock name and parent args and deprecation warning when wrong args are passed

2021-09-15 Thread Andrei Kulakov


Change by Andrei Kulakov :


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

___
Python tracker 

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



[issue45215] Add docs for Mock name and parent args and deprecation warning when wrong args are passed

2021-09-15 Thread Andrei Kulakov


New submission from Andrei Kulakov :

Currently using *name* and *parent* args in Mock and MagicMock is problematic 
in a few ways:

*name*

 - any value can be passed silently but at a later time, any value except for 
an str will cause
   an exception when repr() or str() on the mock object is done.

 - a string name can be passed but will not be equal to the respective attr 
value:
   Mock(name='foo').name != 'foo', as users would expect. (this should be 
documented).

*parent*

 - any value can be passed but, similarly to *name*, will cause an exception 
when str() or
   repr() is done on the object.

 - this arg is not documented so users will expect it to be set as an attr, but 
instead the
   attribute is going to be a Mock instance. [1]


I propose to fix these issues by:

 - checking the types that are passed in and display a DeprecationWarning if 
types are wrong.
 (note that this check should be fast because at first value can be compared to 
None default,
 which is what it's going to be in vast majority of cases, and isinstance() 
check is only done
 after that.) (in 3.11)

 - in 3.12, convert warnings into TypeError.

 - Document that *name* attribute will be a Mock instance.

 - Document that *name* argument needs to be a string.

 - Document *parent* argument.

 - In the docs for the two args, point to `configure_mock()` method for setting 
them to
   arbitrary values.

(Note that other args for Mock() have more specialized names and are much less 
likely to cause
similar issues.)

[1] https://bugs.python.org/issue39222

--
components: Tests
messages: 401913
nosy: andrei.avk
priority: normal
severity: normal
status: open
title: Add docs for Mock name and parent args and deprecation warning when 
wrong args are passed
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



[issue45180] possible wrong result for difflib.SequenceMatcher.ratio()

2021-09-15 Thread Nabeel Alzahrani


Nabeel Alzahrani  added the comment:

But when I turn off the "autojunk" feature for the following example, I get the 
wrong ratio of 0.5 instead of the correct ratio of 0.2 with autojunk enabled.

a="""
#include 
#include 
using namespace std;
int main() {
   
   string userPass;
   int sMaxIndex;
   char indivChar;
   int i;
   
   cin >> userPass;
   
   sMaxIndex = userPass.size() - 1;
   
   
   for (i = 0; i <= sMaxIndex; ++i) {
  
  indivChar = userPass.at(i);
  
  if (indivChar == 'i') {
 
 indivChar = '1';
 cout << indivChar;
 
  }
  else if (indivChar == 'a') {
 
 indivChar = '@';
 cout << indivChar;
 
  }
  else if (indivChar == 'm') {
 
 indivChar = 'M';
 cout << indivChar;
 
  }
  else if (indivChar == 'B') {
 
 indivChar = '8';
 cout << indivChar;
 
  }
  else if (indivChar == 's') {
 
 indivChar = '$';
 cout << indivChar;
 
  }
  else {
 
 cout << indivChar;
 
  }
  
   }
   
   cout << "!" << endl;
   
   return 0;
}
"""

b="""
#include 
#include 
using namespace std;
int main() {
   string ori;
   cin >> ori;
   for (int i = 0; i < ori.size(); i++){
  if (ori.at(i) == 'i')
 ori.at(i) = '1';
  if (ori.at(i) == 'a')
 ori.at(i) = '@';
  if (ori.at(i) == 'm')
 ori.at(i) = 'M';
  if (ori.at(i) == 'B')
 ori.at(i) = '8';
  if (ori.at(i) == 's')
 ori.at(i) = '$';
  }
   cout << ori << endl;

   return 0;
}
"""

--

___
Python tracker 

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



[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Eric Snow


Change by Eric Snow :


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



[issue45020] Freeze all modules imported during startup.

2021-09-15 Thread Eric Snow


Eric Snow  added the comment:


New changeset a9757bf34d8b4cb3c24bbb70d50a06c815e2e8f3 by Eric Snow in branch 
'main':
bpo-45020: Drop the frozen .h files from the repo. (gh-28375)
https://github.com/python/cpython/commit/a9757bf34d8b4cb3c24bbb70d50a06c815e2e8f3


--

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

0c64569ac7066a97e4482c6d6e4d780806692ae5
a5bc0ffc520e09226f85d5fa8faaa83be0acee68

are ready to be cherrypicked into into the 3.10.0 release branch.  
Once that is done, 'release blocker' can be removed, but issue should remain 
open for a separate fix for 3.9.

--

___
Python tracker 

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



[issue25625] "chdir" Contex manager for pathlib

2021-09-15 Thread Cameron Simpson


Change by Cameron Simpson :


--
nosy: +cameron

___
Python tracker 

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



[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

We can once GH-28375 lands.

--

___
Python tracker 

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



[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Eric Snow


Eric Snow  added the comment:

Can we close this?

--

___
Python tracker 

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



[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Eric Snow


Eric Snow  added the comment:

FYI, I have a PR up for dropping the .h files: 
https://github.com/python/cpython/pull/28375.

--

___
Python tracker 

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



[issue21736] Add __file__ attribute to frozen modules

2021-09-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

> Note that the filename information is already available in the
> code object's co_filename attribute.

Hm, in the latest (3.11) main that's not true -- co_filename is set to 
something like "". And that's about right, since the filename 
contained in the frozen data can at best reflect the filename at the time the 
freeze script ran, which is not necessarily the same as the filename when the 
user runs the Python binary.

I don't think we should try to set __file__ or any other attributes on frozen 
modules (at least not for the small set of frozen modules we're contemplating 
for 3.11).  User who need the file can run their Python 3.11 binary with 
-Xfrozen_modules=off, to disable the use of frozen modules (other than the 
three importlib bootstrap files).

Tools that freeze the entire stdlib or 3rd party code may have to make a  
different choice, but that's not our problem (yet).

--

___
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-09-15 Thread Eric Snow


Eric Snow  added the comment:

On Wed, Sep 15, 2021 at 12:03 PM Guido van Rossum
 wrote:
> I would move "default to "on" (except if actually running out of the source 
> tree)" to the "maybe" category. I left a few comments in other deps. I think 
> we should start by turning this on by default in PGO builds.

Sounds good.

> Separately, I encourage you to collect reliable performance numbers. It would 
> be nice to see a dip on speed.python.org for this benchmark:

I'll do that.

--

___
Python tracker 

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



[issue45204] test_peg_generator: test_soft_keyword() logs many messages into stdout

2021-09-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue39710] "will be returned as unicode" reminiscent from Python 2

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for the patch, Hubert Badocha! ✨  ✨

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



[issue39710] "will be returned as unicode" reminiscent from Python 2

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset a75a2577259a55d816de24a4cca16aad74e02aa5 by Hubert Badocha in 
branch 'main':
bpo-39710: Remove Python 2-specific sentence from calendar documentation 
(GH-26985)
https://github.com/python/cpython/commit/a75a2577259a55d816de24a4cca16aad74e02aa5


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45209] multiprocessing tests log: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown

2021-09-15 Thread Nikita Sobolev


Change by Nikita Sobolev :


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

___
Python tracker 

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



[issue45214] implement LOAD_NONE opcode

2021-09-15 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue45209] multiprocessing tests log: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown

2021-09-15 Thread Nikita Sobolev

Nikita Sobolev  added the comment:

The problem was in `test_shared_memory_cleaned_after_process_termination` test.

```
» ./python.exe -m test -v test_multiprocessing_forkserver -m 
test_shared_memory_cleaned_after_process_termination
== CPython 3.11.0a0 (heads/main:09b4ad11f3, Sep 15 2021, 20:50:50) [Clang 
11.0.0 (clang-1100.0.33.16)]
== macOS-10.14.6-x86_64-i386-64bit little-endian
== cwd: /Users/sobolev/Desktop/cpython/build/test_python_14874æ
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 1.98 Run tests sequentially
0:00:00 load avg: 1.98 [1/1] test_multiprocessing_forkserver
test_shared_memory_cleaned_after_process_termination 
(test.test_multiprocessing_forkserver.WithProcessesTestSharedMemory) ... ok
/Users/sobolev/Desktop/cpython/Lib/multiprocessing/resource_tracker.py:224: 
UserWarning: resource_tracker: There appear to be 1 leaked shared_memory 
objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '
/Users/sobolev/Desktop/cpython/Lib/multiprocessing/resource_tracker.py:237: 
UserWarning: resource_tracker: '/psm_67480e45': [Errno 2] No such file or 
directory: '/psm_67480e45'
  warnings.warn('resource_tracker: %r: %s' % (name, e))

--
Ran 1 test in 0.775s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 1.6 sec
Tests result: SUCCESS
```

My patch (location 
https://github.com/python/cpython/blob/51056b40e711d84692d099ac8970077b33c7fafd/Lib/test/_test_multiprocessing.py#L4179):

```
resource_tracker.unregister(f"/{name}", "shared_memory")
```

With this change no warning is generated:

```
» ./python.exe -m test -v test_multiprocessing_forkserver -m 
test_shared_memory_cleaned_after_process_termination
== CPython 3.11.0a0 (heads/main:09b4ad11f3, Sep 15 2021, 20:50:50) [Clang 
11.0.0 (clang-1100.0.33.16)]
== macOS-10.14.6-x86_64-i386-64bit little-endian
== cwd: /Users/sobolev/Desktop/cpython/build/test_python_24281æ
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 1.80 Run tests sequentially
0:00:00 load avg: 1.80 [1/1] test_multiprocessing_forkserver
test_shared_memory_cleaned_after_process_termination 
(test.test_multiprocessing_forkserver.WithProcessesTestSharedMemory) ... ok

--
Ran 1 test in 0.732s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 1.5 sec
Tests result: SUCCESS
```

My other highly-related PR where I refactor several `SharedMemory` tests: 
https://github.com/python/cpython/pull/28294

--

___
Python tracker 

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



[issue45214] implement LOAD_NONE opcode

2021-09-15 Thread Irit Katriel


Change by Irit Katriel :


--
assignee: iritkatriel
components: Interpreter Core
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: implement LOAD_NONE opcode
type: performance
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-09-15 Thread Eric Snow


Eric Snow  added the comment:


New changeset 3814e2036d96e2b6c69afce61926bb0a2a34d2d9 by Eric Snow in branch 
'main':
bpo-45019: Clean up the frozen __hello__ module. (gh-28374)
https://github.com/python/cpython/commit/3814e2036d96e2b6c69afce61926bb0a2a34d2d9


--

___
Python tracker 

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



[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-15 Thread Eric Snow


Eric Snow  added the comment:

Setting __file__ on frozen modules is only one example.  I actually need the 
stdlib dir to be preserved for other uses.

FWIW, I think you're probably right about __file__ on frozen modules.  That 
said, further discussion about __file__ (or __path__) is probably more suitable 
in bpo-21736.

--

___
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-09-15 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +26790
pull_request: https://github.com/python/cpython/pull/28375

___
Python tracker 

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



[issue5846] Deprecate obsolete functions in unittest

2021-09-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I do not think that PR 28299 is correct. We want to deprecate these functions 
which are implemented in the unittest.loader module, not just names exported to 
the unittest module.

--

___
Python tracker 

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



[issue45187] Some tests in test_socket are not run

2021-09-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
dependencies: +Dangling threads in skipped tests in test_socket

___
Python tracker 

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



[issue45212] Dangling threads in skipped tests in test_socket

2021-09-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +26789
pull_request: https://github.com/python/cpython/pull/28317

___
Python tracker 

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



[issue45167] deepcopy of GenericAlias with __deepcopy__ method is broken

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Serhiy! ✨  ✨

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



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

2021-09-15 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +26788
pull_request: https://github.com/python/cpython/pull/28374

___
Python tracker 

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



[issue45205] test_compileall logs "Compiling ..." messages

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 9443ce4eedbcaffb3262e7ede1dd100678e85506 by Miss Islington (bot) 
in branch '3.9':
bpo-45205: Make test_compileall quiet (GH-28356) (GH-28364)
https://github.com/python/cpython/commit/9443ce4eedbcaffb3262e7ede1dd100678e85506


--

___
Python tracker 

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



[issue45205] test_compileall logs "Compiling ..." messages

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 17000b5a80e6ec071ea5007dcc6792e9daaaf0f2 by Miss Islington (bot) 
in branch '3.10':
bpo-45205: Make test_compileall quiet (GH-28356) (GH-28370)
https://github.com/python/cpython/commit/17000b5a80e6ec071ea5007dcc6792e9daaaf0f2


--

___
Python tracker 

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



[issue45167] deepcopy of GenericAlias with __deepcopy__ method is broken

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 2746045a37e0d56ffdd8bb79f961bd7df0d1afba by Miss Islington (bot) 
in branch '3.9':
bpo-45167: Fix deepcopying of GenericAlias (GH-28324) (GH-28368)
https://github.com/python/cpython/commit/2746045a37e0d56ffdd8bb79f961bd7df0d1afba


--

___
Python tracker 

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



[issue45167] deepcopy of GenericAlias with __deepcopy__ method is broken

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset de4c9c0bdc9b62e68dacd0c4bac20d7f4c527511 by Miss Islington (bot) 
in branch '3.10':
bpo-45167: Fix deepcopying of GenericAlias (GH-28324) (GH-28367)
https://github.com/python/cpython/commit/de4c9c0bdc9b62e68dacd0c4bac20d7f4c527511


--

___
Python tracker 

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



[issue45205] test_compileall logs "Compiling ..." messages

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Victor! ✨  ✨

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



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

2021-09-15 Thread Eric Snow


Eric Snow  added the comment:


New changeset 4b30aaa0c9dc4da956199dbd48af9c06089cb271 by Eric Snow in branch 
'main':
bpo-45019: Silence a warning in test_ctypes. (gh-28362)
https://github.com/python/cpython/commit/4b30aaa0c9dc4da956199dbd48af9c06089cb271


--

___
Python tracker 

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



[issue45183] Unexpected exception with zip importer

2021-09-15 Thread Brett Cannon


Change by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-09-15 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue45207] test_gdb logs "Function ... not defined" messages

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Victor! ✨  ✨

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



[issue45207] test_gdb logs "Function ... not defined" messages

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 1c70efcbb57ab4eb65ca604b39606fceff6db4f5 by Miss Islington (bot) 
in branch '3.9':
bpo-45207: Make test_gdb.test_pycfunction() quiet (GH-28355) (GH-28366)
https://github.com/python/cpython/commit/1c70efcbb57ab4eb65ca604b39606fceff6db4f5


--

___
Python tracker 

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



[issue45207] test_gdb logs "Function ... not defined" messages

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset bbaf5c27e659cf372c34a6fe7ca31a2f5cb20a50 by Miss Islington (bot) 
in branch '3.10':
bpo-45207: Make test_gdb.test_pycfunction() quiet (GH-28355) (GH-28365)
https://github.com/python/cpython/commit/bbaf5c27e659cf372c34a6fe7ca31a2f5cb20a50


--

___
Python tracker 

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



[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Erlend! ✨  ✨

--

___
Python tracker 

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



[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 97802a8edb3f15aef9ecc1cac97c4c1b4ed3fdfc by Miss Islington (bot) 
in branch '3.9':
bpo-45089: Improve sqlite3 trace callback docs (GH-28238) (GH-28372)
https://github.com/python/cpython/commit/97802a8edb3f15aef9ecc1cac97c4c1b4ed3fdfc


--

___
Python tracker 

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



[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-15 Thread Jeremy Maitin-Shepard


Jeremy Maitin-Shepard  added the comment:

Another possible resolution would to simply make threads that attempt to 
acquire the GIL after Python starts to finalize hang (i.e. sleep until the 
process exits).  Since the GIL can never be acquired again, this is in some 
sense the simplest way to fulfill the contract.  This also ensures that any 
data stored on the thread call stack and referenced from another thread remains 
valid.  As long as nothing on the main thread blocks waiting for one of these 
hung threads, there won't be deadlock.


I have a case right now where a background thread (created from C++, which is 
similar to a daemon Python thread) acquires the GIL, and calls 
"call_soon_threadsafe" on an asycnio event loop.  I think that causes some 
Python code internally to release the GIL at some point, after triggering some 
code to run on the main thread which happens to cause the program to exit.  
While `Py_FinalizeEx` is running, the call to "call_soon_threadsafe" completes 
on the background thread, attempts to re-acquire the GIL, which triggers a call 
to pthread_exit.  That unwinds the C++ stack, which results in a call to 
Py_DECREF without the GIL held, leading to a crash.

--
nosy: +jbms

___
Python tracker 

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



[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 87f0ac8c1de83ac63447b9fe799dfb1657a5a9db by Miss Islington (bot) 
in branch '3.10':
bpo-45089: Improve sqlite3 trace callback docs (GH-28238) (GH-28371)
https://github.com/python/cpython/commit/87f0ac8c1de83ac63447b9fe799dfb1657a5a9db


--

___
Python tracker 

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



[issue45208] test_pdb: test_checkline_is_not_executable() logs messages

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 0e4f913da88791644150282e38ba21d1fca5fd91 by Miss Islington (bot) 
in branch '3.10':
bpo-45208: Make test_pdb.test_checkline_is_not_executable() quiet (GH-28354) 
(GH-28363)
https://github.com/python/cpython/commit/0e4f913da88791644150282e38ba21d1fca5fd91


--

___
Python tracker 

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



[issue45186] Marshal output isn't completely deterministic.

2021-09-15 Thread Eric Snow


Eric Snow  added the comment:

That's a good idea.  It's certainly cleaner than the approach I took 
(optionally pass in to marshal.dumps() the list of "before" object/refcount 
pairs to compare in w_ref()).

Adding a flag to marshal.dumps() to opt out shouldn't be too big a deal.  (I 
expect all users of marshal will want the improvement by default.)

--

___
Python tracker 

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



[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2021-09-15 Thread Hasan


Change by Hasan :


--
pull_requests: +26787
pull_request: https://github.com/python/cpython/pull/28373

___
Python tracker 

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



[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

I tried this:

- remove the generated .h files
- touched dictobject.c
- touched dictobject.h

After each step I tried to rebuild. Each case the compilation of frozen.c 
failed and then the build stopped, so apparently the .h files weren't generated 
early enough.

Here's the error message:

C:\Users\gvanrossum\cpython\Python\frozen.c(44,10): fatal error C1083: Cannot 
open include file: 'frozen_modules/abc.
h': No such file or directory 
[C:\Users\gvanrossum\cpython\PCbuild\pythoncore.vcxproj]

--

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-15 Thread miss-islington


miss-islington  added the comment:


New changeset a5bc0ffc520e09226f85d5fa8faaa83be0acee68 by Miss Islington (bot) 
in branch '3.10':
bpo-45193: News for IDLE PR_28343 (GH-28348)
https://github.com/python/cpython/commit/a5bc0ffc520e09226f85d5fa8faaa83be0acee68


--

___
Python tracker 

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



[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 51056b40e711d84692d099ac8970077b33c7fafd by Erlend Egeberg 
Aasland in branch 'main':
bpo-45089: Improve sqlite3 trace callback docs (GH-28238)
https://github.com/python/cpython/commit/51056b40e711d84692d099ac8970077b33c7fafd


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26786
pull_request: https://github.com/python/cpython/pull/28372

___
Python tracker 

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



[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-09-15 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +26785
pull_request: https://github.com/python/cpython/pull/28371

___
Python tracker 

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



[issue34602] python3 resource.setrlimit strange behaviour under macOS

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 2563dd2d0a1cf793afca328ae9e195b72bd2b391 by Łukasz Langa in 
branch '3.10':
[3.10] bpo-34602: Quadruple stack size on macOS when compiling with UBSAN 
(GH-27309) (GH-28280)
https://github.com/python/cpython/commit/2563dd2d0a1cf793afca328ae9e195b72bd2b391


--

___
Python tracker 

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



[issue5846] Deprecate obsolete functions in unittest

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset ff6d2cc55aac5cc53e331cae145d0cf35ec647b0 by Erlend Egeberg 
Aasland in branch 'main':
bpo-5846: Deprecate obsolete methods in `unittest` (GH-28299)
https://github.com/python/cpython/commit/ff6d2cc55aac5cc53e331cae145d0cf35ec647b0


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Steve Dower


Steve Dower  added the comment:

Should be able to, yeah. Though I didn't test that.

--

___
Python tracker 

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



[issue45205] test_compileall logs "Compiling ..." messages

2021-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26784
pull_request: https://github.com/python/cpython/pull/28370

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 9d76d28867c28bcc881b851547a9cd7ac003ae88 by Terry Jan Reedy in 
branch 'main':
bpo-45193: News for IDLE PR_28343 (GH-28348)
https://github.com/python/cpython/commit/9d76d28867c28bcc881b851547a9cd7ac003ae88


--

___
Python tracker 

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



[issue45193] IDLE Show completions pop-up not working on Ubuntu Linux

2021-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26783
pull_request: https://github.com/python/cpython/pull/28369

___
Python tracker 

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



[issue45167] deepcopy of GenericAlias with __deepcopy__ method is broken

2021-09-15 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45167] deepcopy of GenericAlias with __deepcopy__ method is broken

2021-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26782
pull_request: https://github.com/python/cpython/pull/28368

___
Python tracker 

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



[issue45167] deepcopy of GenericAlias with __deepcopy__ method is broken

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 5dce51a8875d9639786741e962b3cb208596b096 by Serhiy Storchaka in 
branch 'main':
bpo-45167: Fix deepcopying of GenericAlias (GH-28324)
https://github.com/python/cpython/commit/5dce51a8875d9639786741e962b3cb208596b096


--

___
Python tracker 

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



[issue45207] test_gdb logs "Function ... not defined" messages

2021-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26780
pull_request: https://github.com/python/cpython/pull/28366

___
Python tracker 

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



[issue45207] test_gdb logs "Function ... not defined" messages

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 84a6061e29e9dc13909bdf6f541f48c2a4f1d410 by Victor Stinner in 
branch 'main':
bpo-45207: Make test_gdb.test_pycfunction() quiet (GH-28355)
https://github.com/python/cpython/commit/84a6061e29e9dc13909bdf6f541f48c2a4f1d410


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45207] test_gdb logs "Function ... not defined" messages

2021-09-15 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +26779
pull_request: https://github.com/python/cpython/pull/28365

___
Python tracker 

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



[issue45205] test_compileall logs "Compiling ..." messages

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset cc057ff5227b3a4ded637caa7ba51b67b06abaaa by Victor Stinner in 
branch 'main':
bpo-45205: Make test_compileall quiet (GH-28356)
https://github.com/python/cpython/commit/cc057ff5227b3a4ded637caa7ba51b67b06abaaa


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45205] test_compileall logs "Compiling ..." messages

2021-09-15 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +26778
pull_request: https://github.com/python/cpython/pull/28364

___
Python tracker 

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



[issue45208] test_pdb: test_checkline_is_not_executable() logs messages

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e08e491a6ceea8ca105612df10147418c4e105b8 by Victor Stinner in 
branch 'main':
bpo-45208: Make test_pdb.test_checkline_is_not_executable() quiet (GH-28354)
https://github.com/python/cpython/commit/e08e491a6ceea8ca105612df10147418c4e105b8


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45208] test_pdb: test_checkline_is_not_executable() logs messages

2021-09-15 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +26777
pull_request: https://github.com/python/cpython/pull/28363

___
Python tracker 

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



[issue45204] test_peg_generator: test_soft_keyword() logs many messages into stdout

2021-09-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 764e6823a7632c2091db93da04c15900350ad524 by Pablo Galindo Salgado 
in branch 'main':
bpo-45204: Reduce verbosity of test_peg_generator (GH-28360)
https://github.com/python/cpython/commit/764e6823a7632c2091db93da04c15900350ad524


--
nosy: +lukasz.langa

___
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-09-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

I would move "default to "on" (except if actually running out of the source 
tree)" to the "maybe" category. I left a few comments in other deps. I think we 
should start by turning this on by default in PGO builds.

Separately, I encourage you to collect reliable performance numbers. It would 
be nice to see a dip on speed.python.org for this benchmark:

https://speed.python.org/timeline/#/?exe=12=python_startup=1=50=off=on=on

(but that won't show up until we turn this on by default for PGO builds).

--

___
Python tracker 

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



[issue45186] Marshal output isn't completely deterministic.

2021-09-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

I would propose that marshal internally make an extra pass over its input in 
order to determine which objects are referenced multiple times. This will speed 
up reading marshalled data (in addition to addressing the reproducibility issue 
with debug builds) at the cost of slowing down writing it, so there may need to 
be a way for 3rd party users to turn this off (or a way for importlib and 
compileall to turn it on).

--
nosy: +gvanrossum

___
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-09-15 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +26776
pull_request: https://github.com/python/cpython/pull/28362

___
Python tracker 

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



[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

Is this now done? I.e. can we now drop the frozen .h files from the repo?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

Honestly I find it debatable whether we're doing anyone a favor by publishing 
the __file__ of the corresponding stdlib file for frozen modules. There will be 
situations where this points to the wrong file, and editing the file will not 
have an effect (unless you rebuild). I'd rather tell people to use -X 
frozen_modules=off until they can fix their dependency on the __file__ of 
frozen modules.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue45209] multiprocessing tests log: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown

2021-09-15 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

I would like to work on this, if no one has started yet.

--
nosy: +sobolevn

___
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-09-15 Thread Eric Snow


Eric Snow  added the comment:

At this point the fundamental work is done.  Here are some follow-up tasks to 
wrap up this issue:

* freeze the remaining stdlib modules imported during startup (os, site, 
codecs, encodings.*)
   + blocked by bpo-45186 and bpo-45188
* default to "on" (except if actually running out of the source tree)
   + blocked by bpo-45211 (if we want to minimize disk access)
* always default to "on" if it's a PGO build, even if running out of the source 
tree
* stop tracking the frozen module .h files in the repo
   + blocked by bpo-45188
* (maybe) freeze modules imported for "python -m ..." (e.g. runpy)
* (maybe) freeze a small subset of the encodings (e.g. UTF-8)
   + blocked by a valid __path__ (see below) and consequently bpo-45211

Other related follow-up tasks:

* (maybe) make frozen stdlib modules more like source modules, with __file__ 
and __path__ (see bpo-21736)
   + blocked by bpo-45211
   + __path__ allows us to have frozen stdlib packages with non-frozen 
submodules (e.g. encodings)
* (maybe) freeze other modules (e.g. commonly used modules, sysconfig)
* (maybe) use something other than linear search for looking up frozen modules 
(see bpo-45213)

--

___
Python tracker 

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



[issue45213] Frozen modules are looked up using a linear search.

2021-09-15 Thread Eric Snow


Eric Snow  added the comment:

Realistically, I doubt this will ever be a problem.  The list of frozen modules 
is fairly small and the loop in the C code is a lightweight.  So it isn't that 
big of a deal relative to the other costs involved in import.  Even if the 
number of frozen modules grows dramatically, it's unlikely to be a problem.

So we should probably close this.  Mostly I opened this so folks with the same 
observations could find it.  I'll close the issue in a few days in case I 
missed something.

--
status: open -> pending

___
Python tracker 

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



[issue45213] Frozen modules are looked up using a linear search.

2021-09-15 Thread Eric Snow


New submission from Eric Snow :

When looking up a frozen modules, we loop over the array of frozen modules 
until we find a match (or don't).  See find_frozen() in Python/import.c.  The 
frozen importer sits right after the builtin importer and right before the 
file-based importer.  This means the import system does that frozen module 
lookup every time import happens (where it isn't a builtin module), even if 
it's a source module.

--
components: Interpreter Core
messages: 401863
nosy: barry, brett.cannon, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Frozen modules are looked up using a linear search.
type: performance
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



[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue45212] Dangling threads in skipped tests in test_socket

2021-09-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue45204] test_peg_generator: test_soft_keyword() logs many messages into stdout

2021-09-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue45212] Dangling threads in skipped tests in test_socket

2021-09-15 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Dangling threads are reported when run test_socket tests which raise SkipTest 
in setUp() in refleak mode.

$ ./python -m test -R 3:3 test_socket -m testBCM
0:00:00 load avg: 2.53 Run tests sequentially
0:00:00 load avg: 2.53 [1/1] test_socket
beginning 6 repetitions
123456
.Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, 
dangling: 1)
Warning -- Dangling thread: <_MainThread(MainThread, started 139675429708416)>
.Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, 
dangling: 1)
Warning -- Dangling thread: <_MainThread(MainThread, started 139675429708416)>
.Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, 
dangling: 1)
Warning -- Dangling thread: <_MainThread(MainThread, started 139675429708416)>
...
test_socket failed (env changed)

== Tests result: SUCCESS ==

1 test altered the execution environment:
test_socket

Total duration: 655 ms
Tests result: SUCCESS


It happens because tearDown() is not called if setUp() raises any exception 
(including SkipTest). If we want to execute some cleanup code it should be 
registered with addCleanup().

--
components: Tests
messages: 401862
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Dangling threads in skipped tests in test_socket
type: resource usage
versions: Python 3.10, 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



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

2021-09-15 Thread Eric Snow


Eric Snow  added the comment:

On Wed, Sep 15, 2021 at 7:51 AM Karthikeyan Singaravelan
 wrote:
> The PR 28319 seems to have introduced a new deprecation warning in tests :

I'll fix that.

--

___
Python tracker 

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



[issue45083] Need to use the exception class qualname when rendering exception (in C code)

2021-09-15 Thread Diego Ramirez


Change by Diego Ramirez :


--
nosy: +DiddiLeija

___
Python tracker 

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



[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-09-15 Thread Eric Snow


New submission from Eric Snow :

Currently we calculate a number of filesystem paths during runtime 
initialization in Modules/getpath.c (with the key goal of producing what will 
end up in sys.path).  Some of those paths are preserved and some are not.  In 
cases where the discarded data comes from filesystem access, we should preserve 
as much as possible.

The most notable info is location of the stdlib source files.  We would store 
this as PyConfig.stdlib_dir (and _PyPathConfig.stdlib_dir).  We'd expose it 
with sys.stdlibdir (or sys.get_stdlib_dir() if we might need to calculate 
lazily), similar to sys.platlibdir, sys.home, and sys.prefix.

sys.stdlibdir would allow us to avoid filesystem access, for example:

* in site.py
* in sysconfig.py
* detect if python is running out of the source tree (needed for bpo-45020)

FYI, I have a branch that mostly does what I'm suggesting here.

--
assignee: eric.snow
components: Interpreter Core
messages: 401860
nosy: eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Useful (expensive) information is discarded in getpath.c.
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



[issue45188] De-couple the Windows builds from freezing modules.

2021-09-15 Thread Steve Dower


Steve Dower  added the comment:


New changeset 09b4ad11f323f8702cde795e345b75e0fbb1a9a5 by Steve Dower in branch 
'main':
bpo-45188: Windows now regenerates frozen modules at the start of build instead 
of late (GH-28322)
https://github.com/python/cpython/commit/09b4ad11f323f8702cde795e345b75e0fbb1a9a5


--

___
Python tracker 

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



[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-15 Thread Zachary Ware


Change by Zachary Ware :


Removed file: 
https://bugs.python.org/file50281/MicrosoftOnlineServicesTerms(WW)(English)(February2021)(CR).docx

___
Python tracker 

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



[issue15870] PyType_FromSpec should take metaclass as an argument

2021-09-15 Thread Zachary Ware


Change by Zachary Ware :


--
components:  -2to3 (2.x to 3.x conversion tool), Argument Clinic, Build, C API, 
Cross-Build, Demos and Tools, Distutils, Documentation, Extension Modules, 
FreeBSD, IDLE, IO, Installation, Library (Lib), Parser, Regular Expressions, 
SSL, Subinterpreters, Tests, Tkinter, Unicode, Windows, XML, asyncio, ctypes, 
email, macOS
nosy:  -Alex.Willmer, asvetlov, barry, dstufft, eric.araujo, ezio.melotti, 
koobs, larry, lys.nikolaou, mrabarnett, ned.deily, pablogsal, paul.moore, 
r.david.murray, ronaldoussoren, stephaniegilbert944, steve.dower, terry.reedy, 
tim.golden, vstinner, yselivanov, zach.ware
type: crash -> enhancement
versions:  -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue45202] Add 'remove_barry_from_BDFL' future to revert effects of 'from __future__ import barry_as_FLUFL'

2021-09-15 Thread Eric V. Smith


Eric V. Smith  added the comment:

I agree this should be rejected due to pointlessness and complexity.

I'll give my usual advice: if you really want to see this happen, I suggest 
opening a discussion on the python-ideas mailing list. Then if there's 
consensus to go ahead, this issue can be re-opened.

--
nosy: +eric.smith
resolution:  -> rejected
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



  1   2   >