[issue45418] types.UnionType is not subscriptable

2021-10-10 Thread Joseph Perez


Joseph Perez  added the comment:

Indeed, sorry, my example was bad. My library was raising at several place, and 
I've extrapolated about generic substitution.

I've indeed other substitutions (without `TypeVar`), and because they were 
failing, I've assumed that all of my substitutions were failing; I was wrong 
about generic one.

For example, if I want to substitute `int | Collection[int]` to `int | 
list[int]`, I will have to replace `types.UnionType` by `typing.Union` or use 
`reduce`, while it was not necessary in 3.9 where I could just write 
`get_origin(tp)[new_args]`.

So I'll have to add some `if` in my code.

--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue45418] types.UnionType is not subscriptable

2021-10-10 Thread Ken Jin


Ken Jin  added the comment:

No worries!

> So I'll have to add some `if` in my code.

Yeah, we had to do that in the typing module too. Hope you manage to fix your 
library without much trouble.

--

___
Python tracker 

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



[issue45416] "loop argument must agree with lock" instantiating asyncio.Condition

2021-10-10 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue29410] Moving to SipHash-1-3

2021-10-10 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset ad970e8623523a8656e8c1ff4e1dff3423498a5a by Inada Naoki in branch 
'main':
bpo-29410: Change the default hash algorithm to SipHash13. (GH-28752)
https://github.com/python/cpython/commit/ad970e8623523a8656e8c1ff4e1dff3423498a5a


--

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-10 Thread Inada Naoki


Change by Inada Naoki :


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

___
Python tracker 

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



[issue45416] "loop argument must agree with lock" instantiating asyncio.Condition

2021-10-10 Thread Joongi Kim


Change by Joongi Kim :


--
keywords: +patch
nosy: +Joongi Kim
nosy_count: 6.0 -> 7.0
pull_requests: +27160
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28850

___
Python tracker 

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



[issue44036] asyncio SSL server can be DOSed, event loop gets blocked: busy loops and uses 100% CPU

2021-10-10 Thread Neil Booth


Change by Neil Booth :


--
nosy: +kyuupichan

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-10 Thread Randolf Scholz


Randolf Scholz  added the comment:

@Terry I think the problem boils down to the fact that `@classmethod @property` 
decorated methods end up not being real properties.

Calling `MyBaseClass.__dict__` reveals:

```python
mappingproxy({'__module__': '__main__',
  'expensive_class_property': ,
  'expensive_instance_property': ,
  '__dict__': ,
  '__weakref__': ,
  '__doc__': None,
  '__abstractmethods__': frozenset(),
  '_abc_impl': <_abc._abc_data at 0x7f893fb98740>})
```

Two main issues:

1. Any analytics or documentation tool that has special treatment for 
properties may not identify 'expensive_class_property' as a property if they 
simply check via `isinstance(func, property)`. Of course, this could be fixed 
by the tool-makers by doing a conditional check:

```python
isinstance(func, property) or (`isinstance(func, classmethod)` and 
`isinstance(func.__func__, property)`
```

2. `expensive_class_property` does not implement `getter`, `setter`, `deleter`. 
This seems to be the real dealbreaker, for example, if we do

```python
MyBaseClass.expensive_class_property = 2
MyBaseClass().expensive_instance_property = 2
```

Then the first line erroneously executes, such that 
MyBaseClass.__dict__['expensive_class_property'] is now `int` instead of 
`classmethod`, while the second line correctly raises `AttributeError: can't 
set attribute` since the setter method is not implemented.

--

___
Python tracker 

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



[issue45422] Data 0 cannot be plotted by matplotlib.pyplot just because some data is less than 0. (ContourSet._get_lowers_and_uppers)

2021-10-10 Thread Jianke SHI

New submission from Jianke SHI :

Data 0 cannot be plotted by matplotlib.pyplot(3.3.4) just because some data is 
less than 0 (python 3.8.8).

The following is a sample program to confirm the problem.
the left-bottom area in the right figure is not colored and remains transparent 
just because the data z[2,2] is changed from 0 to -1.7E-13.
(see attached png file.)


I tried to trace the problem and find that the reason seems to be a bug in 
ContourSet._get_lowers_and_uppers.(Line 1065 in contour.py(3.3.4))

if self.zmin == lowers[0]:
# Include minimum values in lowest interval
lowers = lowers.copy()  # so we don't change self._levels
if self.logscale:
lowers[0] = 0.99 * self.zmin
else:
lowers[0] -= 1

while lowers[0] is the same as self.zmin, it will be reduced a little before 
using. However, while lowers[0] is greater than self.zmin ( = -1.7E-13 ), it 
will not be reduced and remains as it is.
I think the condition should be revised to self.zmin <= lowers[0]
 from self.zmin == lowers[0]. 

(sample program)

import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

z0 = np.array([[0., 0., 2.], [0., 0., 1.], [2., 1., 0.]])
z1 = np.array([[0., 0., 2.], [0., 0., 1.], [2., 1., -1.7E-13]])

fig = plt.figure(figsize=(2, 4))

ax0 = fig.add_subplot(121)
ax0.contourf(z0, cmap='jet')
ax0.set_aspect('equal')

ax1 = fig.add_subplot(122)
ax1.contourf(z1, cmap='jet')
ax1.set_aspect('equal')

plt.show()

--
components: Library (Lib)
files: test_contourf_jet4r.png
messages: 403579
nosy: Klam
priority: normal
severity: normal
status: open
title: Data 0 cannot be plotted by matplotlib.pyplot just because some data is 
less than 0. (ContourSet._get_lowers_and_uppers)
type: behavior
versions: Python 3.7, Python 3.8
Added file: https://bugs.python.org/file50337/test_contourf_jet4r.png

___
Python tracker 

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



[issue45422] Data 0 cannot be plotted by matplotlib.pyplot just because some data is less than 0. (ContourSet._get_lowers_and_uppers)

2021-10-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

matplotlib is not a part of the standard Python library. Use the corresponding 
bug tracker to report issues with matplotlib.

--
nosy: +serhiy.storchaka
resolution:  -> third party
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



[issue45419] DegenerateFiles.Path mismatch to Traversable interface

2021-10-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Library (Lib)
nosy: +brett.cannon, eric.snow, ncoghlan
type:  -> behavior
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



[issue45419] DegenerateFiles.Path mismatch to Traversable interface

2021-10-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



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

2021-10-10 Thread Benjamin Szőke

Benjamin Szőke  added the comment:

It is not true that there are no benefits. Absolute timeout using can reduce 
the overhead time of any variable and object intialization cost before the 
WaitForMultipleObjects() which will perform the real sleeping via blocking wait 
in pysleep(). GetSystemTimePreciseAsFileTime() must be call at the first line 
as much as it can in pysleep(). This is the same implementation in Linux via 
clock_nanosleep().

So, to using absolute timeout and GetSystemTimePreciseAsFileTime() can improves 
the accuracy of the desired sleep time. For example if sleep = 2.0 sec then 
real relative sleep time = 2.001234 sec, but absolute sleep time = 2.12 sec.

Benefits are in not the technicaly backgorund, rather it is in the usecase.

--

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-10 Thread Randolf Scholz


Randolf Scholz  added the comment:

If fact, in the current state it seem that it is impossible to implement real 
class-properties, for a simple reason: 

descriptor.__set__ is only called when setting the attribute of an instance, 
but not of a class!!



```python
import math

class TrigConst: 
const = math.pi
def __get__(self, obj, objtype=None):
print("__get__ called")
return self.const

def __set__(self, obj, value):
print("__set__ called")
self.const = value


class Trig:
const = TrigConst()  # Descriptor instance
```

```python
Trig().const # calls TrigConst.__get__
Trig().const = math.tau  # calls TrigConst.__set__
Trig.const   # calls TrigConst.__get__
Trig.const = math.pi # overwrites TrigConst attribute with float.
```

--

___
Python tracker 

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



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

2021-10-10 Thread Benjamin Szőke

Benjamin Szőke  added the comment:

In other words, using absolute timeout can eliminate the systematic error of 
desired sleep time.

--

___
Python tracker 

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



[issue27879] add os.syncfs()

2021-10-10 Thread Nir Soffer


Nir Soffer  added the comment:

Updating python version, this is not relevant to 3.6 now.

On linux users can use "sync --file-system /path" but it would be nice if we 
have something that works on multiple platforms.

--
nosy: +nirs
versions: +Python 3.11 -Python 3.6

___
Python tracker 

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



[issue45417] Enum creation non-linear in the number of values

2021-10-10 Thread Armin Rigo


Armin Rigo  added the comment:

The timing is clearly quadratic:

number of attributes time
1500 0.24s
3000 0.94s
6000 3.74s
1200015.57s

Pressing Ctrl-C in the middle of the execution of the largest examples points 
directly to the cause: when we consider the next attribute, we loop over all 
previous ones at enum.py:238.

--
nosy: +arigo

___
Python tracker 

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



[issue45423] SSL SNI varies when host contains port number

2021-10-10 Thread Thomas Hobson


New submission from Thomas Hobson :

Not entirely sure if this is intended.

When using urllib.request.urlopen, with a hostname and a varying port the SNI 
information sent differs.
To my undersnding, the SNI info shouldn't include the port and should only 
include the actual host.

Attached is an example script demonstrating the issue, where the only 
difference between the URLs is adding a port number.
The server it points to is configured to only match "ci.hexf.me".

--
assignee: christian.heimes
components: SSL
files: test.py
messages: 403586
nosy: christian.heimes, hexf
priority: normal
severity: normal
status: open
title: SSL SNI varies when host contains port number
type: behavior
versions: Python 3.10, Python 3.9
Added file: https://bugs.python.org/file50338/test.py

___
Python tracker 

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



[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-10-10 Thread neonene


neonene  added the comment:

3.10.0 official binary is as slow as rc2.

Many files are not updated in the source archive or 
b494f5935c92951e75597bfe1c8b1f3112fec270, so I'm not sure if the delay is 
intentional or not.

We have no choice except waiting for 3.10.1.

--

___
Python tracker 

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



[issue45249] Update doctect SyntaxErrors for location range

2021-10-10 Thread daniel hahler

daniel hahler  added the comment:

I've noticed a regression/change with the code change for this issue.

When not catching the exception from `compile("invalid(", "", "single")` 
it has a caret below the opening parenthesis:

```
Traceback (most recent call last):
  File "…/t-syntaxerror-chained.py", line 2, in 
compile("invalid(", "", "single")
  File "", line 1
invalid(
   ^
SyntaxError: '(' was never closed
```

When using `traceback.print_exc` however this is missing:
```
Traceback (most recent call last):
  File "…/t-syntaxerror-chained.py", line 2, in 
compile("invalid(", "", "single")
  File "", line 1
invalid(

SyntaxError: '(' was never closed
```

The file used for testing:
```
try:
compile("invalid(", "", "single")
except Exception:
# raise
__import__("traceback").print_exc()
```

(this change was noticed between 3.10.0rc2 and the final release with pdbpp's 
test suite)

I've not investigated further (yet), and also feel free to ask for creating a 
new issue, but I've figured it would be good to notify you here first (where 
the code was changed).

--
nosy: +blueyed

___
Python tracker 

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



[issue45419] DegenerateFiles.Path mismatch to Traversable interface

2021-10-10 Thread miss-islington


miss-islington  added the comment:


New changeset 14a483aa400dda8346ac474ce22e2ba8d8126dff by Jason R. Coombs in 
branch '3.10':
[3.10] bpo-45419: Fix interfaces on DegenerateFiles.Path (GH-28844)
https://github.com/python/cpython/commit/14a483aa400dda8346ac474ce22e2ba8d8126dff


--
nosy: +miss-islington

___
Python tracker 

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



[issue45419] DegenerateFiles.Path mismatch to Traversable interface

2021-10-10 Thread Jason R. Coombs


Change by Jason R. Coombs :


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

___
Python tracker 

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



[issue45249] Update doctect SyntaxErrors for location range

2021-10-10 Thread daniel hahler


Change by daniel hahler :


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



[issue45203] Improve specialization stats for LOAD_METHOD and BINARY_SUBSCR

2021-10-10 Thread Ken Jin


Ken Jin  added the comment:

I'm closing this as there doesn't seem to be anything left to do. Please do 
reopen this issue if you feel that isn't the case.

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



[issue45423] SSL SNI varies when host contains port number

2021-10-10 Thread Christian Heimes


Change by Christian Heimes :


Added file: https://bugs.python.org/file50340/keylog

___
Python tracker 

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



[issue45423] SSL SNI varies when host contains port number

2021-10-10 Thread Christian Heimes


Christian Heimes  added the comment:

I have tested your assumption with wireshark. It's not the TLS SNI extension. 
In both cases ssl module sends SNI "ci.hexf.me". The issue is likely caused by 
HTTP Host header. The host header contains the port.

I'm attaching the capture and keylog file.

--
assignee: christian.heimes -> 
components: +Library (Lib) -SSL
Added file: https://bugs.python.org/file50339/bpo45423.pcapng

___
Python tracker 

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



[issue45417] Enum creation non-linear in the number of values

2021-10-10 Thread mattip


mattip  added the comment:

Over at PyPy arigo authored and we applied this fix to the as-yet unreleased 
pypy3.8. Note that it cannot be applied directly to CPython as sets are not 
ordered. Does the fix break anything? Tests in Lib/test/test_enum.py passed 
after applying it.

--
keywords: +patch
nosy: +mattip
Added file: https://bugs.python.org/file50341/quadratic-fix-2.diff

___
Python tracker 

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



[issue44036] asyncio SSL server can be DOSed, event loop gets blocked: busy loops and uses 100% CPU

2021-10-10 Thread Christian Heimes


Change by Christian Heimes :


--
assignee: christian.heimes -> 
components:  -SSL

___
Python tracker 

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



[issue45249] Update doctect SyntaxErrors for location range

2021-10-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
status: closed -> open

___
Python tracker 

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



[issue45249] Update doctect SyntaxErrors for location range

2021-10-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +27161
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/28854

___
Python tracker 

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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-10 Thread miss-islington

miss-islington  added the comment:


New changeset 62a667784ba7b84611ebd50fa8a1a464cde32235 by Vinay Sajip in branch 
'main':
bpo-45401: Change shouldRollover() methods to only rollover regular f… 
(GH-28822)
https://github.com/python/cpython/commit/62a667784ba7b84611ebd50fa8a1a464cde32235


--
nosy: +miss-islington

___
Python tracker 

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



[issue45249] Update doctect SyntaxErrors for location range

2021-10-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +27162
pull_request: https://github.com/python/cpython/pull/28855

___
Python tracker 

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



[issue45418] types.UnionType is not subscriptable

2021-10-10 Thread Guido van Rossum

Guido van Rossum  added the comment:

> If you meant to say: why is typing.Union[] allowed, but not
types.UnionType[]? That is intentional. types.UnionType is only meant for
builtin types. Once you union with *any* type from typing, it will convert
to a typing.Union.

But why? Just so types.UnionType (if it has a typevar) doesn’t have to
support subscriptions? Even if this saves us now, I agree with OP that it
ought to allow it, so we can deprecate typing.Union properly. And e.g.
dict[str, T] works.
-- 
--Guido (mobile)

--

___
Python tracker 

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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-10 Thread Vinay Sajip


Change by Vinay Sajip :


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



[issue45424] ssl.SSLError: unknown error (_ssl.c:4034)

2021-10-10 Thread Rahul Lakshmanan


New submission from Rahul Lakshmanan :

I face this error when trying to use a package called streamlit.

Streamlit calls Tornado which calls SSL.

 File "C:\Users\\.conda\envs\stockprediction\lib\ssl.py", line 589, 
in create_default_context
context.load_default_certs(purpose)
  File "C:\Users\\.conda\envs\stockprediction\lib\ssl.py", line 490, 
in load_default_certs
self._load_windows_store_certs(storename, purpose)
  File "C:\Users\\.conda\envs\stockprediction\lib\ssl.py", line 482, 
in _load_windows_store_certs
self.load_verify_locations(cadata=certs)
ssl.SSLError: unknown error (_ssl.c:4034)

This is using Python 3.7.10 (Anaconda) on Windows 10.

Would be really grateful if you could help resolve this issue. 

Note: I am unable to find this specific issue anywhere on Python.org or on 
OpenSSL github issues page.

--
assignee: christian.heimes
components: SSL
messages: 403595
nosy: christian.heimes, rahullak, vstinner
priority: normal
severity: normal
status: open
title: ssl.SSLError: unknown error (_ssl.c:4034)
type: crash
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



[issue45418] types.UnionType is not subscriptable

2021-10-10 Thread Ken Jin


Ken Jin  added the comment:

@Guido,

I hope I didn't misunderstand you, but to clarify, what OP is asking is an 
alternative way to construct types.UnionType objects and write:

types.UnionType[int, str]

like how we used to write before 3.10:

typing.Union[int, str]

I don't know why we need this. We can write `int | str`. The reason for PEP 604 
in the first place was to avoid the subscript syntax and use `|` since it's 
cleaner. OP's use case is for reconstructing types.UnionType objects easily, 
but `functools.reduce(operator.or_, args)` works.

Re: TypeVar subscription; PEP 604 syntax already supports that. We used to 
implement that in C. After Serhiy's Great Cleanup, a bitwise OR with a TypeVar 
automatically converts types.UnionType to typing.Union. So all the TypeVar 
support is now done in Python.

>>> type(int | str)


>>> (int | str | T)[dict]
typing.Union[int, str, dict]

--

___
Python tracker 

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



[issue45418] types.UnionType is not subscriptable

2021-10-10 Thread Guido van Rossum


Guido van Rossum  added the comment:

Oh, I see. No, they must make another special case, like for Annotated.--
--Guido (mobile)

--

___
Python tracker 

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



[issue45424] ssl.SSLError: unknown error (_ssl.c:4034)

2021-10-10 Thread Christian Heimes


Christian Heimes  added the comment:

The error means that something went wrong while loading certificates, but 
OpenSSL didn't give us more information about what went wrong.

Can you reproduce the issue with more recent Python version? 3.7 and 3.8 are in 
security fix-only mode and no longer receive bug fixes.

--

___
Python tracker 

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



[issue45417] Enum creation non-linear in the number of values

2021-10-10 Thread Ken Jin


Change by Ken Jin :


--
nosy: +barry, eli.bendersky, ethan.furman
versions: +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



[issue45416] "loop argument must agree with lock" instantiating asyncio.Condition

2021-10-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1a7892414e654aa5c99efa31db767baba7f4a424 by Joongi Kim in branch 
'main':
bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850)
https://github.com/python/cpython/commit/1a7892414e654aa5c99efa31db767baba7f4a424


--

___
Python tracker 

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



[issue45416] "loop argument must agree with lock" instantiating asyncio.Condition

2021-10-10 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +27163
pull_request: https://github.com/python/cpython/pull/28856

___
Python tracker 

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



[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-10-10 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher2

___
Python tracker 

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



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-10 Thread Marc Culler


Marc Culler  added the comment:

Unfortunately, I am still seeing this failure in Monterey beta 9.  However, we 
are no longer alone.  Here is a report of the same issue in Android Studio:

https://stackoverflow.com/questions/69068842/android-studio-open-file-operation-failed-the-open-file-operation-failed-to-co

This is reportedly fixed in the Adroid Studio beta, so maybe someone will be 
able to figure out what Google did to workaround the problem.

--

___
Python tracker 

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



[issue45416] "loop argument must agree with lock" instantiating asyncio.Condition

2021-10-10 Thread miss-islington


miss-islington  added the comment:


New changeset 164dddf5f8c9c6b93f32c9f79b4301fc804576e9 by Miss Islington (bot) 
in branch '3.10':
bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850)
https://github.com/python/cpython/commit/164dddf5f8c9c6b93f32c9f79b4301fc804576e9


--

___
Python tracker 

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



[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-10-10 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher -brandtbucher2

___
Python tracker 

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



[issue45380] help() appears confused about the module of typing.Annotated

2021-10-10 Thread Alex Waygood


Alex Waygood  added the comment:

It actually appears as though there is no documented way to retrieve the 
metadata from an annotated alias. Is this intentional?

The metadata is stored in a `__metadata__` attribute of a 
`typing._AnnotatedAlias` instance. But the `__metadata__` attribute is 
undocumented -- there is no mention of it in the docstring for 
`_AnnotatedAlias`, in the documentation for `typing.Annotated` 
(https://docs.python.org/3.11/library/typing.html#typing.Annotated), or PEP 
593, which introduced `typing.Annotated` 
(https://www.python.org/dev/peps/pep-0593/).

The documentation says: "Passing include_extras=True to get_type_hints() lets 
one access the extra annotations at runtime." However, this is misleading. 
Calling `get_type_hints` on a function/class where an argument/attribute is 
annotated with an `_AnnotatedAlias` instance is a way of retrieving the type 
hints for the function/class with the `_AnnotatedAlias` instance unresolved. 
However, if you call `get_type_hints` on the `_AnnotatedAlias` instance 
directly, this fails.

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



[issue45380] help() appears confused about the module of typing.Annotated

2021-10-10 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +gvanrossum, kj

___
Python tracker 

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



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-10 Thread Marc Culler


Marc Culler  added the comment:

I was able to fix this problem for Tk on Monterey beta [21A5543b].
The fix has been committed to the tip of the core-8-6-branch in the
Tk fossil repository.

Here is a synopsis.  Tk used to open the file dialog by calling
[NSApp runModalForWindow:panel].  Starting with the release of 10.14
this call would produce a warning message on stderr saying that
[NSOpenPanel runModal] should be used instead.  But on systems older
than 10.14, the runModal method would fail because the completion handler
would not get called.  Now, with 12.0 (at least in the beta) calling
[NSOpenPanel runModal] produces an error dialog saying "The open file
operation failed to connect to the open and save panel service" and
this would be accompanied by a traceback printed on stderr for an
assertion error.  (It was not a "crash" but the file selection would
fail.)  However, it turns out that calling [NSApp runModalForWindow:panel]
no longer produces the warning in 12.0, and it works correctly.

So my workaround was to add conditional code that only calls the runModal
method on 10.14 and 10.15 and calls runModalForWindow on other versions
of macOS.  I tested on 10.15 and it works there as well.

Needless to say, none of these changes are documented by Apple.

--

___
Python tracker 

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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Seems it introduced a resource warning in tests.

--

___
Python tracker 

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



[issue45418] types.UnionType is not subscriptable

2021-10-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

types.UnionType corresponds to typing._UnionGenericAlias, not typing.Union.

We can make (int | str | T)[dict] returning an instance of types.UnionType 
instead of an instance of typing._UnionGenericAlias. But it will be a breaking 
change, because typing._UnionGenericAlias and types.UnionType are different and 
not completely compatible types. We should wait some time before making such 
changes, so all user code will be made supporting both 
typing._UnionGenericAlias and types.UnionType.

If the user code does something special like substituting `int | 
Collection[int]` to `int | list[int]`, it should have some additional ifs in 
any case, otherwise it will not recognize new typing types including 
types.UnionTypes. And subscription does not work in all typing types, we have 
copy_with() for some types and special cases for others in the code of the 
typing module. I am going to unify it finally, but it takes time, my time and 
user's time to migrate to new idioms.

--

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-10-10 Thread MagzoB Mall


Change by MagzoB Mall :


--
type: performance -> crash

___
Python tracker 

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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-10 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
status: closed -> open

___
Python tracker 

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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-10 Thread Vinay Sajip


Vinay Sajip  added the comment:

Where did you see the warnings? I didn't spot anything in the GitHub Actions 
logs.

--

___
Python tracker 

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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

test_should_not_rollover (test.test_logging.TimedRotatingFileHandlerTest) ... 
/home/serhiy/py/cpython/Lib/unittest/case.py:547: ResourceWarning: unclosed 
file <_io.TextIOWrapper name='/dev/null' mode='a' encoding='utf-8'>
  if method() is not None:
ResourceWarning: Enable tracemalloc to get the object allocation traceback
ok

--

___
Python tracker 

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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

With tracemalloc enabled:

$ ./python -X tracemalloc -m test -v test_logging -m test_should_not_rollover
...
test_should_not_rollover (test.test_logging.TimedRotatingFileHandlerTest) ... 
/home/serhiy/py/cpython/Lib/unittest/case.py:547: ResourceWarning: unclosed 
file <_io.TextIOWrapper name='/dev/null' mode='a' encoding='utf-8'>
  if method() is not None:
Object allocated at (most recent call last):
  File "/home/serhiy/py/cpython/Lib/logging/__init__.py", lineno 1205
return open_func(self.baseFilename, self.mode,
ok

--

___
Python tracker 

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



[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-10-10 Thread Guido van Rossum


Guido van Rossum  added the comment:

Someone whose name I don't recognize (MagzoB Mall) just changed the issue type 
to "crash" without explaining why. That user was created today, and has no 
triage permissions. Mind if I change it back? It feels like vandalism.

--

___
Python tracker 

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



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

2021-10-10 Thread Eryk Sun


Eryk Sun  added the comment:

> Absolute timeout using can reduce the overhead time of any variable 
> and object intialization cost before the WaitForMultipleObjects() 

Again, timer objects store the due time in interrupt time, not system time 
(i.e. InterruptTime vs SystemTime in the KUSER_SHARED_DATA record). The due 
time gets set as the current interrupt time plus a relative due time. If the 
due time is passed as absolute system time, the kernel just computes the delta 
from the current system time.

The timer object does record whether the requested due time is an absolute 
system time. This allows the kernel to recompute all absolute due times when 
the system time is changed manually. This is also the primary reason one 
wouldn't implement time.sleep() with absolute system time.

> using absolute timeout and GetSystemTimePreciseAsFileTime() can 
> improves the accuracy of the desired sleep time.

It would not improve the resolution. Timer objects are signaled when their due 
time is at or before the current interrupt time. The latter gets updated by the 
timer interrupt service routine, by default every 15.625 ms -- or at least that 
used to be the case.

The undocumented flag CREATE_WAITABLE_TIMER_HIGH_RESOLUTION creates a different 
timer type, called an "IRTimer" (implemented in Windows 8.1, but back then only 
accessible in the NT API). This timer type is based on precise interrupt time, 
which is interpolated using the performance counter. I don't know how the 
implementation of the timer interrupt has changed to support this increased 
resolution. It could be that the default 15.625 ms interrupt period is being 
simulated for compatibility with classic timers and Sleep(). I'd love for the 
CREATE_WAITABLE_TIMER_HIGH_RESOLUTION flag and the behavior of IRTimer objects 
to be documented.

--

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I'm merging issue 44904 into this one because they are related.

--
nosy: +rhettinger

___
Python tracker 

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



[issue44904] Classmethod properties are erroneously "called" in multiple modules

2021-10-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Moving this discussion to issue 45356 because some of the discussion would need 
to be duplicated.

--
nosy: +rhettinger
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Calling `help` executes @classmethod @property decorated methods

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

It may have been a mistake to allow this kind of decorator chaining.  

* As Randolf and Alex have noticed, it invalidates assumptions made elsewhere 
in the standard library and presumably in third-party code as well.  

* And as Randolf noted in his last post, the current descriptor logic doesn't 
make it possible to implement classmethod properties with setter logic. 

* In issue 44973, we found that staticmethod and property also don't compose 
well, nor does abstract method.

We either need to undo the Python 3.9 feature from issue 19072, or we need to 
put serious thought into making all these descriptors composable in a way that 
would match people's expectations.

--
assignee:  -> rhettinger
nosy: +berker.peksag

___
Python tracker 

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



[issue45425] There is an error in the Chinese documentation of contextlib.AbstractContextManager

2021-10-10 Thread Zhong Liu


New submission from Zhong Liu :

The documentation of contextlib.AbstractContextManager is incorrectly described 
as the documentation of contextlib.AbstractAsyncContextManager

from 3.6 to 3.10, all is.

https://docs.python.org/zh-cn/3.6/library/contextlib.html#contextlib.AbstractContextManager
https://docs.python.org/zh-cn/3.10/library/contextlib.html#contextlib.AbstractContextManager

--
assignee: docs@python
components: Documentation
messages: 403614
nosy: docs@python, laxtiz
priority: normal
severity: normal
status: open
title: There is an error in the Chinese documentation of 
contextlib.AbstractContextManager
versions: Python 3.6

___
Python tracker 

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



[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

2021-10-10 Thread Guido van Rossum


Change by Guido van Rossum :


--
type: crash -> performance

___
Python tracker 

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



[issue45384] Accept Final as indicating ClassVar for dataclass

2021-10-10 Thread Carl Meyer


Carl Meyer  added the comment:

> Are Final default_factory fields real fields or pseudo-fields? (i.e. are they 
> returned by dataclasses.fields()?)

They are real fields, returned by `dataclasses.fields()`.

In my opinion, the behavior change proposed in this bug is a bad idea all 
around, and should not be made, and the inconsistency with PEP 591 should 
rather be resolved by explicitly specifying the interaction with dataclasses in 
a modification to the PEP.

Currently the meaning of:

```
@dataclass
class C:
x: Final[int] = 3
```

is well-defined, intuitive, and implemented consistently both in the runtime 
and in type checkers. It specifies a dataclass field of type `int`, with a 
default value of `3` for new instances, which can be overridden with an init 
arg, but cannot be modified (per type checker; runtime doesn't enforce Final) 
after the instance is initialized.

Changing the meaning of the above code to be "a dataclass with no fields, but 
one final class attribute of value 3" is a backwards-incompatible change to a 
less useful and less intuitive behavior.

I argue the current behavior is intuitive because in general the type 
annotation on a dataclass attribute applies to the eventual instance attribute, 
not to the immediate RHS -- this is made very clear by the fact that 
typecheckers happily accept `x: int = dataclasses.field(...)` which in a 
non-dataclass context would be a type error. Therefore the Final should 
similarly be taken to apply to the eventual instance attribute, not to the 
immediate assignment. And therefore it should not (in the case of dataclasses) 
imply ClassVar.

I realize that this means that if we want to allow final class attributes on 
dataclasses, it would require wrapping an explicit ClassVar around Final, which 
violates the current text of PEP 591. I would suggest this is simply because 
that PEP did not consider the specific case of dataclasses, and the PEP should 
be amended to carve out dataclasses specifically.

--
nosy: +carljm

___
Python tracker 

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



[issue45384] Accept Final as indicating ClassVar for dataclass

2021-10-10 Thread Gregory Beauregard


Gregory Beauregard  added the comment:

Thanks for the feedback Carl.

Your proposed nesting PEP change is not possible: ClassVar[Final[int]] isn't 
valid because Final[int] isn't a type. As far as I know this would need type 
intersections to be possible.

I'm going to try sending a one-off email to the PEP authors since probably 
whatever happens the PEP needs a clarification anyway.

--

___
Python tracker 

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



[issue45384] Accept Final as indicating ClassVar for dataclass

2021-10-10 Thread Carl Meyer

Carl Meyer  added the comment:

Good idea to check with the PEP authors. 

I don’t think allowing both ClassVar and Final in dataclasses requires general 
intersection types. Neither ClassVar nor Final are real types; they aren’t part 
of the type of the value.  They are more like special annotations on a name, 
which are wrapped around a type as syntactic convenience. You’re right that it 
would require more than just amendment to the PEP text, though; it might 
require changes to type checkers, and it would also require changes to the 
runtime behavior of the `typing` module to special-case allowing 
`ClassVar[Final[…]]`. And the downside of this change is that it couldn’t be 
context sensitive to only be allowed in dataclasses. But I think this isn’t a 
big problem; type checkers could still error on that wrapping in non dataclass 
contexts if they want to. 

But even if that change can’t be made, I think backwards compatibility still 
precludes changing the interpretation of `x: Final[int] = 3` on a dataclass, 
and it is more valuable to be able to specify Final instance attributes 
(fields) than final class attributes on dataclasses.

--

___
Python tracker 

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



[issue45426] PANDAS INSTALLATION PIP FAILED ON WINDOWS 11

2021-10-10 Thread Jimmy Alexander


New submission from Jimmy Alexander :

Generating code
  Finished generating code
  building 'pandas._libs.parsers' extension
  C:\Program Files (x86)\Microsoft Visual 
Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c 
/nologo /Ox /W3 /GL /DNDEBUG /MD -DNPY_NO_DEPRECATED_API=0 -I.\pandas\_libs 
-Ipandas/_libs/src/klib -Ipandas/_libs/src 
-IC:\Users\ufx\AppData\Local\Temp\pip-build-env-e6frjkyc\overlay\Lib\site-packages\numpy\core\include
 -IC:\Users\ufx\AppData\Local\Programs\Python\Python310\include 
-IC:\Users\ufx\AppData\Local\Programs\Python\Python310\Include -IC:\Program 
Files (x86)\Microsoft Visual 
Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include -IC:\Program Files 
(x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows 
Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows 
Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows 
Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows 
Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows 
Kits\10\include\10.0.19041.0\cppwinrt /Tcpandas/_libs/src/parser/io.c /Fo
 build\temp.win-amd64-3.10\Release\pandas/_libs/src/parser/io.obj
  io.c
  pandas/_libs/src/klib\khash.h(705): warning C4090: 'function': different 
'const' qualifiers
  pandas/_libs/src/parser/io.c(139): error C2065: 'ssize_t': undeclared 
identifier
  pandas/_libs/src/parser/io.c(139): error C2146: syntax error: missing ';' 
before identifier 'rv'
  pandas/_libs/src/parser/io.c(139): error C2065: 'rv': undeclared identifier
  pandas/_libs/src/parser/io.c(145): error C2065: 'rv': undeclared identifier
  pandas/_libs/src/parser/io.c(145): warning C4267: 'function': conversion from 
'size_t' to 'unsigned int', possible loss of data
  pandas/_libs/src/parser/io.c(146): error C2065: 'rv': undeclared identifier
  pandas/_libs/src/parser/io.c(157): error C2065: 'rv': undeclared identifier
  pandas/_libs/src/parser/io.c(158): error C2065: 'rv': undeclared identifier
  error: command 'C:\\Program Files (x86)\\Microsoft Visual 
Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe'
 failed with exit code 2
  
  ERROR: Failed building wheel for pandas
Failed to build pandas
ERROR: Could not build wheels for pandas which use PEP 517 and cannot be 
installed directly

--
components: Windows
messages: 403618
nosy: jdfoxito, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: PANDAS INSTALLATION PIP FAILED ON WINDOWS 11
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



[issue45426] PANDAS INSTALLATION PIP FAILED ON WINDOWS 11

2021-10-10 Thread Jimmy Alexander


Jimmy Alexander  added the comment:

C:\Users\ufx>pip install pandas
Collecting pandas
  Using cached pandas-1.3.3.tar.gz (4.7 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\ufx\AppData\Local\Programs\Python\Python310\python.exe' 
'C:\Users\ufx\AppData\Local\Temp\pip-standalone-pip-hwkn7bp9\__env_pip__.zip\pip'
 install --ignore-installed --no-user --prefix 
'C:\Users\ufx\AppData\Local\Temp\pip-build-env-q28f4203\overlay' 
--no-warn-script-location --no-binary :none: --only-binary :none: -i 
https://pypi.org/simple -- 'setuptools>=51.0.0' wheel 'Cython>=0.29.21,<3' 
'numpy==1.17.3; python_version=='"'"'3.7'"'"' and 
(platform_machine!='"'"'arm64'"'"' or platform_system!='"'"'Darwin'"'"') and 
platform_machine!='"'"'aarch64'"'"'' 'numpy==1.18.3; 
python_version=='"'"'3.8'"'"' and (platform_machine!='"'"'arm64'"'"' or 
platform_system!='"'"'Darwin'"'"') and platform_machine!='"'"'aarch64'"'"'' 
'numpy==1.19.3; python_version>='"'"'3.9'"'"' and 
(platform_machine!='"'"'arm64'"'"' or platform_system!='"'"'Darwin'"'"') and 
platform_machine!='"'"'aarch64'"'"'' 'numpy==1.19.2; 
python_version=='"'"'3.7'"'"' and platform_machine=='"'"'aarch64'"'"'' 'num
 py==1.19.2; python_version=='"'"'3.8'"'"' and 
platform_machine=='"'"'aarch64'"'"'' 'numpy>=1.20.0; 
python_version=='"'"'3.8'"'"' and platform_machine=='"'"'arm64'"'"' and 
platform_system=='"'"'Darwin'"'"'' 'numpy>=1.20.0; 
python_version=='"'"'3.9'"'"' and platform_machine=='"'"'arm64'"'"' and 
platform_system=='"'"'Darwin'"'"''
   cwd: None
  Complete output (839 lines):
  Ignoring numpy: markers 'python_version == "3.7" and (platform_machine != 
"arm64" or platform_system != "Darwin") and platform_machine != "aarch64"' 
don't match your environment
  Ignoring numpy: markers 'python_version == "3.8" and (platform_machine != 
"arm64" or platform_system != "Darwin") and platform_machine != "aarch64"' 
don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_machine == 
"aarch64"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.8" and platform_machine == 
"aarch64"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.8" and platform_machine == 
"arm64" and platform_system == "Darwin"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.9" and platform_machine == 
"arm64" and platform_system == "Darwin"' don't match your environment
  Collecting setuptools>=51.0.0
Using cached setuptools-58.2.0-py3-none-any.whl (946 kB)
  Collecting wheel
Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)

--

___
Python tracker 

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



[issue45426] PANDAS INSTALLATION PIP FAILED ON WINDOWS 11

2021-10-10 Thread Jimmy Alexander


Jimmy Alexander  added the comment:

descarga la version 3.10 se supone es estable

pero al momento de instalar PANDAS usando PIP en el CMD de windows 11

FALLA

y empieza a buscar otras vesiones de menores de pandas para intentar instalar 
via pip

pero todas fallan!

--
type:  -> compile error

___
Python tracker 

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



[issue45427] importlib.readers.MultiplexedPath

2021-10-10 Thread David Rajaratnam


New submission from David Rajaratnam :

I'm trying to use `importlib.resources.files()`. However, I cannot work out how 
to properly use the `importlib.readers.MultiplexedPath()` object that is 
returned.

As I expect and want, the returned object is referring to a directory, but I 
cannot seem to simply access the value of that path. 

For a normal `pathlib.Path` object you can get a OS specific path by simply 
converting to the string representation (eg., 'str(pathlib.Path('/somepath') == 
'/somepath'). However, for the MutiplexedPath object the __str__() value is the 
same as the __repr__() (e.g., "MultiplexedPath('/somepath')").

It seems that this is a bug since I would expect MultiplexedPath to behave the 
same as pathlib.Path in this regard. In the meantime is there a way to actually 
access this data without stripping the prefix and suffix of this string?

--
components: Library (Lib)
messages: 403621
nosy: daveraja
priority: normal
severity: normal
status: open
title: importlib.readers.MultiplexedPath
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



[issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

2021-10-10 Thread Vadym Stupakov


Vadym Stupakov  added the comment:

> Do we have any news about this?

There is IBM effort to do this in container level, so that os.cpu_count() will 
return right result in container

https://www.phoronix.com/scan.php?page=news_item&px=Linux-CPU-Namespace

--
nosy: +RedEyed

___
Python tracker 

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