[issue43522] SSLContext.hostname_checks_common_name appears to have no effect

2021-05-03 Thread Christian Heimes


Christian Heimes  added the comment:

Seth's urllib3 newsletter reminded me that I forgot to link to OpenSSL issues 
here.

The problem was caused by a bug in OpenSSL. The issue is fixed in OpenSSL 
default branch and is scheduled to land in next 1.1.1 release. My changes to 
Python's ssl module are backports of my OpenSSL fixes for older 1.1.1 releases.

https://github.com/openssl/openssl/issues/14579
https://github.com/openssl/openssl/pull/14856
https://github.com/openssl/openssl/commit/dfccfde06562ac87fe5e5f9401ba86cad050d9a2

--
versions: +Python 3.8, Python 3.9

___
Python tracker 

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



[issue44028] Request for locals().update() to work, it is

2021-05-03 Thread wang xuancong


New submission from wang xuancong :

In general, the ability to update local variables is very important and it 
simplifies life tremendously. For example, in machine learning, it allows 
saving/loading arbitrary-format datasets and arbitrary-structure neural 
networks (NN) using a single line of code. In computer games, no matter how 
many complex data structures are there, saving and loading can be done in a 
single line.

Imagine you are game developer or a deep neural network (DNN) researcher, if 
all local variables are serializable, then no matter how complicated your game 
or your DNN structure is, saving the entire game or DNN (to STDOUT) can be 
simply put into one line as `print(locals())`, and loading the entire game or 
DNN (from STDIN) can be simply put into one line as 
`locals().update(eval(sys.stdin.read()))`.

Currently, `globals().update(...)` takes immediate effect but 
`locals().update(...)` does not work because Python documentation says:

> The default locals act as described for function locals() below:
> modifications to the default locals dictionary should not be
> attempted. Pass an explicit locals dictionary if you need to see
> effects of the code on locals after function exec() returns.

Why they design Python in such way is because of optimization and conforming 
the `exec` statement into a function:

> To modify the locals of a function on the fly is not possible without
> several consequences: normally, function locals are not stored in a
> dictionary, but an array, whose indices are determined at compile time
> from the known locales. This collides at least with new locals added
> by exec. The old exec statement circumvented this, because the
> compiler knew that if an exec without globals/locals args occurred in
> a function, that namespace would be "unoptimized", i.e. not using the
> locals array. Since exec() is now a normal function, the compiler does
> not know what "exec" may be bound to, and therefore can not treat is
> specially.

Since `global().update(...)` works, the following piece of code will work in 
root namespace (i.e., outside any function) because locals() is the same as 
globals() in root namespace:
```
locals().update({'a':3, 'b':4})
print(a, b)
```
But this will not work inside a function.

I have explored a few ways of hacking updating locals() on Python 3, it seems 
there is no way so far. The following piece of code seems to works:
```
def f1():
  sys._getframe(1).f_locals.update({'a':3, 'b':4})
  print(a, b)

f1()
```
However, that is because `sys._getframe(1)` is the root namespace, so 
`sys._getframe(1).f_locals.update()` is essentially `globals().update()`.

>From the above Python developer documentation, I understand that in Python 2, 
>local namespace lookup has 2 modes: optimized mode if there is no `exec` 
>statement, un-optimized mode if there exists an `exec` statement. But in 
>Python 3, `exec` becomes a function, so the compiler cannot determine which 
>namespace optimization mode at compile time (because `exec` can be overridden 
>or aliased into a different name). Therefore, Python 3 has only optimized 
>namespace lookup. My suggestion is that whenever this optimized local 
>namespace lookup fails, perform an un-optimized lookup (which will include 
>locals()). This should solve the problem.

Do you have any other ideas or suggestions for doing this? Thanks!

--
components: Interpreter Core
messages: 392852
nosy: xuancong84
priority: normal
severity: normal
status: open
title: Request for locals().update() to work, it is
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



[issue44027] Python 3.9 UWP does not create key in PythonCore

2021-05-03 Thread Ned Deily


Change by Ned Deily :


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

___
Python tracker 

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



[issue44027] Python 3.9 UWP does not create key in PythonCore

2021-05-03 Thread BinToss


New submission from BinToss :

On Windows, dependent applications such as VapourSynth look for Python's path 
via the entries in HKLM\\SOFTWARE\\Python\\PythonCore\\.
However, the Python 3.8 and 3.9 UWP releases don't create and write to their 
respective subkeys. Only the Win32 releases write to their subkeys.

See https://github.com/vapoursynth/vapoursynth/issues/684

--
components: Installation
messages: 392851
nosy: BinToss
priority: normal
severity: normal
status: open
title: Python 3.9 UWP does not create key in PythonCore
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



[issue26680] Incorporating float.is_integer into Decimal

2021-05-03 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
versions: +Python 3.11 -Python 3.10

___
Python tracker 

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



[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-03 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


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

___
Python tracker 

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



[issue44018] random.seed mutates input bytearray

2021-05-03 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-03 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
nosy: +pablogsal

___
Python tracker 

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



[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-03 Thread Dennis Sweeney


New submission from Dennis Sweeney :

After bpo-38530, I get this in the python shell:


Python 3.10.0b1 (tags/v3.10.0b1:ba42175, May  3 2021, 20:22:30) [MSC v.1928 64 
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class A:
... foobar = 1
...
>>> A.foocar
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: type object 'A' has no attribute 'foocar'. Did you mean: 
'foobar'?
>>>


But I get this in IDLE:

Python 3.10.0b1 (tags/v3.10.0b1:ba42175, May  3 2021, 20:22:30) [MSC v.1928 64 
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
class A:
foobar = 1


A.foocar
Traceback (most recent call last):
  File "", line 1, in 
A.foocar
AttributeError: type object 'A' has no attribute 'foocar'



Can we extend this functionality to IDLE, and fix the discrepancy?

--
assignee: terry.reedy
components: IDLE
messages: 392850
nosy: Dennis Sweeney, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE doesn't offer "Did you mean?" for AttributeError and NameError
type: enhancement
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue40465] Deprecate the optional *random* argument to random.shuffle()

2021-05-03 Thread Anthony Sottile


Change by Anthony Sottile :


--
nosy:  -Anthony Sottile

___
Python tracker 

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



[issue40465] Deprecate the optional *random* argument to random.shuffle()

2021-05-03 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +24553
pull_request: https://github.com/python/cpython/pull/25874

___
Python tracker 

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



[issue44018] random.seed mutates input bytearray

2021-05-03 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 2995bff4269d274c0a3abfd45dc33b28f0c3e25f by Miss Islington (bot) 
in branch '3.10':
bpo-44018: random.seed() no longer mutates its inputs (GH-25856) (GH-25872)
https://github.com/python/cpython/commit/2995bff4269d274c0a3abfd45dc33b28f0c3e25f


--

___
Python tracker 

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



[issue44025] Match doc: Clarify '_' as a soft keyword

2021-05-03 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +24552
pull_request: https://github.com/python/cpython/pull/25873

___
Python tracker 

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



[issue44025] Match doc: Clarify '_' as a soft keyword

2021-05-03 Thread Terry J. Reedy


New submission from Terry J. Reedy :

In #44010, we are trying, as best as is possible with comprehensible REs, to 
identify in which circumstances occurrences of 'match', 'case' and '_' are 
keywords, and should be marked as such.  I was initially unsure and even wrong 
about '_'.

1. Capture Patterns: I was confused by 'And is instead...'.  'It is instead 
...', where 'it' refers to '_', is clearer to me.

2. Wildcard Patterns:  "'_' is a soft keyword" just says it sometimes is and 
sometimes is not, but not when, or rather, where.  After experiments like this 
(using the new IDLE 'copy with prompts' option ;-):

>>> _ = 'a'
>>> match [_, 'b']:
... case [capture, _] if _ == 'a':
... print(capture, _)
... 
a a

I added (in PR to come, with markup that might be improved)
"within any pattern, but only within patterns.  It is an identifier, as usual, 
even within ``match`` headers, ``guards``, and ``case blocks``.

Please consider also adding an example like the above.

--
assignee: docs@python
components: Documentation
messages: 392848
nosy: brandtbucher, docs@python, gvanrossum, terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: Match doc: Clarify '_' as a soft keyword
type: behavior
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue44018] random.seed mutates input bytearray

2021-05-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24551
pull_request: https://github.com/python/cpython/pull/25872

___
Python tracker 

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



[issue43822] Improve syntax errors for missing commas

2021-05-03 Thread miss-islington


miss-islington  added the comment:


New changeset d1ff838d1091853ed6f56bc1573606dc0d74a691 by Miss Islington (bot) 
in branch '3.10':
bpo-43822: Prioritize tokenizer errors over custom syntax errors when raising 
parser exceptions (GH-25866)
https://github.com/python/cpython/commit/d1ff838d1091853ed6f56bc1573606dc0d74a691


--

___
Python tracker 

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



[issue43822] Improve syntax errors for missing commas

2021-05-03 Thread miss-islington


miss-islington  added the comment:


New changeset 756b7b9248885d65c2b3b9f1c5a8f66aa2e8de7a by Miss Islington (bot) 
in branch '3.10':
bpo-43822: Prioritize tokenizer errors over custom syntax errors when raising 
parser exceptions (GH-25866)
https://github.com/python/cpython/commit/756b7b9248885d65c2b3b9f1c5a8f66aa2e8de7a


--

___
Python tracker 

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



[issue43822] Improve syntax errors for missing commas

2021-05-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24550
pull_request: https://github.com/python/cpython/pull/25870

___
Python tracker 

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



[issue43822] Improve syntax errors for missing commas

2021-05-03 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue31526] Allow setting timestamp in gzip-compressed tarfiles

2021-05-03 Thread Filipe Laíns

Change by Filipe Laíns :


--
nosy: +FFY00

___
Python tracker 

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



[issue44018] random.seed mutates input bytearray

2021-05-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24548
pull_request: https://github.com/python/cpython/pull/25867

___
Python tracker 

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



[issue42095] plistlib: Add tests that compare with plutil(1)

2021-05-03 Thread Hasan


Hasan  added the comment:

Does this issue still open? I would like to write this tests.

--
nosy: +AliyevH

___
Python tracker 

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



[issue43822] Improve syntax errors for missing commas

2021-05-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +24547
pull_request: https://github.com/python/cpython/pull/25866

___
Python tracker 

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



[issue44018] random.seed mutates input bytearray

2021-05-03 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset e733e9951d0116e9af66b66772e708412d7f5280 by Miss Islington (bot) 
in branch '3.9':
bpo-44018: random.seed() no longer mutates its inputs (GH-25856) (GH-25864)
https://github.com/python/cpython/commit/e733e9951d0116e9af66b66772e708412d7f5280


--

___
Python tracker 

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



[issue44018] random.seed mutates input bytearray

2021-05-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24546
pull_request: https://github.com/python/cpython/pull/25865

___
Python tracker 

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



[issue44018] random.seed mutates input bytearray

2021-05-03 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44024] Use common TypeError message for built-in functions getattr and hasattr

2021-05-03 Thread Géry

Change by Géry :


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

___
Python tracker 

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



[issue44024] Use common TypeError message for built-in functions getattr and hasattr

2021-05-03 Thread Géry

New submission from Géry :

Problem
---

Actual behaviour:

```python
>>> getattr('foobar', 123)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: getattr(): attribute name must be string
>>> hasattr('foobar', 123)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: hasattr(): attribute name must be string
```

Expected behaviour:

```python
>>> getattr('foobar', 123)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: attribute name must be string, not 'int'
>>> hasattr('foobar', 123)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: attribute name must be string, not 'int'
```

Motivation:

```python
>>> setattr('foobar', 123, 'baz')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: attribute name must be string, not 'int'
>>> delattr('foobar', 123)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: attribute name must be string, not 'int'
```

Solution


In the function `builtin_getattr` defined in Python/bltinmodule.c, we remove 
the following lines:

```c
if (!PyUnicode_Check(name)) {
PyErr_SetString(PyExc_TypeError,
"getattr(): attribute name must be string");
return NULL;
}
```

because the expected `TypeError` message is already implemented in the 
subsequent call to the functions `_PyObject_LookupAttr` and `PyObject_GetAttr` 
defined in Objects/object.c:

```c
PyObject *
PyObject_GetAttr(PyObject *v, PyObject *name)
{
PyTypeObject *tp = Py_TYPE(v);
if (!PyUnicode_Check(name)) {
PyErr_Format(PyExc_TypeError,
 "attribute name must be string, not '%.200s'",
 Py_TYPE(name)->tp_name);
return NULL;
}

[…]

int
_PyObject_LookupAttr(PyObject *v, PyObject *name, PyObject **result)
{
PyTypeObject *tp = Py_TYPE(v);

if (!PyUnicode_Check(name)) {
PyErr_Format(PyExc_TypeError,
 "attribute name must be string, not '%.200s'",
 Py_TYPE(name)->tp_name);
*result = NULL;
return -1;
}

[…]
```

Likewise, in the function `builtin_hasattr_impl` defined in 
Python/bltinmodule.c, we remove the following lines:

```c
if (!PyUnicode_Check(name)) {
PyErr_SetString(PyExc_TypeError,
"hasattr(): attribute name must be string");
return NULL;
}
```

because the expected `TypeError` message is already implemented in the 
subsequent call to the function `_PyObject_LookupAttr` defined in 
Objects/object.c.

--
components: Interpreter Core
messages: 392843
nosy: maggyero
priority: normal
severity: normal
status: open
title: Use common TypeError message for built-in functions getattr and hasattr
type: behavior
versions: Python 3.10, Python 3.11, 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



[issue43710] Access violations in C extension modules on Python 3.9.3

2021-05-03 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
assignee: terry.reedy -> 

___
Python tracker 

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



[issue43710] Access violations in C extension modules on Python 3.9.3

2021-05-03 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
components: +Extension Modules, Windows -IDLE

___
Python tracker 

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



[issue39468] Improved the site module's permission handling while writing .python_history

2021-05-03 Thread Aurora


Change by Aurora :


--
pull_requests: +24543
status: pending -> open
pull_request: https://github.com/python/cpython/pull/18210

___
Python tracker 

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



[issue43991] asyncio lock does not get released after task is canceled

2021-05-03 Thread Alexander Niederbühl

Alexander Niederbühl  added the comment:

That makes sense, thanks!

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



[issue43742] tcp_echo_client in asyncio streams example does not work. Hangs for ever at reaser.read()

2021-05-03 Thread julian colomina


julian colomina  added the comment:

@jaswdr

Thanks for your response.

No I did not run the server that you mention. 

The language made me imply that the same process, in two separate coroutines, 
would be writing/reading from each end of the tcp connection. One writing to 
the tcp buffer, the second one draining it.

If  the intended usage is as you explain, please close the issue.

My bad, sorry.

JC

--

___
Python tracker 

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



[issue41222] POpen bufsize=0 ignored with universal_newlines=True

2021-05-03 Thread Yann Dirson


Yann Dirson  added the comment:

> The fact that my stdout object has no read1() and needs the above patch looks 
> like a good lead for further investigation?

That's linked to universal_newlines, the bug only shows when that flag is set.

Testcases provided in https://github.com/python/cpython/pull/25859

--
title: Undocumented behaviour change of POpen.stdout.readine with bufsize=0 or 
=1 -> POpen bufsize=0 ignored with universal_newlines=True

___
Python tracker 

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



[issue41222] Undocumented behaviour change of POpen.stdout.readine with bufsize=0 or =1

2021-05-03 Thread Yann Dirson


Change by Yann Dirson :


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

___
Python tracker 

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



[issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch

2021-05-03 Thread Ned Deily


Ned Deily  added the comment:


New changeset 512742d554f2c10e9a273855d87a68f5ee93ed29 by Miss Islington (bot) 
in branch '3.7':
bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355) (GH-25858)
https://github.com/python/cpython/commit/512742d554f2c10e9a273855d87a68f5ee93ed29


--

___
Python tracker 

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



[issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch

2021-05-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24541
pull_request: https://github.com/python/cpython/pull/25858

___
Python tracker 

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



[issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch

2021-05-03 Thread Ned Deily


Ned Deily  added the comment:


New changeset 64be96ae1f85ce6b3bca4328576cf62d73f77b2a by Christian Heimes in 
branch '3.7':
[3.7] bpo-41561: Add workaround for Ubuntu's custom security level (GH-24915) 
(GH-24928)
https://github.com/python/cpython/commit/64be96ae1f85ce6b3bca4328576cf62d73f77b2a


--
nosy: +ned.deily

___
Python tracker 

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



[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-05-03 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue41232] Python `functools.wraps` doesn't deal with defaults correctly

2021-05-03 Thread Thor Whalen


Thor Whalen  added the comment:

On the surface, seems like a fair design to me: Back-compatible yet solves
this misalignment that bugged me (literally).
It would also force the documentation of `functools.wraps` to mention this
"trap", through describing the `signature_changed` flag.
As for the `__wrapped_with_changed_signature__`; yes, it's terrible. But I
have no better. At least, it's very descriptive!

On Sat, May 1, 2021 at 9:52 PM Jelle Zijlstra 
wrote:

>
> Jelle Zijlstra  added the comment:
>
> We could add a new argument to `@functools.wraps()` to differentiate
> between a wrapper with the same signature and one with a different
> signature.
>
> Here's a possible design:
> * functools.wraps adds a new keyword-only argument signature_changed. It
> defaults to False for backward compatibility.
> * If signature_changed is True:
>   * __annotations__ are not copied
>   * __wrapped__ is not set on the wrapping function. Instead, we set a new
> attribute __wrapped_with_changed_signature__ (that's a pretty terrible
> name, open to suggestions). This will make inspect.signature not look at
> the wrapped function.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue44021] enum docs in 3.10: missing "New in version 3.10"

2021-05-03 Thread Ethan Furman


Ethan Furman  added the comment:

EnumMeta has been renamed to EnumType, but has been kept as an alias.

--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-03 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset 8a595744e696a0fb92dccc5d4e45da41571270a1 by Senthil Kumaran in 
branch '3.9':
[3.9] bpo-43882 Remove the newline, and tab early. From query and fragments. 
(#25853)
https://github.com/python/cpython/commit/8a595744e696a0fb92dccc5d4e45da41571270a1


--

___
Python tracker 

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



[issue43963] test_interpreters has side effects on test_signal

2021-05-03 Thread Theelgirl


Theelgirl  added the comment:

Sorry if I'm not supposed to open closed issues, however I believe there's a 
typo in the whatsnew page for this. In 
https://docs.python.org/3.10/whatsnew/changelog.html#changelog, the entry for 
bpo-43963 says "Importing the signal module in a subinterpreter has no longer 
side effects.", however I believe it should be "Importing the signal module in 
a subinterpreter no longer has side effects". The only difference is that "has" 
is moved after "no longer" instead of before.

--
nosy: +Theelgirl

___
Python tracker 

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



[issue43742] tcp_echo_client in asyncio streams example does not work. Hangs for ever at reaser.read()

2021-05-03 Thread Jonathan Schweder


Jonathan Schweder  added the comment:

I was able to execute the example in Debian 10 + Python 3.10+

Did you execute the server too? You need to create two files, one for the 
client code and one for the server code, the server as specified by the example 
should be something like the code below, try to save it to a file, then execute 
it, after that execute the client example that you have cited.

import asyncio

async def handle_echo(reader, writer):
data = await reader.read(100)
message = data.decode()
addr = writer.get_extra_info('peername')

print(f"Received {message!r} from {addr!r}")

print(f"Send: {message!r}")
writer.write(data)
await writer.drain()

print("Close the connection")
writer.close()

async def main():
server = await asyncio.start_server(
handle_echo, '127.0.0.1', )

addr = server.sockets[0].getsockname()
print(f'Serving on {addr}')

async with server:
await server.serve_forever()

asyncio.run(main())

--
nosy: +jaswdr

___
Python tracker 

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



[issue43976] Allow Python distributors to add custom site install schemes

2021-05-03 Thread Steve Dower


Steve Dower  added the comment:

Yes, I saw some of the latest changes in the PR.

My biggest concern is with the bare "import _vendor_config", which I'd prefer 
to have restricted to a fixed location, rather than being influenced by 
environment variables and other options. We already have an issue with readline 
being imported from anywhere it can be found.

A native flag to suppress it (i.e. something in sys.flags) could also become 
important for embedders, though it may matter more at a higher level (i.e. 
should an embedded CPython *ever* be using sysconfig? Probably not...). I 
wouldn't add a new flag for it right now, but I feel like sys.flags.isolated 
should probably imply that this should be ignored.

Though then we hit the issue again that these patches are about changing the 
"safe default" behaviour, which is what you want to get back when you run with 
-S or -I. And I'm not totally sure how to resolve this.

So basically, my concerns are:
* don't import arbitrary files
* ensure -S/-I options remain useful (or become even more useful)

--

___
Python tracker 

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



[issue42725] PEP 563: Should the behavior change for yield/yield from's

2021-05-03 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> Batuhan, can this issue be closed?

No, I still need to take care of what's new entry.

--

___
Python tracker 

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



[issue43806] asyncio.StreamReader hangs when reading from pipe and other process exits unexpectedly

2021-05-03 Thread Jonathan Schweder


Jonathan Schweder  added the comment:

@kormang this is an expected behaviour, this is a problem even for the OS 
level, just because it is impossible to know when the reader needs to stop 
waiting, the best option here is to implement some timeout mechanism.

--
nosy: +jaswdr

___
Python tracker 

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



[issue44021] enum docs in 3.10: missing "New in version 3.10"

2021-05-03 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +barry, eli.bendersky, ethan.furman

___
Python tracker 

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



[issue44020] test_ssl fails in the macos CI

2021-05-03 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This person, mohansai, seems to be misbehaving on the tracker and should be 
stopped or at least educated.  mohansai just reassigned a closed issue about 
Windows extensions to IDLE, #43710, thus assigning it to me and wasting my 
time.  (I reverted the changes.)  Does mohansai have triage privileges, or can 
anyone do this?

--
nosy: +terry.reedy
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue43976] Allow Python distributors to add custom site install schemes

2021-05-03 Thread Filipe Laíns

Filipe Laíns  added the comment:

FYI, I have change the implementation to split the extra install schemes and 
extra schemes activated on site. This still makes sense over sitecustomize 
because we want the packages to be included in site.getsitepackages -- we want 
the vendor packages to essentially be the same as site-packages.

I have also moved sysconfig._get_preferred_schemes to the vendor config, 
instead of asking distributors to patch sysconfig -- this is why I prefer 
having it as executable code, we customize using functions, etc.
https://docs.python.org/3.10/library/sysconfig.html#sysconfig._get_preferred_schemes

A config taking advantage of all these mechanisms should look like this:

```
EXTRA_INSTALL_SCHEMES = {
'vendor': {
'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}',
'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}',
'purelib': '{base}/lib/python{py_version_short}/vendor-packages',
'platlib': 
'{platbase}/{platlibdir}/python{py_version_short}/vendor-packages',
'include':
'{installed_base}/include/python{py_version_short}{abiflags}',
'platinclude':
'{installed_platbase}/include/python{py_version_short}{abiflags}',
'scripts': '{base}/bin',
'data': '{base}',
},
}

EXTRA_SITE_INSTALL_SCHEMES = [
'vendor',
]

def get_preferred_schemes(...):
...
```

Do you have any thoughts on this?

--

___
Python tracker 

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



[issue44023] "tarfile" library will lead to "write any content to any file on the host".

2021-05-03 Thread guangli dong


New submission from guangli dong :

if uncompress file twice to the same dir, attacker can "write any content to 
any file on the host"".

poc code like below:
```
import tarfile


dir_name = "/tmp/anything"
file1_name = "/tmp/a.tar.gz"  # ln -sv /tmp/a test_tar/a;tar -cvf a.tar.gz 
test_tar/a
file2_name = "/tmp/b.tar.gz"  # echo "it is just poc" > /tmp/payload; rm -rf 
test_tar; cp /tmp/payload test_tar/a;tar -cvf b.tar.gz test_tar/a


def vuln_tar(tar_path):
"""
:param tar_path:
:return:
"""
import tarfile
tar = tarfile.open(tar_path, "r:tar")
file_names = tar.getnames()
for file_name in file_names:
tar.extract(file_name, dir_name)
tar.close()


vuln_tar(file1_name)
vuln_tar(file2_name)
```

in this poc code, if one service uncompress tar file which is uploaded by 
attacker to "dir_name" twice, attacker can create "/tmp/a" and write "it is 
just poc" string into "/tmp/a" file.

--
components: Library (Lib)
files: poc.tar.gz
messages: 392827
nosy: leveryd
priority: normal
severity: normal
status: open
title: "tarfile" library will lead to "write any content to any file on the 
host".
type: security
versions: Python 3.7
Added file: https://bugs.python.org/file50005/poc.tar.gz

___
Python tracker 

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



[issue44020] test_ssl fails in the macos CI

2021-05-03 Thread Christian Heimes


New submission from Christian Heimes :

Why did you create a new ticket and why did you modify bpo-43943? The situatuon 
is under control and tests are passing again. I left the other ticket in 
pending state because I like to monitor the situation for a couple of days.

--

___
Python tracker 

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



[issue44022] "urllib" will result to deny of service

2021-05-03 Thread guangli dong


New submission from guangli dong :

if a client request a http/https/ftp service which is controlled by attacker, 
attacker can make this client hang forever, event client has set "timeout" 
argument.

maybe this client also will consume more and more memory. i does not test on 
this conclusion.

client.py
```
import urllib.request

req = urllib.request.Request('http://127.0.0.1:8085')
response = urllib.request.urlopen(req, timeout=1)
```

evil_server.py
```
# coding:utf-8
from socket import *
from multiprocessing import *
from time import sleep

def dealWithClient(newSocket,destAddr):
recvData = newSocket.recv(1024)
newSocket.send(b"""HTTP/1.1 100 OK\n""")

while True:
# recvData = newSocket.recv(1024)
newSocket.send(b"""x:a\n""")

if len(recvData)>0:
# print('recv[%s]:%s'%(str(destAddr), recvData))
pass
else:
print('[%s]close'%str(destAddr))
sleep(10)
print('over')
break

# newSocket.close()


def main():

serSocket = socket(AF_INET, SOCK_STREAM)
serSocket.setsockopt(SOL_SOCKET, SO_REUSEADDR  , 1)
localAddr = ('', 8085)
serSocket.bind(localAddr)
serSocket.listen(5)

try:
while True:
newSocket,destAddr = serSocket.accept()

client = Process(target=dealWithClient, args=(newSocket,destAddr))
client.start()

newSocket.close()
finally:
serSocket.close()

if __name__ == '__main__':
main()
```

--
components: Library (Lib)
messages: 392825
nosy: leveryd
priority: normal
severity: normal
status: open
title: "urllib" will result to deny of service
type: security
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



[issue44018] random.seed mutates input bytearray

2021-05-03 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue44021] enum docs in 3.10: missing "New in version 3.10"

2021-05-03 Thread Akuli


New submission from Akuli :

https://docs.python.org/3.10/library/enum.html says "New in version 3.10: 
StrEnum". That's true, but these are also new in 3.10:
- property (I mean enum.property, not the built-in property)
- global_enum
- FlagBoundary
- StrEnum
- EnumType  (does this even exist? I compiled the latest python today and I 
don't have this)

--
assignee: docs@python
components: Documentation
messages: 392824
nosy: Akuli, docs@python
priority: normal
severity: normal
status: open
title: enum docs in 3.10:  missing "New in version 3.10"
versions: Python 3.10

___
Python tracker 

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



[issue44020] test_ssl fails in the macos CI

2021-05-03 Thread PAKKURTHI MOHAN SAI KRISHNA


Change by PAKKURTHI MOHAN SAI KRISHNA :


--
components: macOS
nosy: christian.heimes, mohansai, ned.deily, pablogsal, ronaldoussoren
priority: normal
severity: normal
status: open
title: test_ssl fails in the macos CI
type: behavior
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



[issue43976] Allow Python distributors to add custom site install schemes

2021-05-03 Thread Steve Dower


Steve Dower  added the comment:

> Making sysconfig look at sitecustomize seems like the wrong approach.

I mean, you're literally customizing the site, so having it be done from 
sitecustomize doesn't seem terribly wrong. But I agree, I'd rather see the code 
in sitecustomize poke paths into sysconfig, rather than the other way around.

The problem then would be that -S bypasses the path configuration entirely, 
which is likely going to point at non-existent paths. So yeah, for this case 
you need an override that isn't tied to the site module. Having a 
similar-but-different mechanism in sysconfig seems fine. I have a *slight* 
preference for non-executable code, mostly to avoid the risk of import 
hijacking, but it's only slight.

--

___
Python tracker 

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



[issue43943] test_ssl fails in the macos CI

2021-05-03 Thread Christian Heimes


Change by Christian Heimes :


--
assignee:  -> christian.heimes
components: +SSL, Tests -Installation
status: open -> pending

___
Python tracker 

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



[issue43943] test_ssl fails in the macos CI

2021-05-03 Thread PAKKURTHI MOHAN SAI KRISHNA


Change by PAKKURTHI MOHAN SAI KRISHNA :


--
components: +Installation -macOS
nosy:  -ned.deily, ronaldoussoren

___
Python tracker 

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



[issue43991] asyncio lock does not get released after task is canceled

2021-05-03 Thread Jonathan Schweder


Jonathan Schweder  added the comment:

a.niederbuehl tasks are free of context, meaning that the task does not know 
what was done inside it, and by consequence is impossible to know when or not 
release a lock. This is by design and normally in these cases you need to be 
aware of the lock, by for example checking if the lock was released before 
cancelling the task.

--
nosy: +jaswdr

___
Python tracker 

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



[issue43943] test_ssl fails in the macos CI

2021-05-03 Thread PAKKURTHI MOHAN SAI KRISHNA


Change by PAKKURTHI MOHAN SAI KRISHNA :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren
status: pending -> open

___
Python tracker 

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



[issue44018] random.seed mutates input bytearray

2021-05-03 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Okay, I now understand your report and will prepare a fix.

--
title: Bug in random.seed -> random.seed mutates input bytearray

___
Python tracker 

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



[issue43710] Access violations in C extension modules on Python 3.9.3

2021-05-03 Thread PAKKURTHI MOHAN SAI KRISHNA


Change by PAKKURTHI MOHAN SAI KRISHNA :


--
assignee:  -> terry.reedy
components: +IDLE -Extension Modules, Windows
nosy: +terry.reedy

___
Python tracker 

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



[issue44006] symbol documentation still exists

2021-05-03 Thread Ammar Askar


Ammar Askar  added the comment:

Also, would it make sense to do a clean build (with the html output folder 
wiped) in the build-cron to avoid this happening in the future?

--

___
Python tracker 

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



[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-05-03 Thread Eric V. Smith


Change by Eric V. Smith :


--
keywords: +newcomer friendly

___
Python tracker 

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



[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-05-03 Thread Eric V. Smith


Change by Eric V. Smith :


--
assignee: eric.smith -> 

___
Python tracker 

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



[issue44006] symbol documentation still exists

2021-05-03 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Thanks Julien! I noticed two other libraries in the same situation: 
https://docs.python.org/3.10/library/formatter.html and 
https://docs.python.org/3.10/library/parser.html. The RST files for both are 
also gone from master. Could you purge the cache for them too, or would you 
prefer I open a new issue?

--

___
Python tracker 

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



[issue43943] test_ssl fails in the macos CI

2021-05-03 Thread Christian Heimes


Christian Heimes  added the comment:

fingers crossed!

--
resolution:  -> fixed
status: open -> pending
type:  -> behavior

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError and NameError

2021-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 80a2a4ed7d090fff2584302f07315d567109bca9 by Dennis Sweeney in 
branch 'master':
bpo-38530: Refactor and improve AttributeError suggestions (GH-25776)
https://github.com/python/cpython/commit/80a2a4ed7d090fff2584302f07315d567109bca9


--

___
Python tracker 

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



[issue43943] test_ssl fails in the macos CI

2021-05-03 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset c715b524210050bdd2a2e233817246d443bbb236 by Christian Heimes in 
branch 'master':
bpo-43943: ssl tests: Increase server socket timeout, backlog, debugging 
(GH-25850)
https://github.com/python/cpython/commit/c715b524210050bdd2a2e233817246d443bbb236


--

___
Python tracker 

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



[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Unfortunately I have reverted 5fb06edbbb769561e245d0fe13002bab50e2ae60 commit 
to unblock the beta release :(

I know that nobody wants this but my responsibilities as a release manager is 
to safeguard the stability of the release and we are too close to the beta 
release to do all the testing we need, giving that many buildbots have been 
broken in a short timespan.

Andrew, we can try to get your PR merge between beta 1 and beta 2 but once we 
have done extensive testing and we know that there will be no impact on the 
buildbots and the CI.

Thank you all for your understanding

--

___
Python tracker 

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



[issue44006] symbol documentation still exists

2021-05-03 Thread Julien Palard


Julien Palard  added the comment:

After the cron passed, and after purging the HTTP cache, it now 404:

$ curl https://docs.python.org/3.10/library/symbol.html

404 Not Found

Thanks for noticing!

--
resolution:  -> fixed
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



[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7719953b30430b351ba0f153c2b51b16cc68ee36 by Pablo Galindo in 
branch 'master':
bpo-44011: Revert "New asyncio ssl implementation (GH-17975)" (GH-25848)
https://github.com/python/cpython/commit/7719953b30430b351ba0f153c2b51b16cc68ee36


--

___
Python tracker 

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



[issue43754] Eliminate bindings for partial pattern matches

2021-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 39494285e15dc2d291ec13de5045b930eaf0a3db by Pablo Galindo in 
branch 'master':
bpo-43754: Fix compiler warning in Python/compile.c (GH-25855)
https://github.com/python/cpython/commit/39494285e15dc2d291ec13de5045b930eaf0a3db


--

___
Python tracker 

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



[issue43754] Eliminate bindings for partial pattern matches

2021-05-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +24539
pull_request: https://github.com/python/cpython/pull/25855

___
Python tracker 

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



[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset c2931d31f8ba7cf10044de276018c713ffc73592 by Pablo Galindo in 
branch 'master':
bpo-43916: Move the _PyStructSequence_InitType function to the internal API 
(GH-25854)
https://github.com/python/cpython/commit/c2931d31f8ba7cf10044de276018c713ffc73592


--

___
Python tracker 

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



[issue43990] In documentation Section 6.17, Operator precedence, footnotes 5 & 6 are reversed

2021-05-03 Thread Webb Scales


Webb Scales  added the comment:

Thanks Raymond and Zackery -- that response was nothing short of amazing!

--

___
Python tracker 

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



[issue43667] Solaris: Fix broken Unicode encoding in non-UTF locales

2021-05-03 Thread Jakub Kulik


Change by Jakub Kulik :


--
components: +Unicode -Tests
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.11

___
Python tracker 

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



[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2021-05-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +24538
pull_request: https://github.com/python/cpython/pull/25854

___
Python tracker 

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



[issue44019] operator.call/operator.__call__

2021-05-03 Thread Antony Lee


New submission from Antony Lee :

Adding a call/__call__ function to the operator module (where 
`operator.call(*args, **kwargs)(func) == func(*args, **kwargs)`, similarly to 
operator.methodcaller) seems consistent with the design with the rest of the 
operator module.

An actual use case I had for such an operator was collecting a bunch of 
callables in a list and wanting to dispatch them to 
concurrent.futures.Executor.map, i.e. something like 
`executor.map(operator.call, funcs)` (to get the parallelized version of 
`[func() for func in funcs]`).

--
components: Library (Lib)
messages: 392809
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: operator.call/operator.__call__
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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-03 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

Based on Greg's review comment, I have pushed the fix for 3.9, and 3.8

- [3.9] https://github.com/python/cpython/pull/25853
- [3.8] https://github.com/python/cpython/pull/25726

There is no need to hold off releases for these alone. If we get it merged 
before the release cut today, fine, otherwise, they will be in the next 
security fix.

--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-03 Thread Senthil Kumaran


Change by Senthil Kumaran :


--
pull_requests: +24537
pull_request: https://github.com/python/cpython/pull/25853

___
Python tracker 

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



[issue41832] PyType_FromSpec() should accept tp_doc=NULL

2021-05-03 Thread Ken Jin


Change by Ken Jin :


--
nosy: +kj
nosy_count: 4.0 -> 5.0
pull_requests: +24535
pull_request: https://github.com/python/cpython/pull/25852

___
Python tracker 

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



[issue42083] PyStructSequence_NewType broken in 3.8

2021-05-03 Thread Ken Jin


Change by Ken Jin :


--
keywords: +patch
nosy: +kj
nosy_count: 3.0 -> 4.0
pull_requests: +24536
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25852

___
Python tracker 

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



[issue44010] IDLE: highlight soft keywords

2021-05-03 Thread Tal Einat


Tal Einat  added the comment:

I've created a PR (GH-25851) with a rather quick, working implementation.

This includes some tests but I haven't thoroughly tested it yet.

If anyone can take a look and give feedback on the approach, that would be 
great.

--

___
Python tracker 

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



[issue44010] IDLE: highlight soft keywords

2021-05-03 Thread Tal Einat


Change by Tal Einat :


--
keywords: +patch
pull_requests: +24534
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/25851

___
Python tracker 

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



[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-05-03 Thread miss-islington


miss-islington  added the comment:


New changeset 8ab272f0f3dd7da44f8e21d2a5a39c2ab39490d6 by Miss Islington (bot) 
in branch '3.8':
bpo-42800: Add audit events for f_code and tb_frame (GH-24182)
https://github.com/python/cpython/commit/8ab272f0f3dd7da44f8e21d2a5a39c2ab39490d6


--

___
Python tracker 

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



[issue43943] test_ssl fails in the macos CI

2021-05-03 Thread Christian Heimes


Christian Heimes  added the comment:

I'm still unsure why tests are sometimes failing. Test fail rarely on macOS and 
Windows. When tests are failing it's usually a bunch of tests that fail with 
"connection reset by peer". I suspect that the listener backlog and timeout of 
the server socket is too aggressive.

--

___
Python tracker 

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



[issue43943] test_ssl fails in the macos CI

2021-05-03 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-05-03 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +24532
pull_request: https://github.com/python/cpython/pull/25849

___
Python tracker 

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



[issue42800] Traceback objects allow accessing frame objects without triggering audit hooks

2021-05-03 Thread Steve Dower


Steve Dower  added the comment:


New changeset bb2f3ff7a8f0c3565ccc1946dba7e09a3f7dc209 by Steve Dower in branch 
'3.9':
bpo-42800: Add audit events for f_code and tb_frame (GH-24182)
https://github.com/python/cpython/commit/bb2f3ff7a8f0c3565ccc1946dba7e09a3f7dc209


--

___
Python tracker 

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



[issue42725] PEP 563: Should the behavior change for yield/yield from's

2021-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Batuhan, can this issue be closed?

--

___
Python tracker 

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



[issue44018] Bug in random.seed

2021-05-03 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

One solution to these would be making a copy of the parameter using 
copy.deepcopy and then performing operations on that copy. (The downside of 
this solution is that it will change the behavior.)

--
nosy: +shreyanavigyan

___
Python tracker 

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



[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Specifically this part of both messages:

>> If your change involves some platform-specific behaviour or has a
>> non-trivial amount of C code, make sure you run the buildbots
>> in your Pull Request by using the "test-with-buildbots" label (
>> https://discuss.python.org/t/now-you-can-test-a-pr-with-the-buildbots-before...).
>> Alternatively you could check the buildbots post-merge in the buildbot 
>> server:
>> https://buildbot.python.org/all/#/builders?tags=%2B3.x=%2Bstable
>> This is very important because if problems are detected at the time >> of the
>> release, the release management team may have to revert
>> the changes and therefore those will not be included in Python 3.10.

--

___
Python tracker 

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



[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I have created https://github.com/python/cpython/pull/25848 for the revert, in 
case this is not fixed in the next hours or so.

Given the nature of PR 17975, this should have tested with the buildbots as the 
release team asked in:

https://mail.python.org/archives/list/python-committ...@python.org/thread/SIJQE3BZ6ICCGNJWFR4YR65BQBJJZZAZ/

and

https://mail.python.org/archives/list/python-committ...@python.org/thread/V7V5JHKZCJVE2GTI5NFEP3PNKOLH35VL/

--

___
Python tracker 

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



[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +24531
pull_request: https://github.com/python/cpython/pull/25848

___
Python tracker 

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



[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-03 Thread Christian Heimes


Christian Heimes  added the comment:

When was https://buildbot.python.org/all/#/builders/464/builds/138 start? The 
build properties tab doesn't have a start timestamp.

Andrew, increase timeout doesn't seem to help. It's looks like the test suite 
is leaking threads on error.

--

___
Python tracker 

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



[issue44011] Borrow asyncio ssl implementation from uvloop

2021-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Since commit 
https://github.com/python/cpython/commit/5fb06edbbb769561e245d0fe13002bab50e2ae60
 was merged there are multiple timeouts in several buildbots. Unfortunately if 
this is not fixed by the time I need to do the beta release I may need to 
revert all these commits until all buildbots are stable again.

Could someone investigate those timeouts?

For instance, check:

https://buildbot.python.org/all/#/builders/464/builds/138

--

___
Python tracker 

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



[issue43006] Changed behaviour of inspect.signature() in Python 3.10

2021-05-03 Thread Zac Hatfield-Dodds


Zac Hatfield-Dodds  added the comment:

I think that with PEP-563 reverted, this issue has been fixed.

If we have a similar problem from e.g. PEP-649, I'll open another ticket then!

--
resolution:  -> fixed
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



[issue43667] Solaris: Fix broken Unicode encoding in non-UTF locales

2021-05-03 Thread Sujal Patel


Change by Sujal Patel :


--
components: +Tests -Unicode
versions: +Python 3.11 -Python 3.10, 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



  1   2   >