[issue43637] winreg: SetValueEx leaks memory if PySys_Audit fails

2021-03-27 Thread Ondrej Baranovič

New submission from Ondrej Baranovič :

The function `winreg_SetValueEx_impl` in `winreg.c`:

1) Allocates memory by calling `Py2Reg`,
2) calls `PySys_Audit` and immediately returns if it indicates an error,
3) calls `RegSetValueExW`,
4) frees memory allocated in (1) and returns.

The if-block in (2) should free the memory allocated in (1) if an audit hook 
raises.

Introduced in PR17541.

--
components: Windows
messages: 389591
nosy: nulano, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: winreg: SetValueEx leaks memory if PySys_Audit fails
type: resource usage
versions: Python 3.10, 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



[issue43605] Eval/exec and comprehension scopes unclear in documentation

2021-03-27 Thread Cong Ma


Cong Ma  added the comment:

> I think it is *very* reasonable to expect that calling eval() on a string 
> should have the exact same effect as if the code that is inside the eval had 
> been written as part of the source code.

I don't think Python's execution model is defined this way. The documentation 
on execution model says:

> The eval() and exec() functions do not have access to the full environment 
> for resolving names. Names may be resolved in the local and global namespaces 
> of the caller. Free variables are not resolved in the nearest enclosing 
> namespace, but in the global namespace.
> footnote: This limitation occurs because the code that is executed by these 
> operations is not available at the time the module is compiled.

https://docs.python.org/3/reference/executionmodel.html#interaction-with-dynamic-features

--

___
Python tracker 

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



[issue43605] Eval/exec and comprehension scopes unclear in documentation

2021-03-27 Thread Cong Ma


Cong Ma  added the comment:

I'm preparing an update to the documentation of eval/exec. There are several 
issues, but chiefly I'll link to the appropriate sections in the Language 
Reference, and clean up some other inaccuracies. When it's ready I'll submit a 
PR for core devs to review.

--

___
Python tracker 

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



[issue37773] ValueError: I/O operation on closed file. in ZipFile destructor

2021-03-27 Thread Jörn Heissler

Jörn Heissler  added the comment:

Still reproducible in cpython 3.10.0a3 (debian unstable) and 3.10.0a6 (pyenv).

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



[issue43605] Eval/exec and comprehension scopes unclear in documentation

2021-03-27 Thread Bruno Loff


Bruno Loff  added the comment:

Hmm yes, some more words in the documentation might help.

Does anyone understand why it happens, though?

Specifically, note that

sum(get(i) for i in range(len(l)))

or

eval("get(0) + get(1) + get(2) + get(3)")

or

eval("sum(get(i) for i in range(len(l)))", locals())

work just fine, but

eval("sum(get(i) for i in range(len(l)))")

fails, which is really confusing. I have no mental model of what is happening 
that allows for the first thing to work, but disallows for the second thing. I 
understand it has something to do with the creation of a new subscope when the 
comprehension is run, but other than that, I don't really understand.

Also, ideally, the last thing should work, too.

I am teaching programming to college students and I could not explain to them 
why the first three worked but the last one failed. There was simply nothing I 
could say that would give them a good mental model for the execution.

--

___
Python tracker 

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



[issue43638] MacOS os.statvfs() has rollover for >4TB disks at each 4TB (32bit counter overflow?)

2021-03-27 Thread Sander


New submission from Sander :

MacOS BigSur (and older), python 3.9.2 (and older)

For disks >4TB, os.statvfs() shows a wrong value for available space: too low, 
and always rollover at each 4TB. 
As 4TB = 2^42, hypothesis: rollover in 32bit counter (with 10bit blocksize)

Example:

"df -m" does show the correct available space

df -m /Volumes/Frank/
Filesystem1M-blocksUsed Available 
Capacityiused   ifree %iused  Mounted on
//frank@SynologyBlabla._smb._tcp.local/Frank  21963360 2527744  1943561512% 
2588410474 19902070164   12%   /Volumes/Frank

So available space 19902070164 MB, so about 18.5 TB. Good.

Now python's os.statvfs():

>>> s = os.statvfs("/Volumes/Frank")
>>> s.f_bavail * s.f_frsize / 1024**2
2658399.39453125

So 2.5TB, and thus wrong

The difference is 16777216 MB which is exactly 4 times 4TB.

Problem seems to be in MacOS statvfs() itself; reproducable with a few lines of 
C code.

We have implemented a workaround in our python program SABnzbd to directly use 
MacOS' libc statfs() call (not statvfs() ). A solution / workaround in python 
itself would be much nicer.


No problem with python on Linux with >4TB drives.

--
components: macOS
messages: 389596
nosy: ned.deily, ronaldoussoren, sanderjo
priority: normal
severity: normal
status: open
title: MacOS os.statvfs() has rollover for >4TB disks at each 4TB (32bit 
counter overflow?)
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



[issue43638] MacOS os.statvfs() has rollover for >4TB disks at each 4TB (32bit counter overflow?)

2021-03-27 Thread Safihre


Change by Safihre :


--
nosy: +Safihre

___
Python tracker 

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



[issue43605] Eval/exec and comprehension scopes unclear in documentation

2021-03-27 Thread Cong Ma


Cong Ma  added the comment:

> sum(get(i) for i in range(len(l)))

This expression inside the body of ``func()`` references the name "get" and "l" 
(ell), both are local to the scope introduced by ``func()``. More specifically, 
these two names are referenced in the unnamed inner scope introduced by the 
generator-expression ``(get(i) for i in range(len(l)))``. It's as if you've 
passed into that inner scope the locals already introduced in func() by 
argument passing, e.g.

```
def func(...):
get = ...
ell = ...
def genexpr(a, b):
return 
sum(genexpr(get, ell))
```

> eval("get(0) + get(1) + get(2) + get(3)")

The expression in the string doesn't introduce its own scope. The name "get" is 
resolved because without additional arguments, eval() gets the locals from the 
calling scope's locals, which is where the name "get" came.

> eval("sum(get(i) for i in range(len(l)))", locals())

This tells eval() to use the calling scope's locals (the value returned by the 
call ``locals()``) as the globals for the evaluation of the expression in the 
string. When eval() executes the compiled code, it's as if that piece of code 
lives in an environment where names like "gets" and "l" (ell) are top-level. 
Therefore these names are resolved.

> eval("sum(get(i) for i in range(len(l)))")

Without explicitly telling eval() which globals/locals namespaces to use, 
eval() uses the current calling scope's. This is as if it were called like

eval("sum(get(i) for i in range(len(l)))", globals(), locals())

A problem arises. The generator expression in the string introduces an 
anonymous inner scope (let's call that scope "the box"). Inside the box, the 
name "i" is a local, there's no problem. But for the name "get", it's not local 
to the box, and it's not a global. Unlike other kinds of enclosed scope (for 
example, one introduced by an inner ``def`` block), "the box" has no way to 
look up names in enclosing scopes. This is the limitation referred to by the 
Language Reference's section on dynamic execution.

These are my attempts to explain why something works while others don't, based 
on my own understanding. I hope this helps somewhat, and if I made a mistake 
anywhere please correct them.

--

___
Python tracker 

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



[issue43639] Do not raise AttributeError on instance attribute update/deletion if data descriptor with missing __set__/__delete__ method found on its type

2021-03-27 Thread Géry

New submission from Géry :

Currently, the `object.__setattr__` and `type.__setattr__` methods raise an 
`AttributeError` during attribute *update* on an instance if its type has an 
attribute which is a *data* descriptor without a `__set__` method. Likewise, 
the `object.__delattr__` and `type.__delattr__` methods raise an 
`AttributeError` during attribute *deletion* on an instance if its type has an 
attribute which is a *data* descriptor without a `__delete__` method.

This should not be the case. When update/deletion is impossible through a data 
descriptor found on the type, update/deletion should carry its process on the 
instance, like when there is no data descriptor found on the type. And this is 
what the `object.__getattribute__` and `type.__getattribute__` methods already 
do: they do *not* raise an `AttributeError` during attribute *lookup* on an 
instance if its type has an attribute which is a *data* descriptor without a 
`__get__` method. See [the discussion on Python 
Discuss](https://discuss.python.org/t/why-do-setattr-and-delattr-raise-an-attributeerror-in-this-case/7836?u=maggyero).

Here is a simple program illustrating the differences between attribute lookup 
by `object.__getattribute__` on the one hand (`AttributeError` is not raised), 
and attribute update by `object.__setattr__` and attribute deletion by 
`object.__delattr__` on the other hand (`AttributeError` is raised):

```python
class DataDescriptor1:  # missing __get__
def __set__(self, instance, value): pass
def __delete__(self, instance): pass

class DataDescriptor2:  # missing __set__
def __get__(self, instance, owner=None): pass
def __delete__(self, instance): pass

class DataDescriptor3:  # missing __delete__
def __get__(self, instance, owner=None): pass
def __set__(self, instance, value): pass

class A:
x = DataDescriptor1()
y = DataDescriptor2()
z = DataDescriptor3()

a = A()
vars(a).update({'x': 'foo', 'y': 'bar', 'z': 'baz'})

a.x
# actual: returns 'foo'
# expected: returns 'foo'

a.y = 'qux'
# actual: raises AttributeError: __set__
# expected: vars(a)['y'] == 'qux'

del a.z
# actual: raises AttributeError: __delete__
# expected: 'z' not in vars(a)
```

Here is another simple program illustrating the differences between attribute 
lookup by `type.__getattribute__` on the one hand (`AttributeError` is not 
raised), and attribute update by `type.__setattr__` and attribute deletion by 
`type.__delattr__` on the other hand (`AttributeError` is raised):

```python
class DataDescriptor1:  # missing __get__
def __set__(self, instance, value): pass
def __delete__(self, instance): pass

class DataDescriptor2:  # missing __set__
def __get__(self, instance, owner=None): pass
def __delete__(self, instance): pass

class DataDescriptor3:  # missing __delete__
def __get__(self, instance, owner=None): pass
def __set__(self, instance, value): pass

class M(type):
x = DataDescriptor1()
y = DataDescriptor2()
z = DataDescriptor3()

class A(metaclass=M):
x = 'foo'
y = 'bar'
z = 'baz'

A.x
# actual: returns 'foo'
# expected: returns 'foo'

A.y = 'qux'
# actual: raises AttributeError: __set__
# expected: vars(A)['y'] == 'qux'

del A.z
# actual: raises AttributeError: __delete__
# expected: 'z' not in vars(A)
```

--
components: Interpreter Core
messages: 389598
nosy: maggyero
priority: normal
severity: normal
status: open
title: Do not raise AttributeError on instance attribute update/deletion if 
data descriptor with missing __set__/__delete__ method found on its type
type: behavior
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



[issue43605] Eval/exec and comprehension scopes unclear in documentation

2021-03-27 Thread Cong Ma


Cong Ma  added the comment:

Some more context: Issue 37646. The demo in that one was "eval inside 
list-comprehension-scope", while this one is the other way around.

Perhaps another example may better illustrate the interplay between eval and 
the execution environment:

```
def f():
x = 1
def g():
return eval("x")
return g
enc = f()
enc()
```

We get ``NameError: name 'x' is not defined``.

The reason is that, during compilation the compiler doesn't and cannot care 
about what the string "x" means as an argument to eval(). To the compiler it's 
just a string constant passed to a function, and it's not much different from
```
return print("x")
```
The compiler decides that the enclosed function g() has no locals in its block. 
And since there's no global with the name ``x`` either, when the dynamic 
expression is evaluated in eval() in that environment, the name doesn't 
resolve, because "eval() doesn't have access to the enclosing scope".

But the following is different:

```
def f():
x = 1
def g():
x  # <- 
return eval("x")
return g
enc = f()
enc()  # return value: 1
```

The marked line introduces name ``x`` as a local by virtue of merely having it 
in an expression-statement. Inside the function block of g(), we can imagine 
that the name resolution "goes up one level" into the enclosing block of f() 
where it is bound to the int object. When eval() is called there, the name does 
resolve.

I'm trying to think up a mental model but I'm afraid I can't find a simple one, 
except "once compiled, it's compiled, and eval() must learn to work with the 
already-compiled code". A much more in-depth description of name binding and 
execution in CPython is given here:

https://tenthousandmeters.com/blog/python-behind-the-scenes-5-how-variables-are-implemented-in-cpython/

especially in the section "``LOAD_DEREF`` and ``STORE_DEREF``".

--

___
Python tracker 

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



[issue43639] Do not raise AttributeError on instance attribute update/deletion if data descriptor with missing __set__/__delete__ method found on its type

2021-03-27 Thread Géry

Change by Géry :


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

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 5d6e8c1c1a5f667cdce99cb3c563ac922198678d by Christian Heimes in 
branch 'master':
bpo-43617: Check autoconf-archive package in configure.ac (GH-25016)
https://github.com/python/cpython/commit/5d6e8c1c1a5f667cdce99cb3c563ac922198678d


--

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +23782
pull_request: https://github.com/python/cpython/pull/25034

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +23783
pull_request: https://github.com/python/cpython/pull/25035

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2021-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset 933dfd7504e521a27fd8b94d02b79f9ed08f4631 by Christian Heimes in 
branch 'master':
bpo-40645: use C implementation of HMAC (GH-24920)
https://github.com/python/cpython/commit/933dfd7504e521a27fd8b94d02b79f9ed08f4631


--

___
Python tracker 

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



[issue39616] SSLContext.check_hostname description is inaccurate wrt match_hostname

2021-03-27 Thread miss-islington

miss-islington  added the comment:


New changeset 9798cef92b882cd82a338d3368eaf3c4a32f5c2d by Ville Skyttä in 
branch 'master':
bpo-39616: clarify SSLContext.check_hostname effect (GH-18484)
https://github.com/python/cpython/commit/9798cef92b882cd82a338d3368eaf3c4a32f5c2d


--
nosy: +miss-islington

___
Python tracker 

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



[issue39616] SSLContext.check_hostname description is inaccurate wrt match_hostname

2021-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +23784
pull_request: https://github.com/python/cpython/pull/25036

___
Python tracker 

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



[issue39616] SSLContext.check_hostname description is inaccurate wrt match_hostname

2021-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +23785
pull_request: https://github.com/python/cpython/pull/25037

___
Python tracker 

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



[issue39616] SSLContext.check_hostname description is inaccurate wrt match_hostname

2021-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset 9de6451558c38537b2335d6e04e3bf8743c30576 by Miss Islington (bot) 
in branch '3.8':
bpo-39616: clarify SSLContext.check_hostname effect (GH-18484)
https://github.com/python/cpython/commit/9de6451558c38537b2335d6e04e3bf8743c30576


--

___
Python tracker 

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



[issue39616] SSLContext.check_hostname description is inaccurate wrt match_hostname

2021-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset c84e769c2b4108e1218e09652cb3bce34c541f8a by Miss Islington (bot) 
in branch '3.9':
bpo-39616: clarify SSLContext.check_hostname effect (GH-18484)
https://github.com/python/cpython/commit/c84e769c2b4108e1218e09652cb3bce34c541f8a


--

___
Python tracker 

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



[issue43637] winreg: SetValueEx leaks memory if PySys_Audit fails

2021-03-27 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 5.0 -> 6.0
pull_requests: +23786
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25038

___
Python tracker 

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



[issue43605] Eval/exec and comprehension scopes unclear in documentation

2021-03-27 Thread Cong Ma


Change by Cong Ma :


--
keywords: +patch
pull_requests: +23787
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25039

___
Python tracker 

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



[issue37773] ValueError: I/O operation on closed file. in ZipFile destructor

2021-03-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

That's what happened. Function foo creates a reference loop. It has reference 
to the module dict, and the dict has reference to the function. The dict has 
also references to BytesIO and ZipFile objects. At shutdown stage the garbage 
collector is called. It founds the reference loop which contains the module 
dict, function foo and BytesIO and ZipFile objects. It tries to break the loop 
by calling the destructor of arbitrary object in the loop. In that case it is 
the BytesIO object. It does not help, but finally the destructor of the ZipFile 
object is called (either directly or after breaking the loop and destroying the 
module dict). The ZipFile destructor tries to close the BytesIO object, but it 
is already closed in its destructor.

It is a dangerous situation which potentially can cause data corruption (if the 
underlying stream is closed before flushing buffers). Clearing the module dict 
before invoking garbage collecting would solve this issue. Making the garbage 
collector more clever and and avoid destroying objects if it does not break the 
loop would help too, but it is more complex problem and such change could not 
be backported to 3.8.

Victor, were there any changes in the garbage collector or interpreter shutdown 
code in 3.8?

--
nosy: +vstinner

___
Python tracker 

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



[issue43640] Add warnings to ssl.PROTOCOL_TLSv1 and ssl.PROTOCOL_TLSv1_1 docs

2021-03-27 Thread Illia Volochii


New submission from Illia Volochii :

TLS versions 1.0 and 1.1 have recently been deprecated. [1]

ssl.PROTOCOL_SSLv2 and ssl.PROTOCOL_SSLv3 have such warnings "SSL version 2 is 
insecure. Its use is highly discouraged." [2]

We have to add such warnings to ssl.PROTOCOL_TLSv1 and ssl.PROTOCOL_TLSv1_1 too.

[1] https://datatracker.ietf.org/doc/rfc8996/
[2] https://docs.python.org/3.10/library/ssl.html#ssl.PROTOCOL_SSLv2

--
assignee: docs@python
components: Documentation
messages: 389606
nosy: docs@python, illia-v
priority: normal
severity: normal
status: open
title: Add warnings to ssl.PROTOCOL_TLSv1 and ssl.PROTOCOL_TLSv1_1 docs
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



[issue43640] Add warnings to ssl.PROTOCOL_TLSv1 and ssl.PROTOCOL_TLSv1_1 docs

2021-03-27 Thread Illia Volochii


Change by Illia Volochii :


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

___
Python tracker 

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



[issue43638] MacOS os.statvfs() has rollover for >4TB disks at each 4TB (32bit counter overflow?)

2021-03-27 Thread Sander


Sander  added the comment:

Correction on typo in original post / to be clear:

>From the "df -m /Volumes/Frank/", Available is 19435615 in unity of 1MB 
>blocks, so 19435615 MB. Which is 18.5 TB. All correctly reported by "df -m". 
>But not by os.statvfs()

--

___
Python tracker 

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



[issue43641] Update `ssl.PROTOCOL_TLSv1_2` docs since it is not the newest TLS version

2021-03-27 Thread Illia Volochii


New submission from Illia Volochii :

Docs say that TLS 1.2 is the most modern version, and probably the best choice 
for maximum protection, but TLS 1.3 exists.

https://docs.python.org/3.10/library/ssl.html#ssl.PROTOCOL_TLSv1_2

--
assignee: docs@python
components: Documentation
messages: 389608
nosy: docs@python, illia-v
priority: normal
severity: normal
status: open
title: Update `ssl.PROTOCOL_TLSv1_2` docs since it is not the newest TLS version
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



[issue43642] ctypes.util.find_library can't find the lib on Alpine

2021-03-27 Thread An1c0de


New submission from An1c0de :

Hi!

ctypes.util.find_library can't find the lib on Alpine. I think this is because 
the logic is not cover the  digital suffixes.

Docker example:

```
docker run --rm -it python:3.9-alpine sh

apk add libuuid build-base

ls /lib/libuuid*
# /lib/libuuid.so.1
# /lib/libuuid.so.1.3.0

python -c 'from ctypes.util import find_library; print(find_library("uuid"))'
# None


## Workaround:

cd /lib && ln -s libuuid.so.1 libuuid.so

python -c 'from ctypes.util import find_library; print(find_library("uuid"))'
# libuuid.so.1
```

Thanks!

--
components: ctypes
messages: 389609
nosy: An1c0de
priority: normal
severity: normal
status: open
title: ctypes.util.find_library can't find the lib on Alpine
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



[issue43641] Update `ssl.PROTOCOL_TLSv1_2` docs since it is not the newest TLS version

2021-03-27 Thread Illia Volochii


Change by Illia Volochii :


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

___
Python tracker 

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



[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset bacefbf41461ab703b8d561f0e3d766427eab367 by Christian Heimes in 
branch 'master':
bpo-43466: Unsupported static build hack (GH-25002)
https://github.com/python/cpython/commit/bacefbf41461ab703b8d561f0e3d766427eab367


--
nosy: +miss-islington

___
Python tracker 

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



[issue37773] ValueError: I/O operation on closed file. in ZipFile destructor

2021-03-27 Thread Jörn Heissler

Jörn Heissler  added the comment:

Thanks Serhiy for the explanation, it's making sense now.

Guess whatever I did back then (no idea what I was working on) was basically a 
mistake; I should have closed my ZipFile properly, e.g. by using context 
managers. So maybe it's not really a cpython bug.

I ran a git-bisect back then and came up with 
https://hg.python.org/lookup/ada319bb6d0ebcc68d3e0ef2b4279ea061877ac8 as cause.

--

___
Python tracker 

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



[issue39231] Mistaken notion in tutorial

2021-03-27 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue39231] Mistaken notion in tutorial

2021-03-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset a53e9a7cf5912a44c5143e353912e44cfcfca7dc by Irit Katriel in 
branch 'master':
bpo-39231: correct tutorial annotations section (GH-25029)
https://github.com/python/cpython/commit/a53e9a7cf5912a44c5143e353912e44cfcfca7dc


--

___
Python tracker 

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



[issue39231] Mistaken notion in tutorial

2021-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +23791
pull_request: https://github.com/python/cpython/pull/25043

___
Python tracker 

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



[issue39231] Mistaken notion in tutorial

2021-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset 6fcebbb5a8cea25717804f5be9b6878104748ea5 by Miss Islington (bot) 
in branch '3.8':
bpo-39231: correct tutorial annotations section (GH-25029)
https://github.com/python/cpython/commit/6fcebbb5a8cea25717804f5be9b6878104748ea5


--

___
Python tracker 

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



[issue39231] Mistaken notion in tutorial

2021-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset 7990072999b7e9b4ef6b1f6bb376d441a5a41d74 by Miss Islington (bot) 
in branch '3.9':
bpo-39231: correct tutorial annotations section (GH-25029)
https://github.com/python/cpython/commit/7990072999b7e9b4ef6b1f6bb376d441a5a41d74


--

___
Python tracker 

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



[issue39231] Mistaken notion in tutorial

2021-03-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type: enhancement -> behavior
versions: +Python 3.10, 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



[issue43639] Do not raise AttributeError on instance attribute update/deletion if data descriptor with missing __set__/__delete__ method found on its type

2021-03-27 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +rhettinger
versions:  -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



[issue42041] venv subprocess call to python resolves to wrong interpreter

2021-03-27 Thread Eryk Sun


Change by Eryk Sun :


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



[issue37339] Document that os.path.ismount() returns true for nested btrfs subvolumes

2021-03-27 Thread Eryk Sun


Change by Eryk Sun :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
title: os.path.ismount returns true on nested btrfs subvolumes -> Document that 
os.path.ismount() returns true for nested btrfs subvolumes
type: behavior -> enhancement
versions: +Python 3.10 -Python 3.7

___
Python tracker 

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



[issue42134] Raise ImportWarning when falling back to find_module()

2021-03-27 Thread Brett Cannon


Change by Brett Cannon :


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

___
Python tracker 

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



[issue22790] some class attributes missing from dir(Class)

2021-03-27 Thread Siddharth Chabra


Change by Siddharth Chabra :


--
nosy: +siddharthchabra
versions:  -Python 3.10, 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



[issue43643] importlib.readers.MultiplexedPath.name is not a property

2021-03-27 Thread Andreas Poehlmann


New submission from Andreas Poehlmann :

Hello,

I was using the `importlib_resources` backport and encountered this issue, 
which is also present in cpython:

`importlib.readers.MultiplexedPath.name` is not a property as required by 
`importlib.abc.Traversable` 


I can prepare a pull request if it helps.

Cheers,
Andreas

--
components: Library (Lib)
messages: 389615
nosy: ap--, jaraco
priority: normal
severity: normal
status: open
title: importlib.readers.MultiplexedPath.name is not a property
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



[issue1634034] Show "expected" token on syntax error

2021-03-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Closing as per above

--
resolution:  -> out of date
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



[issue38038] Remove urllib.parse._splittype from xmlrpc.client

2021-03-27 Thread florian-rathgeber


florian-rathgeber  added the comment:

This change caused an (I presume unintended) behavior change that breaks some 
xmlrpc users: previously, the XLMRPC handler was everything after the host part 
of the URI 
(https://github.com/python/cpython/blame/32f825393e5836ab71de843596379fa3f9e23c7a/Lib/xmlrpc/client.py#L1428),
 but now the query string is *discarded* 
(https://github.com/python/cpython/blame/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Lib/xmlrpc/client.py#L1424).

This is known to break the XMLRPC for DokuWiki 
(https://www.dokuwiki.org/devel:xmlrpc), which uses query parameters for 
authentication: https://github.com/kynan/dokuwikixmlrpc/issues/8

--
nosy: +florian-rathgeber

___
Python tracker 

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



[issue38038] Remove urllib.parse._splittype from xmlrpc.client

2021-03-27 Thread Christian Heimes


Christian Heimes  added the comment:

Please open a new bug and include a reference to this issue.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue43433] xmlrpc.client ignores query in URI ("?action=xmlrpc2") since python-3.9

2021-03-27 Thread Chris Angelico


Change by Chris Angelico :


--
keywords: +patch
nosy: +Rosuav
nosy_count: 3.0 -> 4.0
pull_requests: +23793
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25045

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 064bc07f241dceec2fc577cbf5c31fa6d63fe320 by Christian Heimes in 
branch '3.9':
[3.9] bpo-43617: Check autoconf-archive package in configure.ac (GH-25016) 
(GH-25034)
https://github.com/python/cpython/commit/064bc07f241dceec2fc577cbf5c31fa6d63fe320


--

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset e516290976626cf8535b88a14b1b34e37f88a78a by Christian Heimes in 
branch '3.8':
[3.8] bpo-43617: Check autoconf-archive package in configure.ac (GH-25016) 
(GH-25035)
https://github.com/python/cpython/commit/e516290976626cf8535b88a14b1b34e37f88a78a


--

___
Python tracker 

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



[issue43433] xmlrpc.client ignores query in URI ("?action=xmlrpc2") since python-3.9

2021-03-27 Thread Chris Angelico


Chris Angelico  added the comment:

Can confirm. This changed in bpo-38038 and the fix isn't too difficult.

Adding 3.10 in case it's decided that this shouldn't be patched onto 3.9.

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks for the bug report! I ran into the issue a couple of weeks ago on one 
machine that had autoconf but not the archive package installed.

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



[issue43562] test_ssl.NetworkedTests.test_timeout_connect_ex fails if network is unreachable

2021-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset 29c451c6989c3c94fa0a9facf187c24f3cbf2420 by Carl Meyer in branch 
'master':
bpo-43562: fix test_ssl to skip on unreachable network (GH-24937)
https://github.com/python/cpython/commit/29c451c6989c3c94fa0a9facf187c24f3cbf2420


--
nosy: +miss-islington

___
Python tracker 

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



[issue43562] test_ssl.NetworkedTests.test_timeout_connect_ex fails if network is unreachable

2021-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +23794
pull_request: https://github.com/python/cpython/pull/25046

___
Python tracker 

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



[issue43562] test_ssl.NetworkedTests.test_timeout_connect_ex fails if network is unreachable

2021-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +23795
pull_request: https://github.com/python/cpython/pull/25047

___
Python tracker 

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



[issue43644] importlib.resources.as_file undocumented

2021-03-27 Thread Jason R. Coombs


New submission from Jason R. Coombs :

As reported in https://github.com/python/importlib_resources/issues/210, the 
`as_file` function of importlib.resources is undocumented in CPython.

--
messages: 389624
nosy: jaraco
priority: normal
severity: normal
status: open
title: importlib.resources.as_file undocumented

___
Python tracker 

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



[issue43644] importlib.resources.as_file undocumented

2021-03-27 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
assignee:  -> jaraco
components: +Documentation
type:  -> enhancement
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue43644] importlib.resources.as_file undocumented

2021-03-27 Thread Jason R. Coombs


Change by Jason R. Coombs :


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

___
Python tracker 

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



[issue43614] Search is not beginner friendly

2021-03-27 Thread Chris Angelico


Change by Chris Angelico :


--
keywords: +patch
nosy: +Rosuav
nosy_count: 5.0 -> 6.0
pull_requests: +23797
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25045

___
Python tracker 

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



[issue43644] importlib.resources.as_file undocumented

2021-03-27 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset af50c84643ce21cfbdfdabbdfae6bd5e1368c542 by Jason R. Coombs in 
branch 'master':
bpo-43644: Add docs for importlib.resources.as_file. (#25048)
https://github.com/python/cpython/commit/af50c84643ce21cfbdfdabbdfae6bd5e1368c542


--

___
Python tracker 

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



[issue43644] importlib.resources.as_file undocumented

2021-03-27 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue43644] importlib.resources.as_file undocumented

2021-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset 138e039ff9e5330709643b1bfe623eeac8fdc681 by Miss Islington (bot) 
in branch '3.9':
bpo-43644: Add docs for importlib.resources.as_file. (GH-25048)
https://github.com/python/cpython/commit/138e039ff9e5330709643b1bfe623eeac8fdc681


--

___
Python tracker 

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



[issue43644] importlib.resources.as_file undocumented

2021-03-27 Thread Jason R. Coombs


Change by Jason R. Coombs :


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



[issue43614] Search is not beginner friendly

2021-03-27 Thread Anthony Flury


Anthony Flury  added the comment:

Is PR 25045 the correct Pull request - this Issue is a documentation change - 
the linked PR is related to Issue 43433 (a change to xmlrpc.client ?)

--

___
Python tracker 

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



[issue32146] multiprocessing freeze_support needed outside win32

2021-03-27 Thread Oliver Newman


Change by Oliver Newman :


--
nosy: +onew

___
Python tracker 

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



[issue38948] [Windows] require an existing directory and suport junctions in ntpath.ismount()

2021-03-27 Thread Eryk Sun


Eryk Sun  added the comment:

Here's a concrete implementation of the above discussion. 

_is_windows = (sys.platform == 'win32')

def ismount(path):
"""Test whether a path is a mount point"""
path = os.fspath(path)
if isinstance(path, bytes):
sep = b'\\'
extended_devices = b'?\\'
normal_devices = b'.\\'
global_link = b'GLOBAL'
unc_device = b'UNC'
else:
sep = '\\'
extended_devices = '?\\'
normal_devices = '.\\'
global_link = 'GLOBAL'
unc_device = 'UNC'
# In Windows, require an existing, accessible directory.
if _is_windows:
if not isdir(path):
return False
try:
s = os.lstat(path)
if s.st_reparse_tag == stat.IO_REPARSE_TAG_MOUNT_POINT:
# isdir() verified the target directory.
return True
except (OSError, ValueError):
return False
path = abspath(path)
drive, drive_path = splitdrive(path)
if not drive:
return False
# A drive root is a mount point.
if drive_path == sep:
return True
# A root path is not required for a UNC drive.
if not drive_path and drive[0] in sep:
if not drive.startswith((extended_devices, normal_devices)):
return True
# Check for \\?\[Global]\UNC. Ignore repeated "Global" links.
comps = [c.upper() for c in drive[4:].split(sep)]
for c in comps:
if c != global_link:
break
if c == unc_device:
return True
return False

Removing the dependency on GetVolumePathNameW() also eliminates buggy behavior 
with substitute drives. For example, if substitute drive "W:" maps to 
r"C:\Windows", GetVolumePathNameW() mistakenly claims r"W:\System32" is a 
volume mount point.

In principle, this implementation also supports "\\?\[Global]\UNC\server\share" 
mount points on the "UNC" device, but it depends on fixing bpo-37609. The 
suggested rewrite for the latter issue also includes support for repeated 
slashes in a UNC drive, e.g. r"\\server\\\share" and 
r"\\?\\\Global\\\UNC\\\server\\\share" are valid.

For POSIX, ntpath._abspath_fallback() has to be fixed to correctly resolve 
drive-relative paths. For example:

def _abspath_fallback(path):
"""Return the absolute version of a path."""
path = os.fspath(path)
if isinstance(path, bytes):
sep = b'\\'
colon = b':'
cwd = os.getcwdb()
else:
sep = '\\'
colon = ':'
cwd = os.getcwd()
if not isabs(path):
# For a drive-relative path, default to the root directory
# on the drive if the process working directory is on a
# different drive.
if path[1:2] == colon and path[:2].upper() != cwd[:2].upper():
path = path[:2] + sep + path[2:]
else:
path = join(cwd, path)
return normpath(path)

Since _abspath_fallback() is no longer needed in any version of Windows, maybe 
it should simply assume that the working drive is "C:" and the working 
directory on all drives is the root directory.

--
components: +Library (Lib)
dependencies: +support "UNC" device paths in ntpath.splitdrive
title: os.path.ismount() returns False for current working drive -> [Windows] 
require an existing directory and suport junctions in ntpath.ismount()
versions: +Python 3.10 -Python 3.7

___
Python tracker 

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



[issue35026] Winreg's documentation lacks mentioning required permission at some points

2021-03-27 Thread Eryk Sun


Change by Eryk Sun :


--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7

___
Python tracker 

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



[issue34816] raise AttributeError if loading fails in ctypes.LibraryLoader.__getattr__

2021-03-27 Thread Eryk Sun


Eryk Sun  added the comment:

> __getattr__ method of LibraryLoader catches the OSError and 
> raises an AttributeError 

Yes. It seems no one was keen to work on this. I think it's relatively easy, so 
I'll add that flag in case someone is looking for an easy issue.

--
keywords: +easy
title: ctypes + hasattr -> raise AttributeError if loading fails in 
ctypes.LibraryLoader.__getattr__
versions: +Python 3.10, Python 3.9 -Python 3.7

___
Python tracker 

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



[issue33406] [ctypes] increase the refcount of a callback function

2021-03-27 Thread Eryk Sun


Change by Eryk Sun :


--
versions: +Python 3.10 -Python 3.7, Python 3.8

___
Python tracker 

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



[issue35440] Setup failed 0x80072f7d - Unspecified error

2021-03-27 Thread Eryk Sun


Change by Eryk Sun :


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



[issue37756] Error 0x80070643 when installing

2021-03-27 Thread Eryk Sun


Change by Eryk Sun :


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



[issue26227] Windows: socket.gethostbyaddr(name) fails for non-ASCII hostname

2021-03-27 Thread Eryk Sun


Change by Eryk Sun :


--
components: +Library (Lib)
keywords: +3.10regression, 3.6regression, 3.7regression, 3.8regression, 
3.9regression -patch
stage: test needed -> needs patch
type: crash -> behavior
versions: +Python 3.10 -Python 3.7

___
Python tracker 

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



[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2021-03-27 Thread Eryk Sun


Change by Eryk Sun :


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

___
Python tracker 

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



[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2021-03-27 Thread Eryk Sun


Change by Eryk Sun :


--
Removed message: https://bugs.python.org/msg359981

___
Python tracker 

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



[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2021-03-27 Thread Eryk Sun


Change by Eryk Sun :


--
versions: +Python 3.10 -Python 3.7

___
Python tracker 

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



[issue25643] Python tokenizer rewriting

2021-03-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
nosy: +pablogsal
nosy_count: 7.0 -> 8.0
pull_requests: +23799
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25050

___
Python tracker 

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



[issue22121] Start IDLE from icon in a better place.

2021-03-27 Thread Eryk Sun


Eryk Sun  added the comment:

> if sys.stdout is None and no file in sys.argv

With the app distribution from the Microsoft Store, "idle3.x.exe" is a GUI 
executable that runs idlelib. There isn't a console version. Also, GUI scripts 
are usually run with the pyw.exe launcher or pythonw.exe, e.g. `pyw -m 
idlelib`, to ensure it's not attached to a console session. Otherwise the shell 
waits for a console app such as py.exe, which blocks the console. Moreover, 
when a console session is closed, all processes attached to it have 5 seconds 
to exit before they get terminated. I generally don't want either behavior with 
a GUI app, except for the case of debugging an application that writes debug 
output to standard error or standard output. On the other hand, I generally do 
want to inherit the working directory of the parent process, such as a 
command-line shell. 

I think the problem would be adequately addressed by blacklisting directories 
that are known to be inappropriate and a common problem, such as sys.prefix and 
Windows system directories. I agree with the suggestion to automatically change 
the working directory in such cases to the user's "Documents" directory, i.e. 
FOLDERID_Documents.

--
versions: +Python 3.10 -Python 3.7

___
Python tracker 

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



[issue22121] Start IDLE from icon in a better place.

2021-03-27 Thread Eryk Sun


Eryk Sun  added the comment:

> blacklisting directories 

Ensure that filepaths in sys.argv are resolved before changing out of a 
blacklisted directory. Also, for file open/save dialogs, as opposed to the 
working directory of the Python subprocess (e.g. os.getcwd() in the REPL), it's 
typical to default to the user profile directory or the last-accessed directory 
instead of the process working directory.

--

___
Python tracker 

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