[issue43293] Move note about GIL to top of threading module

2021-02-21 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +pitrou

___
Python tracker 

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



[issue43293] Move note about GIL to top of threading module

2021-02-21 Thread Guanzhong Chen


Change by Guanzhong Chen :


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

___
Python tracker 

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



[issue38822] Inconsistent os.stat behavior for directory with Access Denied

2021-02-21 Thread Eryk Sun


Eryk Sun  added the comment:

Here's an implementation of attributes_from_dir() that strips trailing slashes 
(e.g. "C:/spam///" -> "C:/spam"), which entails copying the const string up to 
the last character that's not a slash. Rooted paths and drive paths that 
reference a root directory, such as "/" and "C:", are special cased to 
avoid creating an empty path or a drive-relative path (e.g. "C:", which expands 
to the current working directory on drive C:).

static BOOL
attributes_from_dir(LPCWSTR pszFile, BY_HANDLE_FILE_INFORMATION *info,
ULONG *reparse_tag)
{
BOOL result = TRUE;
HANDLE hFind;
WIN32_FIND_DATAW fileData;
LPWSTR filename = (LPWSTR)pszFile;
size_t len, n;

/* Issue 38822: trailing slashes must be removed. */
/* Get the length without trailing slashes. */
n = len = wcslen(filename);
while (n && (filename[n - 1] == L'\\' || filename[n - 1] == L'/')) {
n--;
}

if (n != len) {
if (n == 0 || (n == 2 && filename[1] == L':')) {
/* A root directory such as \ or C:\ has no parent to query. */
result = FALSE;
goto cleanup;
}
/* Copy the string without trailing slashes. */
filename = malloc((n + 1) * sizeof(WCHAR));
if (!filename || wcsncpy_s(filename, n + 1, pszFile, n)) {
result = FALSE;
goto cleanup;
}
}

hFind = FindFirstFileW(filename, );
if (hFind == INVALID_HANDLE_VALUE) {
result = FALSE;
goto cleanup;
}
FindClose(hFind);
find_data_to_file_info(, info, reparse_tag);

cleanup:
if (filename && filename != pszFile) {
free(filename);
}
return result;
}

--

___
Python tracker 

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



[issue43293] Move note about GIL to top of threading module

2021-02-21 Thread Guanzhong Chen


New submission from Guanzhong Chen :

The note about the GIL is buried pretty deep in the threading documentation, 
and this makes it hard for first time users to discover why their attempts at 
using threading to parallelizing their application did not work.

This used to be the case in the old Python 2 documentation, but 
https://github.com/python/cpython/commit/d6d17c58af8002000ecd1326c7accafb5af8a9db
 moved it, and no corresponding discussion exists. I think the GIL is a pretty 
important thing to mention, especially for people used to other programming 
languages. I believe the change had a negative effect and should be reverted.

--
assignee: docs@python
components: Documentation
messages: 387503
nosy: docs@python, quantum5
priority: normal
severity: normal
status: open
title: Move note about GIL to top of threading module
type: 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



[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington


miss-islington  added the comment:


New changeset 30fe3ee6d39fba8183db779f15936fe64cc5ec85 by Miss Islington (bot) 
in branch '3.9':
bpo-23882: Doc: Clarify unittest discovery document (GH-21560)
https://github.com/python/cpython/commit/30fe3ee6d39fba8183db779f15936fe64cc5ec85


--

___
Python tracker 

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



[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington


miss-islington  added the comment:


New changeset 9dd018e35cce30bc2545290b6083dbf6e50d7b61 by Miss Islington (bot) 
in branch '3.8':
bpo-23882: Doc: Clarify unittest discovery document (GH-21560)
https://github.com/python/cpython/commit/9dd018e35cce30bc2545290b6083dbf6e50d7b61


--

___
Python tracker 

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



[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +23405
pull_request: https://github.com/python/cpython/pull/24621

___
Python tracker 

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



[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington, miss-islington, miss-islington, miss-islington
nosy_count: 13.0 -> 14.0
pull_requests: +23400, 23401, 23403, 23404
pull_request: https://github.com/python/cpython/pull/24619

___
Python tracker 

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



[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington, miss-islington, miss-islington
nosy_count: 13.0 -> 14.0
pull_requests: +23400, 23401, 23403
pull_request: https://github.com/python/cpython/pull/24619

___
Python tracker 

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



[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington, miss-islington, miss-islington, miss-islington, 
miss-islington
nosy_count: 13.0 -> 14.0
pull_requests: +23400, 23401, 23402, 23403, 23404
pull_request: https://github.com/python/cpython/pull/24619

___
Python tracker 

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



[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 13.0 -> 14.0
pull_requests: +23400
pull_request: https://github.com/python/cpython/pull/24619

___
Python tracker 

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



[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington, miss-islington
nosy_count: 13.0 -> 14.0
pull_requests: +23400, 23401
pull_request: https://github.com/python/cpython/pull/24619

___
Python tracker 

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



[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2021-02-21 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 5a4aa4c03e27ca5007b86c9c1ee62c77ad08a120 by Inada Naoki in branch 
'master':
bpo-23882: Doc: Clarify unittest discovery document (GH-21560)
https://github.com/python/cpython/commit/5a4aa4c03e27ca5007b86c9c1ee62c77ad08a120


--

___
Python tracker 

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



[issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group

2021-02-21 Thread paul j3


paul j3  added the comment:

I've added a script that does what you want, but with a simple utility function 
instead of a parent (or lots of copy-n-paste).



I explored the code a bit, and have an idea that might correct the [parent] 
behavior.

In the method that copies a parent's groups and actions

 def _add_container_actions(self, container):

It might be enough to change

for group in container._mutually_exclusive_groups:
mutex_group = self.add_mutually_exclusive_group(
required=group.required)

to

for group in container._mutually_exclusive_groups:
pgroup = group._container
mutex_group = pgroup.add_mutually_exclusive_group(
required=group.required)

The mutually group records where it was create in its '._container' attribute.  
Usually that would a parser, but in your example would the 'inputs' action 
group.  

I haven't tested this idea.



In https://bugs.python.org/issue11588 (request for inclusive groups), I 
explored adding a Usage_Group class that could nest.  That project become too 
large, especially when considering help formatting.  And I did not give any 
thought to dealing with parents there.



Another issue involving parents (and the potential problems caused by 
copy-by-reference).

https://bugs.python.org/issue22401 
argparse: 'resolve' conflict handler damages the actions of the parent parser



Belatedly I look for other issues involving 'parent', and found these duplicates

https://bugs.python.org/issue25882
argparse help error: arguments created by add_mutually_exclusive_group() are 
shown outside their parent group created by add_argument_group()

https://bugs.python.org/issue16807
argparse group nesting lost on inheritance

--
Added file: https://bugs.python.org/file49827/issue43259_utility.py

___
Python tracker 

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



[issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier

2021-02-21 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue43292] xml.ElementTree iterparse filehandle left open

2021-02-21 Thread Viktor Kis


Viktor Kis  added the comment:

Confirmed that no apps were using the created xml file or folder. Windows 
Explorer was closed for all folders only the terminal shell was open. Issue 
still persists on windows 10 OS.

--

___
Python tracker 

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



[issue43292] xml.ElementTree iterparse filehandle left open

2021-02-21 Thread anthony shaw


anthony shaw  added the comment:

Example script attached works perfectly on macOS 

> python3.9 test.py
[('default', 
'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties'), 
('vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes')]
[('default', 
'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties'), 
('vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes')]

--
nosy: +anthonypjshaw

___
Python tracker 

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



[issue43292] xml.ElementTree iterparse filehandle left open

2021-02-21 Thread Viktor Kis


Viktor Kis  added the comment:

ran python 3.9.2 on windows 10

1) What did you do?
Tried to remove folder that contains a xml file that was worked on by 
ElementTree iterparse with argument source='filename' (string type input)
2. What happened?
python was not able to remove the folder due to file lock still held by 
iterparse.
3. What did you expect to happen
iterparse was supposed to close the filehandle such that the user could then 
write/move/delete the xml file worked on, however python gave a PermissionError:

Traceback (most recent call last):
  File 
"C:\Users\vkisf\Desktop\00_MYSTUFF\01_SOFTWARE\01_PYTHON\01_GITHUB\pycascades2021\ETiterparse.py",
 line 43, in 
shutil.rmtree('subdir2')
  File 
"C:\Users\vkisf\Desktop\00_MYSTUFF\01_SOFTWARE\01_PYTHON\01_GITHUB\pycascades2021\cpython\lib\shutil.py",
 line 740, in rmtree
return _rmtree_unsafe(path, onerror)
  File 
"C:\Users\vkisf\Desktop\00_MYSTUFF\01_SOFTWARE\01_PYTHON\01_GITHUB\pycascades2021\cpython\lib\shutil.py",
 line 618, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
  File 
"C:\Users\vkisf\Desktop\00_MYSTUFF\01_SOFTWARE\01_PYTHON\01_GITHUB\pycascades2021\cpython\lib\shutil.py",
 line 616, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process: 'subdir2\\app.xml'

--
nosy:  -anthonypjshaw

___
Python tracker 

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



[issue43292] xml.ElementTree iterparse filehandle left open

2021-02-21 Thread anthony shaw


anthony shaw  added the comment:

which version of Python were you doing this on?

The function in question is 
https://github.com/python/cpython/blob/master/Lib/xml/etree/ElementTree.py#L1233-L1278

--
nosy: +anthonypjshaw

___
Python tracker 

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



[issue43292] xml.ElementTree iterparse filehandle left open

2021-02-21 Thread Viktor Kis


New submission from Viktor Kis :

Standard library xml.ElementTree - iterparse does not close filehandle properly 
when breaking out of a for loop iterating with iterparse. The issue only occurs 
when the user passes a "string" as a source object instead of a filehandle 
(that is because a user's filehandle can safely be closed in a context manager 
as shown in the attachment).

--
components: XML
files: ETiterparse.py
messages: 387494
nosy: vkisforever
priority: normal
severity: normal
status: open
title: xml.ElementTree iterparse filehandle left open
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file49826/ETiterparse.py

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

FWIW, I don't think there is much of a maintenance burden; hence, the +0.  
You've already done the work.

--

___
Python tracker 

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



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Unless there is a simple, reliable, cheap, and universal solution at hand, 
consider closing this.  Given how long PyTuple_New() has exist, it doesn't seem 
to be much of a problem in the real world.

Historically, we punted on "crashers" involving either gc.get_referrers or byte 
code hacks.  Both of those reach inside Python's black box, allowing disruption 
of otherwise sensible invariants.

--
nosy: +rhettinger

___
Python tracker 

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



[issue1152248] Add support for reading records with arbitrary separators to the standard IO stack

2021-02-21 Thread Christoph Anton Mitterer


Christoph Anton Mitterer  added the comment:

Just wondered whether this is still being considered?

Cheers,
Chris.

--
nosy: +calestyo

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Happy new year to you as well :-)

--

___
Python tracker 

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



[issue42808] Add PyType_Type.tp_vectorcall for type(obj) performance

2021-02-21 Thread Dong-hee Na


Dong-hee Na  added the comment:

Thank you Dennis!

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



[issue42808] Add PyType_Type.tp_vectorcall for type(obj) performance

2021-02-21 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset b19855bb6ffd69a16e8b53873b19b0b04f488716 by Dennis Sweeney in 
branch 'master':
bpo-42808: Add PyType_Type.tp_vectorcall for type(obj) performance (GH-24058)
https://github.com/python/cpython/commit/b19855bb6ffd69a16e8b53873b19b0b04f488716


--
nosy: +corona10

___
Python tracker 

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



[issue43250] [C API] Deprecate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()

2021-02-21 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
title: [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() 
-> [C API] Deprecate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()

___
Python tracker 

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



[issue43291] elementary multiplication by 0.01 error

2021-02-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Here is an explanation for the behavior you're seeing:

   https://docs.python.org/3/tutorial/floatingpoint.html

Here is another famous resource on the subject:

   https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

For exact decimal arithmetic, consider using the decimal module:

   https://docs.python.org/3/library/decimal.html#module-decimal

--
nosy: +rhettinger
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue43260] Never release buffer when MemoryError in print()

2021-02-21 Thread Inada Naoki


Change by Inada Naoki :


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

___
Python tracker 

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



[issue43260] Never release buffer when MemoryError in print()

2021-02-21 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 6e2f144f53982d7103d4cfc2d9361fc445a1817e by Inada Naoki in branch 
'3.8':
bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592)
https://github.com/python/cpython/commit/6e2f144f53982d7103d4cfc2d9361fc445a1817e


--

___
Python tracker 

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



[issue43291] elementary multiplication by 0.01 error

2021-02-21 Thread Tony


New submission from Tony :

on the >>> prompt type:
>>>717161 * 0.01
7171.6101

the same goes for
>>>717161.0 * 0.01
7171.6101

You can easily find more numbers with similar problem:
for i in range(100):
if len(str(i * 0.01)) > 12:
print(i, i * 0.01)

I am sure, that this problem was found before and circumvented by:
>>>717161 / 100
7171.61

but this is hardly the way, one wants to rely on the code.

This is the python version I use:
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit 
(AMD64)] on win32

--
messages: 387485
nosy: tonys_0
priority: normal
severity: normal
status: open
title: elementary multiplication by 0.01 error
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue43260] Never release buffer when MemoryError in print()

2021-02-21 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset d51436f95bf5978f82d917e53e9a456fdaa83a9d by Inada Naoki in branch 
'3.9':
bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592)
https://github.com/python/cpython/commit/d51436f95bf5978f82d917e53e9a456fdaa83a9d


--

___
Python tracker 

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



[issue43289] step bug in turtle's for loop

2021-02-21 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

If I understand correctly, changing the -1 to a -2 does not actually make the 
program "crash" -- you just only see one black circle.

The reason is that range(40, 0, -2) produces 40, 38, 36, etc., all of which are 
even numbers, so rad % 2 is always 0, so col[rad % 2] is always "black". You 
could try:

for index, rad in enumerate(range(40, 0, -2)): 
dot(5*rad, col[index % 2])

In the future, I would suggest asking questions like this on StackOverflow, 
since this is not a bug in Python itself.

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue43125] Trying To Concatenate Bytes and String in SMTPLIB

2021-02-21 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



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-21 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



[issue39791] New `files()` api from importlib_resources.

2021-02-21 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Dong-hee Na


Dong-hee Na  added the comment:

> +0 I don't see any downside.

Thank you Raymond :)
I agree with your view, At first, I thought that instantiation time reducing is 
also meaningful and we already applied PEP 590 for some of the types to reduce 
instantiation. (e.g range(), list(), dict(), bool(), reversed(), type()..)

And also I thought that filter is one of the well-used features in Python so it 
was one of the candidates to apply from my sight. ;)

But if this PR only consume maintenance cost, I am okay with not to apply it 
doesn't matter :)

And happy new year Raymond(Sorry I am late ;) But the lunar new year was only 
2weeks ago so not too late lol)

--

___
Python tracker 

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



[issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group

2021-02-21 Thread Christoph Anton Mitterer


Christoph Anton Mitterer  added the comment:

Well but if that's anyway one of its actual major use cases, wouldn't it make 
sense to properly support it?

Especially when one has a large set of identical options (which is then even 
more likely to also include mutually exclusive ones) such a feature seems to be 
pretty useful to prevent bloated code by copy large number of lines of 
identical argument parsing code.


argparse is really nice and powerful,... and enables people to make clean 
argparsing code, but it seems a few quite features which are quite often asked 
for miss, like e.g. #11354 or that one can arbitrarily group mutually exclusive 
options like:



--foo


--bar
--baz

<(mutually exclusive>


Anyway, feel free to close if you don't like supporting mutually exclusive 
groups with parents.

Cheers,
Chris.

--

___
Python tracker 

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



[issue43260] Never release buffer when MemoryError in print()

2021-02-21 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23399
pull_request: https://github.com/python/cpython/pull/24618

___
Python tracker 

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



[issue43260] Never release buffer when MemoryError in print()

2021-02-21 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23398
pull_request: https://github.com/python/cpython/pull/24617

___
Python tracker 

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



[issue43260] Never release buffer when MemoryError in print()

2021-02-21 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 01806d5beba3d208bb56adba6829097d803bf54f by Inada Naoki in branch 
'master':
bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592)
https://github.com/python/cpython/commit/01806d5beba3d208bb56adba6829097d803bf54f


--

___
Python tracker 

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



[issue43288] test_importlib failure due to missing skip() method

2021-02-21 Thread Neil Schemenauer


Neil Schemenauer  added the comment:


New changeset 44fe32061d60f4bd9c4fa48c24e3e4ba26033dba by Neil Schemenauer in 
branch '3.9':
[3.9] bpo-43288: Fix bug in test_importlib test. (GH-24616)
https://github.com/python/cpython/commit/44fe32061d60f4bd9c4fa48c24e3e4ba26033dba


--

___
Python tracker 

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



[issue36636] Inner exception is not being raised using asyncio.gather

2021-02-21 Thread Irit Katriel


Irit Katriel  added the comment:

"twisteroid ambassador"'s explanation is correct - you need to use the 
traceback module to render complete information about an exception.

And indeed, return_exceptions=False gives you the first exception (not all of 
them) as explained here 
https://docs.python.org/3/library/asyncio-task.html#asyncio.gather

--
nosy: +iritkatriel
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue40404] Python quit unexpectedly

2021-02-21 Thread Irit Katriel


Irit Katriel  added the comment:

Joseph, please create a new issue if you are able to provide information 
indicating an issue with Python, as Ned explained above.

--
nosy: +iritkatriel
resolution:  -> works for me
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue43290] [sqlite3] remove legacy code from pysqlite_step

2021-02-21 Thread Erlend Egeberg Aasland


New submission from Erlend Egeberg Aasland :

pysqlite_step() contains a NULL check needed for SQLite 3.5 and earlier. This 
can be removed.

--
components: Library (Lib)
messages: 387476
nosy: berker.peksag, erlendaasland, serhiy.storchaka
priority: normal
severity: normal
status: open
title: [sqlite3] remove legacy code from pysqlite_step
type: enhancement
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



[issue43288] test_importlib failure due to missing skip() method

2021-02-21 Thread Neil Schemenauer


Change by Neil Schemenauer :


--
pull_requests: +23397
pull_request: https://github.com/python/cpython/pull/24616

___
Python tracker 

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



[issue43288] test_importlib failure due to missing skip() method

2021-02-21 Thread Neil Schemenauer


Neil Schemenauer  added the comment:


New changeset 84f7afe65c29330f3ff8e318e054b96554a2dede by Neil Schemenauer in 
branch 'master':
Fix failed merge of bpo-43288. (GH-24614)
https://github.com/python/cpython/commit/84f7afe65c29330f3ff8e318e054b96554a2dede


--

___
Python tracker 

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



[issue43283] IDLE: Explain print slowness and speedup method

2021-02-21 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +23396
pull_request: https://github.com/python/cpython/pull/24615

___
Python tracker 

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



[issue43289] step bug in turtle's for loop

2021-02-21 Thread Yehuda Katz


Yehuda Katz  added the comment:

Correction to my msg387472: Every *even* step crashes the code.

--

___
Python tracker 

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



[issue43288] test_importlib failure due to missing skip() method

2021-02-21 Thread Neil Schemenauer


Change by Neil Schemenauer :


--
pull_requests: +23395
pull_request: https://github.com/python/cpython/pull/24614

___
Python tracker 

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



[issue43288] test_importlib failure due to missing skip() method

2021-02-21 Thread Neil Schemenauer


Neil Schemenauer  added the comment:


New changeset 50288aa8c955f66ab67a7dadf250ea5f4238eb67 by Neil Schemenauer in 
branch 'master':
bpo-43288: Fix bug in test_importlib test. (GH-24612)
https://github.com/python/cpython/commit/50288aa8c955f66ab67a7dadf250ea5f4238eb67


--

___
Python tracker 

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



[issue43288] test_importlib failure due to missing skip() method

2021-02-21 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +23394
pull_request: https://github.com/python/cpython/pull/24613

___
Python tracker 

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



[issue39791] New `files()` api from importlib_resources.

2021-02-21 Thread Neil Schemenauer


Change by Neil Schemenauer :


--
nosy: +nascheme
nosy_count: 9.0 -> 10.0
pull_requests: +23392
pull_request: https://github.com/python/cpython/pull/24612

___
Python tracker 

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



[issue39791] New `files()` api from importlib_resources.

2021-02-21 Thread Neil Schemenauer


Change by Neil Schemenauer :


--
nosy: +nascheme, nascheme
nosy_count: 9.0 -> 10.0
pull_requests: +23392, 23393
pull_request: https://github.com/python/cpython/pull/24612

___
Python tracker 

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



[issue43289] step bug in turtle's for loop

2021-02-21 Thread Yehuda Katz


New submission from Yehuda Katz :

from turtle import *

col = ["black", "white"]

for rad in range(40, 0, -1): 
dot(5*rad, col[rad % 2])

done()
==
Any other step than -1 crashes the code.

Thank you.

--
messages: 387472
nosy: Yehuda
priority: normal
severity: normal
status: open
title: step bug in turtle's for loop
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue43288] test_importlib failure due to missing skip() method

2021-02-21 Thread Neil Schemenauer


Change by Neil Schemenauer :


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

___
Python tracker 

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



[issue43288] test_importlib failure due to missing skip() method

2021-02-21 Thread Neil Schemenauer


New submission from Neil Schemenauer :

The FileSystem class is missing a skip() method.  If the file system doesn't 
support Unicode filenames, the test crashes.

  File "/home/nas/src/cpython/Lib/test/test_importlib/fixtures.py", line 221, 
in unicode_filename
self.skip("File system does not support non-ascii.")
AttributeError: 'FileSystem' object has no attribute 'skip'

I'm running tests inside a Debian 32-bit container and for some reason the 
test.support.FS_NONASCII variable is not set.

--
components: Tests
messages: 387471
nosy: nascheme
priority: normal
severity: normal
status: open
title: test_importlib failure due to missing skip() method
type: behavior

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+0 I don't see any downside.

Note, the benchmark only times instantiation of the filter object.  It doesn't 
actually run the iterator which is where most of the runtime cost is spent.  So 
in actual code there is almost zero benefit.  For example, add "list" to the 
statement:   stmt="b = list(filter(lambda x: x % 2 == 0, a))" and the 
improvement disappears.

--
nosy: +rhettinger

___
Python tracker 

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



[issue16954] Add docstrings for ElementTree module

2021-02-21 Thread Neil Schemenauer


Change by Neil Schemenauer :


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

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue43287] Use PEP 590 vectorcall to speed up calls to filter()

2021-02-21 Thread Dong-hee Na


New submission from Dong-hee Na :

+--++--+
| Benchmark| master | vectorcall   |
+==++==+
| bench filter | 191 ns | 151 ns: 1.26x faster |
+--++--+

Like reversed(https://bugs.python.org/issue41922), it looks okay to update 
filter() to use PEP 590.

--
components: Interpreter Core
files: filter_bench.py
messages: 387469
nosy: corona10, vstinner
priority: normal
severity: normal
status: open
title: Use PEP 590 vectorcall to speed up calls to filter()
versions: Python 3.10
Added file: https://bugs.python.org/file49825/filter_bench.py

___
Python tracker 

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



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

2021-02-21 Thread 双草酸酯

双草酸酯  added the comment:

I came across this issue as well.
I checked Microsoft documentations and it seems `InternetGetProxyInfo` in 
WinInet is deprecated, while `WinHttpGetIEProxyConfigForCurrentUser` in WinHTTP 
will return the exact same string as what it stored registery. 

https://docs.microsoft.com/en-US/troubleshoot/windows-client/networking/configure-client-proxy-server-settings-by-registry-file
Also from this documentation, a proxy server could have "http://; prefix, so I 
guess it could also support "https://; prefix if a user set a https proxy.

--
components:  -Windows
nosy: +kotori

___
Python tracker 

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



[issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()

2021-02-21 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

If I remember correctly, cython-generated C code calls those macros at
appropriate places, so there are probably a bunch of projects that are
using them and the developers have no idea.

On Thu, Feb 18, 2021, 04:16 STINNER Victor  wrote:

>
> STINNER Victor  added the comment:
>
> Using INADA-san recipe
> https://github.com/methane/notes/tree/master/2020/wchar-cache I found the
> 62 projects on the PyPI top 4000 which contain "PyFPE" pattern:
>
> asyncpg-0.22.0.tar.gz
> auditwheel-3.3.1.tar.gz
> av-8.0.3.tar.gz
> bcolz-1.2.1.tar.gz
> BDQuaternions-0.2.15.tar.gz
> bx-python-0.8.9.tar.gz
> ConfigSpace-0.4.18.tar.gz
> Cython-0.29.21.tar.gz
> cytoolz-0.11.0.tar.gz
> ddtrace-0.46.0.tar.gz
> dedupe-hcluster-0.3.8.tar.gz
> dependency-injector-4.23.5.tar.gz
> fastavro-1.3.2.tar.gz
> fastdtw-0.3.4.tar.gz
> Fiona-1.8.18.tar.gz
> fuzzysearch-0.7.3.tar.gz
> fuzzyset-0.0.19.tar.gz
> gensim-3.8.3.tar.gz
> grpcio-1.35.0.tar.gz
> gssapi-1.6.12.tar.gz
> hdbscan-0.8.27.tar.gz
> hmmlearn-0.2.5.tar.gz
> imagecodecs-2021.1.28.tar.gz
> implicit-0.4.4.tar.gz
> lightfm-1.16.tar.gz
> lupa-1.9.tar.gz
> lxml-4.6.2.tar.gz
> mujoco-py-2.0.2.13.tar.gz
> neobolt-1.7.17.tar.gz
> orderedset-2.0.3.tar.gz
> peewee-3.14.1.tar.gz
> Pillow-8.1.0.tar.gz
> Pillow-SIMD-7.0.0.post3.tar.gz
> pmdarima-1.8.0.tar.gz
> pomegranate-0.14.2.tar.gz
> pycapnp-1.0.0.tar.gz
> pydevd-2.2.0.tar.gz
> pygame-2.0.1.tar.gz
> pyhacrf-datamade-0.2.5.tar.gz
> pyjq-2.5.1.tar.gz
> pysam-0.16.0.1.tar.gz
> pystan-2.19.1.1.tar.gz
> PyWavelets-1.1.1.tar.gz
> rasterio-1.2.0.tar.gz
> ruptures-1.1.3.tar.gz
> s2sphere-0.2.5.tar.gz
> scikit-image-0.18.1.tar.gz
> scipy-1.6.1.tar.gz
> Shapely-1.7.1.tar.gz
> simplejson-3.17.2.tar.gz
> spacy-3.0.3.tar.gz
> statsmodels-0.12.2.tar.gz
> tables-3.6.1.tar.gz
> Theano-1.0.5.tar.gz
> thinc-8.0.1.tar.gz
> tinycss-0.4.tar.gz
> tslearn-0.5.0.5.tar.gz
> uvloop-0.15.1.tar.gz
> weighted_levenshtein-0.2.1.tar.gz
> wordcloud-1.8.1.tar.gz
> wsaccel-0.6.3.tar.gz
> wxPython-4.1.1.tar.gz
>
>
> Example with asyncpg:
>
> $ rg PyFPE
> asyncpg/pgproto/pgproto.c
> 39841:PyFPE_START_PROTECT("add", return NULL)
> 39843:PyFPE_END_PROTECT(result)
>
> asyncpg/protocol/protocol.c
> 85260:PyFPE_START_PROTECT("add", return NULL)
> 85262:PyFPE_END_PROTECT(result)
> 85563:PyFPE_START_PROTECT("subtract", return NULL)
> 85565:PyFPE_END_PROTECT(result)
> 85734:PyFPE_START_PROTECT("add", return NULL)
> 85736:PyFPE_END_PROTECT(result)
>
>
> So it doesn't sound like a good idea to immediately remove these two
> macros.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier

2021-02-21 Thread Joseph Shen


Joseph Shen  added the comment:

Right now there is no need to keep this limits, and the __version__ info from 
GCC is quite simple. Pls the attached snapshot image. 
Therefor I don't think we should keep a commit from 2000.

--

___
Python tracker 

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



[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-21 Thread Christian Heimes


Christian Heimes  added the comment:

My offer still stands: If you can fulfill the requirements of PEP 11 for s390, 
then I'm fine with keeping the code for s390 around. Victor has a different 
opinion, so you have to contact the Steering Council and get their approval, 
too.

Our ticket system doesn't permit amending comments. Otherwise I would have 
clarified my comment. Also I used the words "might" and "at a later point" in 
my initial ticket.

--

___
Python tracker 

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



[issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter()

2021-02-21 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> I am not sure that the difference is significant enough to justify the 
> optimization.

I would guess it's negligible. I did some quick timeit tests, but the results 
were pretty much equal, so I guess I'd have to use a more precise benchmark 
method.

> But the code is already written in such form, and I am not sure that it is 
> worth to spend our time to change it.

Not even a 30% reduction in code size (for this function)?

--

___
Python tracker 

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



[issue43286] Clarify that Popen.returncode does not get auto-set when the process terminates

2021-02-21 Thread Antony Lee

New submission from Antony Lee :

Currently, the documentation for Popen.returncode states

The child return code, set by poll() and wait() (and indirectly by 
communicate()). A None value indicates that the process hasn’t terminated yet.

A negative value -N indicates that the child was terminated by signal N 
(POSIX only).

As far back as https://bugs.python.org/issue1727024 it had been suggested that 
this fails to emphasize an important piece of information, namely that this 
attribute can be outdated (it is *only* set if poll() or wait() are called; 
this is not obvious, e.g. returncode could have beeen implemented as a property 
that auto-calls poll()).  I do realize that a strict reading of the docs does 
suggest the actual behavior, but a bit of explicitness won't hurt...

The wording suggested in https://bugs.python.org/issue1727024 seems clearer to 
me ("Note: The value stored in returncode may be out-of-date. Use poll() to 
reliably find the current return code.").

--
assignee: docs@python
components: Documentation
messages: 387463
nosy: Antony.Lee, docs@python
priority: normal
severity: normal
status: open
title: Clarify that Popen.returncode does not get auto-set when the process 
terminates
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



[issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier

2021-02-21 Thread hai shi


hai shi  added the comment:

Maybe Guido can give you some answers.

Related commit: 
https://github.com/python/cpython/commit/f26cda62b68b68c07666f2f21b1f16ded03afa37.

--
nosy: +gvanrossum, shihai1991

___
Python tracker 

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



[issue43285] ftplib use host from PASV response

2021-02-21 Thread hai shi


Change by hai shi :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()

2021-02-21 Thread hai shi


hai shi  added the comment:

> So it doesn't sound like a good idea to immediately remove these two macros.

MAYBE we can update the annotation in pyfpe.h to address that we will remove 
those macros in python 4.0.

The fpe have been removed, so those macros will be removed finally.

--
nosy: +shihai1991

___
Python tracker 

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



[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-21 Thread David Edelsohn


David Edelsohn  added the comment:

Christian,

The Python Community Code of Conduct also states:

Being respectful of differing viewpoints and experiences.
Showing empathy towards other community members.

Various developers are passionate about this topic and the entire series of 
comments has been respectful, IMHO. I don't believe that it is helpful when you 
cherry-pick a rule from the code of conduct in response to someone providing 
additional evidence. That is intimidation and shutting down the conversation 
with an implicit threat.

You specifically mentioned m68k when you opened the issue.

This conversation feels very much that you and Victor have pre-determined an 
outcome and are not open to other points of view.  I and others have proposed 
compromises, but the response appears, at least to me, as shifting requirements.

--

___
Python tracker 

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



[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-21 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-21 Thread Christian Heimes


Christian Heimes  added the comment:

For the last time: This ticket is solely about s390 platform. Please stop 
derailing this ticket with comments about unrelated platforms like m68k. 
I'm considering your diversion as "sustained disruption of online community 
discussions", https://www.python.org/psf/conduct/

--

___
Python tracker 

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



[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-21 Thread John Paul Adrian Glaubitz


John Paul Adrian Glaubitz  added the comment:

Oh, and LLVM is currently gaining support M68k which you consider "legacy":

> https://reviews.llvm.org/D95315

It might be a good idea to do some research first before making such statements.

--

___
Python tracker 

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



[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-21 Thread John Paul Adrian Glaubitz


John Paul Adrian Glaubitz  added the comment:

> "Move support of legacy platforms/architectures outside Python"
> https://mail.python.org/archives/list/python-...@python.org/thread/F5BXISYP7RAINXUMYJSEYG7GCFRFAENF/

Motorola 68k isn't a 16-bit architecture, it's a 32-bit architecture.

Also, I am starting to get the feeling that you are trying to escalate a 
conflict here. None of the code that you are complaining about is hurting 
anyone. Yet, you think it is important to keep this discussion and ruining my 
day.

The fact that you take sides for OpenBSD but consider m68k legacy and 
unmaintained (which isn't correct at all - look at the kernel), shows that you 
are biased in this discussion.

--

___
Python tracker 

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



[issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-21 Thread STINNER Victor


STINNER Victor  added the comment:

I created a thread on python-dev:

"Move support of legacy platforms/architectures outside Python"
https://mail.python.org/archives/list/python-...@python.org/thread/F5BXISYP7RAINXUMYJSEYG7GCFRFAENF/

--

___
Python tracker 

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



[issue43285] ftplib use host from PASV response

2021-02-21 Thread RiceX Star


New submission from RiceX Star :

Last year, curl had a security update for CVE-2020-8284. more info, see 
https://hackerone.com/reports/1040166

The problem is ftp client trust the host from PASV response by default, A 
malicious server can trick ftp client into connecting
back to a given IP address and port. This may make ftp client scan ports and 
extract service banner from private newwork.

After test and read ftplib 
module(https://github.com/python/cpython/blob/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Lib/ftplib.py#L346),
 I found ftplib has the same problem.

--
components: Library (Lib)
messages: 387455
nosy: ricexdream
priority: normal
severity: normal
status: open
title: ftplib use host from PASV response
type: security
versions: Python 3.9

___
Python tracker 

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



[issue27640] Add --disable-test-modules configure option to not build nor install tests

2021-02-21 Thread STINNER Victor


STINNER Victor  added the comment:

> I filed issue43282 for this.

Thanks ;-)

--

___
Python tracker 

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



[issue43282] Add split install targets to install tests separately from lib

2021-02-21 Thread STINNER Victor


STINNER Victor  added the comment:

Do you want to work on a PR to implement this idea?

--
nosy: +vstinner

___
Python tracker 

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



[issue40839] Disallow calling PyDict_GetItem() with the GIL released

2021-02-21 Thread STINNER Victor


STINNER Victor  added the comment:

I made a similar change in _PyDict_GetItemHint():

commit d5fc99873769f0d0d5c5d5d99059177a75a4e46e (HEAD -> master, 
upstream/master)
Author: Victor Stinner 
Date:   Sun Feb 21 12:02:04 2021 +0100

bpo-42093: Cleanup _PyDict_GetItemHint() (GH-24582)

* No longer save/restore the current exception. It is no longer used
  with an exception raised.
* No longer clear the current exception on error: it's now up to the
  caller.

--

___
Python tracker 

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



[issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem()

2021-02-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +23389
pull_request: https://github.com/python/cpython/pull/24582

___
Python tracker 

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



[issue42093] Add opcode cache for LOAD_ATTR

2021-02-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d5fc99873769f0d0d5c5d5d99059177a75a4e46e by Victor Stinner in 
branch 'master':
bpo-42093: Cleanup _PyDict_GetItemHint() (GH-24582)
https://github.com/python/cpython/commit/d5fc99873769f0d0d5c5d5d99059177a75a4e46e


--

___
Python tracker 

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



[issue43284] Wrong windows build in 20H2

2021-02-21 Thread bugale bugale


New submission from bugale bugale :

Running `platform.platform()` on Windows 10 20H2 results in the build number 
19041:

Python 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.platform()
'Windows-10-10.0.19041-SP0'

This is incorrect, the build number is 19042.
Using ctypes like in the answer here produces a correct result:
https://stackoverflow.com/questions/3234/python-ctypes-getting-0-with-getversionex-function

--
components: Windows
messages: 387450
nosy: bugale bugale, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Wrong windows build in 20H2
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue43269] [sqlite3] Clean up function scoping

2021-02-21 Thread Berker Peksag


Change by Berker Peksag :


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



[issue43269] [sqlite3] Clean up function scoping

2021-02-21 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 38b6c2acd4bba666bd64779c42b9d91cbee19274 by Erlend Egeberg 
Aasland in branch 'master':
bpo-43269: Remove redundant extern keywords (GH-24605)
https://github.com/python/cpython/commit/38b6c2acd4bba666bd64779c42b9d91cbee19274


--

___
Python tracker 

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



[issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError

2021-02-21 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


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

___
Python tracker 

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



[issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter()

2021-02-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PyLong_Check is two memory reads, bits operation, and comparison with 0. And 
one non-inlined function call when limited API is used. PyLong_CheckExact is 
only one memory read and comparison.

I am not sure that the difference is significant enough to justify the 
optimization. I would require evidences that this optimization is significant 
if it would be proposed now. But the code is already written in such form, and 
I am not sure that it is worth to spend our time to change it.

--

___
Python tracker 

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



[issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError

2021-02-21 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Will do. Thanks for pushing the investigation.

--

___
Python tracker 

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



[issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError

2021-02-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Please go ahead!

--

___
Python tracker 

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



[issue38822] Inconsistent os.stat behavior for directory with Access Denied

2021-02-21 Thread CrouZ


CrouZ  added the comment:

The problem exists in Python 3.9 as well, and it behaves the same as Python 3.8.

Tested with Python 3.9.1.

--
versions: +Python 3.9

___
Python tracker 

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



[issue43283] IDLE: Explain print slowness and speedup method

2021-02-21 Thread miss-islington


miss-islington  added the comment:


New changeset 693aeacf8851d1e9995073e27e50644a505dc49c by Miss Islington (bot) 
in branch '3.9':
bpo-43283: Rearrange some IDLE doc paragraphs. (GH-24604)
https://github.com/python/cpython/commit/693aeacf8851d1e9995073e27e50644a505dc49c


--

___
Python tracker 

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



[issue43283] IDLE: Explain print slowness and speedup method

2021-02-21 Thread miss-islington


miss-islington  added the comment:


New changeset 6ddb25586524022923d076ddb3b5867214c6ce42 by Miss Islington (bot) 
in branch '3.8':
bpo-43283: Rearrange some IDLE doc paragraphs. (GH-24604)
https://github.com/python/cpython/commit/6ddb25586524022923d076ddb3b5867214c6ce42


--

___
Python tracker 

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