[issue31202] Windows pathlib.Path.glob(pattern) fixed part of the pattern changed to lowercase whereas it should be unchanged.

2019-10-19 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



[issue38440] Possible new issues with IDLE

2019-10-19 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I've twice observed another bit of flakey behavior.  When editing a line in a 
shell session, the cursor arrow keys start emitting mac's ? special symbol 
character.

I'll look to see if I can find a reproducer for this as well.

--

___
Python tracker 

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



[issue36321] Fix misspelled attribute name in namedtuple()

2019-10-19 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +16405
pull_request: https://github.com/python/cpython/pull/16858

___
Python tracker 

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



[issue38533] py script runs with python.exe but not pythonw.exe (python console)

2019-10-19 Thread Jon


Jon  added the comment:

by the way, just to be sure, I am actually running the python.exe / py.exe / 
pythonw.exe / pyw.exe from the full file path just to be sure.  e.g.

%LOCALAPPDATA%\Programs\Python\Launcher\pyw.exe  test.py

--

___
Python tracker 

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



[issue38533] py script runs with python.exe but not pythonw.exe (python console)

2019-10-19 Thread Jon


New submission from Jon :

3.7.5.  Any py script that I run with python.exe or py.exe executes just fine.  
But if I try to run any py script with pythonW.exe or pyW.exe it will not run.  

I don't know where the logging for the python executable is located.

On the same machine, java.exe and javaW.exe work properly. (jar file runs 
exactly the same with either executable.  Only the cmd/console window is 
suppressed with "w" exe.



I am trying to isolate whether or not python 3.7.5 is to blame or this new 
windows 10 x64 1809 LTSC machine is to blame.

I have tested in both python 3.7.5 x86 and x64 versions.  the "W" console 
version does not run any py scripts.

On my previous laptop (win 8.1 x64) and (win2012 r2 x64 server, no problems) 
with 3.7.4 32 bit.

---

How do I have multiple MINOR versions of python together?  e.g. 3.7.3, 3.7.4, 
3.7.5?  Can they be placed in separate folders?

--
components: Windows
messages: 354982
nosy: 4evermaat, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: py script runs with python.exe but not pythonw.exe (python console)
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

With the new approach, there is no measurable different in performance:

venv ❯ pyperf compare_to json/2019-10-19_20-01-master-24dc2f8c5669.json.gz 
json/2019-10-20_01-32-suggestions2-21404456383b.json.gz -G

Slower (3):
- 2to3: 400 ms +- 2 ms -> 405 ms +- 3 ms: 1.01x slower (+1%)
- sqlite_synth: 3.46 us +- 0.08 us -> 3.50 us +- 0.08 us: 1.01x slower (+1%)
- nqueens: 121 ms +- 1 ms -> 121 ms +- 1 ms: 1.01x slower (+1%)

Faster(4):
- hexiom: 11.9 ms +- 0.1 ms -> 11.8 ms +- 0.1 ms: 1.01x faster (-1%)
- xml_etree_generate: 113 ms +- 2 ms -> 113 ms +- 2 ms: 1.01x faster (-1%)
- python_startup_no_site: 9.25 ms +- 0.06 ms -> 9.20 ms +- 0.01 ms: 1.01x 
faster (-1%)
- go: 317 ms +- 4 ms -> 315 ms +- 3 ms: 1.01x faster (-1%)
- sympy_integrate: 25.1 ms +- 0.2 ms -> 25.0 ms +- 0.1 ms: 1.01x faster (-1%)


Benchmark hidden because not significant (57): chameleon, chaos, crypto_pyaes, 
deltablue, dulwich_log, fannkuch, float, genshi_text, genshi_xml, json_dumps, 
json_loads, logging_format, logging_silent, logging_simple, mako, 
meteor_contest, nbody, pathlib, pickle, pickle_dict, pickle_list, 
pickle_pure_python, pidigits, python_startup, raytrace, regex_compile, 
regex_dna, regex_effbot, regex_v8, richards, scimark_fft, scimark_lu, 
scimark_monte_carlo, scimark_sor, scimark_sparse_mat_mult, spectral_norm, 
sqlalchemy_declarative, sqlalchemy_imperative, sympy_expand, sympy_sum, 
sympy_str, telco, unpack_sequence, unpickle, unpickle_list, 
unpickle_pure_python, xml_etree_parse, xml_etree_iterparse, xml_etree_process

--

___
Python tracker 

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



[issue38531] argparse action "extend" not documented as new

2019-10-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +paul.j3, rhettinger

___
Python tracker 

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



[issue38532] Missing decrefs in the _ctypes module

2019-10-19 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue38532] Missing decrefs in the _ctypes module

2019-10-19 Thread Zackery Spytz


New submission from Zackery Spytz :

In PyCFuncPtr_FromDll(), there are two missing calls to Py_DECREF() if 
PySys_Audit() fails!

--
components: Extension Modules
messages: 354980
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: Missing decrefs in the _ctypes module
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-10-19 Thread Caleb Hattingh


Change by Caleb Hattingh :


--
nosy: +cjrh

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I have opened PR 16856 adding fields to the AttributeError and implementing the 
feature in PyErr_Display.

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +16403
pull_request: https://github.com/python/cpython/pull/16856

___
Python tracker 

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



[issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount

2019-10-19 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

All fixed now, right?

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



[issue37759] Polish whatsnew for 3.8

2019-10-19 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +16402
pull_request: https://github.com/python/cpython/pull/16854

___
Python tracker 

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



[issue12022] AttributeError should report the same details when raised by lookup_special() as when raised in the REPL

2019-10-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Would not be better to change an AttributeError to TypeError? Seems this is the 
only place in the core when missing special method causes an AttributeError and 
not TypeError.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31202] Windows pathlib.Path.glob(pattern) fixed part of the pattern changed to lowercase whereas it should be unchanged.

2019-10-19 Thread Steve Dower


Steve Dower  added the comment:

Bumping this - it's bitten me a couple of times as one of the build/release 
scripts relies on Path.glob().

--
versions: +Python 3.9 -Python 3.6

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> But the problem is that making a reference to the object we can prolong its 
> lifetime and even create a reference loop.

If I'm not mistaken, as long as the traceback is alive, the object is alive 
beacuse the frames will contain it. The other case is if the exception is not 
propagated, but in that case it should just die unless explicitly captured. 

The cycle only happens if the object has a reference to the exception, and that 
should not happen in the general case.

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> But the problem is that making a reference to the object we can prolong its 
> lifetime and even create a reference loop.

If I'm not mistaken, as long as the traceback is alive, the object is alive 
beacuse the frames will contain it. The other case is if the exception is not 
propagated, but in that case it should just die unless explicitly captured. 
There is a link you can find to previous discussions?

The cycle only happens if the object has a reference to the exception, and that 
should not happen in the general case.

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See issue18156, issue22716 and PEP 473.

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Why private? They should be public.

I was suggesting orivate for now until the/a PEP to modify the exception is 
approved. In this way we could try to implement the feature that way.

--

On the other hand do you see any way to make the current approach not that 
slow? Maybe activating it only on interactive mode?

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Why private? They should be public.

But the problem is that making a reference to the object we can prolong its 
lifetime and even create a reference loop. There was a proposition to create a 
weak reference, but not all types support weak reference.

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I will also repeat the pyperformance results locally just in case something was 
off on the speed.python.org server.

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Serhiy, do you think we could attach the object and the name to some private 
fields of the AttributeError and check that in sys.excepthook if they are 
present?

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am surprised that it was SO expensive.

Pathlib would largely benefit from cached_property if it be compatible with 
slots.

--

___
Python tracker 

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



[issue38433] 2.7.17rc1 tcl/tk version regression on Windows

2019-10-19 Thread Steve Dower


Steve Dower  added the comment:

Confirmed that it was a failed clean/rebuild on my build machine. The current 
build for 2.7.17 has the newer version.

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



[issue38531] argparse action "extend" not documented as new

2019-10-19 Thread Christoph Zwerschke


New submission from Christoph Zwerschke :

A new action "extend" has been added to argparse in 
https://github.com/python/cpython/commit/aa32a7e1116f7aaaef9fec453db910e90ab7b101

The documentation should specify that this is new in Python 3.8 addition. I 
wondered why it didn't work in Python 3.7.

--
assignee: docs@python
components: Documentation
messages: 354966
nosy: cito, docs@python
priority: normal
severity: normal
status: open
title: argparse action "extend" not documented as new
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

AFAIK there is existing issue for this idea.

I have doubts about performance. I added _PyObject_LookupAttr in particularly 
to avoid an overhead of raising and silencing an AttributeError. I believe most 
performance sensitive code in the core now uses it and will not be affected, 
but there is other code which silences it (_PyObject_LookupAttr itself silences 
an AttributeError raised in called functions), third-party code which uses 
PyObject_HasAttr or PyObject_GetAttr can be affected.

It might be simpler to implement it in sys.excepthook or sys.displayhook, but 
at that point we do not have attribute name and a reference to the object. 
There is an issues and a PEP about adding references to AttributeError. It 
could help to implement this feature.

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Slower (27):
- pathlib: 25.2 ms +- 0.4 ms -> 105 ms +- 2 ms: 4.18x slower (+318%)
- sympy_str: 315 ms +- 3 ms -> 500 ms +- 3 ms: 1.59x slower (+59%)
- sympy_sum: 203 ms +- 2 ms -> 286 ms +- 2 ms: 1.41x slower (+41%)
- sqlalchemy_imperative: 36.5 ms +- 0.9 ms -> 41.8 ms +- 0.8 ms: 1.14x slower 
(+14%)
- python_startup: 12.4 ms +- 0.1 ms -> 13.9 ms +- 0.0 ms: 1.12x slower (+12%)
- python_startup_no_site: 9.19 ms +- 0.04 ms -> 10.3 ms +- 0.0 ms: 1.12x slower 
(+12%)
- sympy_integrate: 24.9 ms +- 0.1 ms -> 27.6 ms +- 0.3 ms: 1.11x slower (+11%)
- scimark_sparse_mat_mult: 5.21 ms +- 0.05 ms -> 5.49 ms +- 0.06 ms: 1.05x 
slower (+5%)
- unpickle_list: 5.78 us +- 0.07 us -> 6.08 us +- 0.07 us: 1.05x slower (+5%)
- 2to3: 392 ms +- 2 ms -> 411 ms +- 10 ms: 1.05x slower (+5%)
- nbody: 155 ms +- 2 ms -> 160 ms +- 2 ms: 1.03x slower (+3%)
- scimark_fft: 423 ms +- 2 ms -> 432 ms +- 3 ms: 1.02x slower (+2%)
- float: 142 ms +- 2 ms -> 145 ms +- 2 ms: 1.02x slower (+2%)
- unpack_sequence: 68.6 ns +- 2.5 ns -> 69.9 ns +- 2.1 ns: 1.02x slower (+2%)
- pickle_list: 5.65 us +- 0.05 us -> 5.76 us +- 0.07 us: 1.02x slower (+2%)
- fannkuch: 569 ms +- 3 ms -> 579 ms +- 6 ms: 1.02x slower (+2%)
- xml_etree_parse: 196 ms +- 2 ms -> 199 ms +- 2 ms: 1.02x slower (+2%)
- sqlalchemy_declarative: 210 ms +- 2 ms -> 213 ms +- 3 ms: 1.01x slower (+1%)
- unpickle: 16.9 us +- 0.1 us -> 17.2 us +- 0.7 us: 1.01x slower (+1%)
- regex_effbot: 3.93 ms +- 0.12 ms -> 3.97 ms +- 0.04 ms: 1.01x slower (+1%)
- scimark_monte_carlo: 128 ms +- 2 ms -> 129 ms +- 2 ms: 1.01x slower (+1%)
- scimark_lu: 186 ms +- 5 ms -> 188 ms +- 6 ms: 1.01x slower (+1%)
- regex_dna: 272 ms +- 1 ms -> 274 ms +- 1 ms: 1.01x slower (+1%)
- xml_etree_iterparse: 130 ms +- 2 ms -> 131 ms +- 3 ms: 1.01x slower (+1%)
- genshi_xml: 74.3 ms +- 0.8 ms -> 74.8 ms +- 0.8 ms: 1.01x slower (+1%)
- regex_v8: 29.7 ms +- 0.3 ms -> 29.9 ms +- 0.2 ms: 1.01x slower (+1%)
- mako: 19.3 ms +- 0.3 ms -> 19.4 ms +- 0.2 ms: 1.01x slower (+1%)


The current approach is too expensive, so I'm closing PR 16850.

--

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Closing this.

Thanks, Dong-hee Na and everyone involved in the issue!

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread miss-islington


miss-islington  added the comment:


New changeset d73205d788a32148ba9a2beaa27badbd94ab65ff by Miss Islington (bot) 
in branch '3.8':
bpo-38525: Fix a segmentation fault when using reverse iterators of empty dict 
(GH-16846)
https://github.com/python/cpython/commit/d73205d788a32148ba9a2beaa27badbd94ab65ff


--
nosy: +miss-islington

___
Python tracker 

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



[issue38520] There is no proper way to know if a process is the main one

2019-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16401
pull_request: https://github.com/python/cpython/pull/16853

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 24dc2f8c56697f9ee51a4887cf0814b6600c1815 by Pablo Galindo 
(Dong-hee Na) in branch 'master':
bpo-38525: Fix a segmentation fault when using reverse iterators of empty dict 
(GH-16846)
https://github.com/python/cpython/commit/24dc2f8c56697f9ee51a4887cf0814b6600c1815


--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am running pyperformance to check the performance cost of this.

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Idea: we could only do this in interactive mode if we consider that is 
expensive enough.

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Ruby has it integrated into the core : https://bugs.ruby-lang.org/issues/11252 
. It was initially a gem that got merged into core.

> methosd
undefined local variable or method `methosd' for main:Object
Did you mean?  methods
   method
(repl):1:in `'

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am not super convinced that this is a great idea because it has some 
performance cost (although somewhat controlled) but I want to open a discussion.

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Batuhan


Change by Batuhan :


--
nosy: +james

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Batuhan


Batuhan  added the comment:

It already exists as a 3rd party module and it would be really cool to have 
this in core level.

https://github.com/dutc/didyoumean (by James Powell)

--
nosy: +BTaskaya

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +serhiy.storchaka, vstinner

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

PR 16850 shows an initial prototype for the idea

--

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue38530] Offer suggestions on AttributeError

2019-10-19 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

To improve the debugging experience in both interactive and non-interactive 
code, I propose to offer suggestions when attribute access fails. For example:

>>> class A: foo = None
... 
>>> A.fou
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: type object 'A' has no attribute 'fou'

Did you mean: foo?

This also applies to imports from modules and other situations:

>>> import collections
>>> collections.NamedTuple
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: module 'collections' has no attribute 'NamedTuple'

Did you mean: namedtuple?

--
components: Interpreter Core
messages: 354954
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Offer suggestions on AttributeError
type: enhancement
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



[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-10-19 Thread Ron Frederick


New submission from Ron Frederick :

In testing AsyncSSH against Python 3.8, I noticed a large number of the 
following errors, even though I was properly closing streams before the objects 
holding them were garbage-collected.

An open stream object is being garbage collected; call "stream.close()" 
explicitly.

After some investigation, the problem appears to be that closing a stream is 
not good enough to prevent the error. The check in asyncio doesn't properly 
handle the case where the stream is closing, but has not fully closed. Here's a 
simple test program that demonstrates this:

import asyncio

async def tcp_client():
reader, writer = await asyncio.open_connection('127.0.0.1', 22)

writer.close()

asyncio.run(tcp_client())

It's possible to avoid this message by awaiting on writer.wait_closed(), but 
wait_closed() doesn't exist until Python 3.7, making it very difficult to write 
portable code and still avoid this message.

--
components: asyncio
messages: 354953
nosy: Ron Frederick, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Python 3.8 improperly warns about closing properly closed streams
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue38528] Docs for 2.7 version switcher still shows 3.8 as pre

2019-10-19 Thread Ned Deily


Ned Deily  added the comment:

Thanks for thre report.  I overlooked 2.7 when updating the version switcher; 
the change will appear over the next 24 hours or so as the on-line docs get 
fully rebuilt.

> Also, 2.7 docs version switcher at the moment show `dev (3.9)` for 3.9 
> whereas the 3.8 docs say `3.9.0a0` can it be changed as well?

That's not quite accurate.  Only the 3.9 version of the documents show 3.9.0a0, 
not from any of the other versions; just as only the 3.8 version of the docs 
build shows 3.8.0 etc. That's an artifact of how the docs are built; we don't 
do anything to update the specific version.  Compare the version switchers for:

https://docs.python.org/3.7/
https://docs.python.org/3.8/
https://docs.python.org/3.9/

I don't that's worth trying to change.

> A PR (16848) has been opened now for the change for pre (3.8) to `3.8.0`.

No, it changes it to "3.8".  As noted above, only the 3.8 version of the docs 
when built will show the current 3.8.x release number.

--
nosy: +ned.deily
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



[issue38528] Docs for 2.7 version switcher still shows 3.8 as pre

2019-10-19 Thread Julin


Julin  added the comment:

A PR (16848) has been opened now for the change for pre (3.8) to `3.8.0`. Is 
the same acceptable for `3.9`?

--

___
Python tracker 

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



[issue38528] Docs for 2.7 version switcher still shows 3.8 as pre

2019-10-19 Thread Julin


New submission from Julin :

The version switcher in the docs for Python2.7 still shows version 3.8 as `pre 
(3.8)`. Can we change it to `3.8.0` to mirror that in docs of 3.8?

Also, 2.7 docs version switcher at the moment show `dev (3.9)` for 3.9 whereas 
the 3.8 docs say `3.9.0a0` can it be changed as well?

--
assignee: docs@python
components: Documentation
messages: 354950
nosy: docs@python, ju-sh
priority: normal
severity: normal
status: open
title: Docs for 2.7 version switcher still shows 3.8 as pre
versions: Python 2.7

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Inada Naoki


Inada Naoki  added the comment:

When dict is empty, di_pos of reverse iterator must be -1, not 0.
Additionally, di_pos must be initialized from ma_used when dict is key sharing 
dict.

diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 64876e0519..6c4b41700b 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -3452,10 +3452,15 @@ dictiter_new(PyDictObject *dict, PyTypeObject *itertype)
 di->di_dict = dict;
 di->di_used = dict->ma_used;
 di->len = dict->ma_used;
-if ((itertype == &PyDictRevIterKey_Type ||
- itertype == &PyDictRevIterItem_Type ||
- itertype == &PyDictRevIterValue_Type) && dict->ma_used) {
+if (itertype == &PyDictRevIterKey_Type ||
+itertype == &PyDictRevIterItem_Type ||
+itertype == &PyDictRevIterValue_Type) {
+if (dict->ma_values) {
+di->di_pos = dict->ma_used - 1;
+}
+else {
 di->di_pos = dict->ma_keys->dk_nentries - 1;
+}
 }
 else {

--

___
Python tracker 

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



[issue38514] pathlib's mkdir documentation improvement

2019-10-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pitrou

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

FYI

c = A(0, 1)
print(type(c.__dict__))
print(list(iter(c.__dict__)))
print(list(reversed(c.__dict__)))

works as we expected.

--

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

> The proposed fix fixes a crash, but there is other bug in iterating shared 
> dicts.

Yes, you are right.
But I can not work on this issue today.
(I have to finalize my paperwork by today :-()
since priority is critical if other core developers finalize this issue today. 
It will be okay for me.

--

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The proposed fix fixes a crash, but there is other bug in iterating shared 
dicts.

class A:
def __init__(self, x, y):
if x: self.x = x
if y: self.y = y

a = A(1, 2)
print(list(iter(a.__dict__)))
print(list(reversed(a.__dict__)))
b = A(1, 0)
print(list(iter(b.__dict__)))
print(list(reversed(b.__dict__)))

With PR 16846 the last print outputs [] instead of expected ['x']. It crashes 
without PR 16846, so this issue is not only about empty dicts.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

> Wops, we made a PR at the same time, Dong-hee Na.

lol

> I will close mine :)

Oh.. thank you for giving me a chance.

--

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Wops, we made a PR at the same time, Dong-hee Na.

I will close mine :)

--

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal, remi.lapeyre
priority: normal -> critical

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +16397
pull_request: https://github.com/python/cpython/pull/16847

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue33462] reversible dict

2019-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +16399
pull_request: https://github.com/python/cpython/pull/16847

___
Python tracker 

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



[issue30040] Speedup empty dict creation and reduce its memory usage

2019-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +16398
pull_request: https://github.com/python/cpython/pull/16847

___
Python tracker 

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



[issue38524] functools.cached_property is not supported for setattr

2019-10-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See issue38517.

For now we need to better document the use of __set_name__ with cached_property.

--

___
Python tracker 

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



[issue38524] functools.cached_property is not supported for setattr

2019-10-19 Thread hongweipeng


hongweipeng  added the comment:

Is it possible to add an attrname parameter? It is more convenient to use.

class cached_property:
def __init__(self, func, attrname=None):
self.attrname = attrname
...

cls.age3 = cached_property(age, 'age3')

--

___
Python tracker 

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



[issue38527] configure script fails to detect "float word ordering" on Solaris

2019-10-19 Thread Arnon Yaari


Change by Arnon Yaari :


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

___
Python tracker 

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



[issue38527] configure script fails to detect "float word ordering" on Solaris

2019-10-19 Thread Arnon Yaari


New submission from Arnon Yaari :

When running the configure script on Solaris SPARC (versions 10 and 11), the 
script fails with the following error:

checking whether float word ordering is bigendian... unknown
configure: error:

Unknown float word ordering. You need to manually preset
ax_cv_c_float_words_bigendian=no (or yes) according to your system.


The configure script uses "grep" on a compiled binary to see how a float 
variable is compiled. On Solaris, the regular "grep" command may be an old 
version that fails to search in a binary file. The correct command should be 
"ggrep" (the GNU grep).
Luckily, Python's configure script already finds this command in an earlier 
check:

checking for grep that handles long lines and -e... /usr/bin/ggrep

All we have to do, then, is use the command that configure finds. i.e. replace 
"grep" -> "$GREP".

--
components: Build
messages: 354941
nosy: wiggin15
priority: normal
severity: normal
status: open
title: configure script fails to detect "float word ordering" on Solaris
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

Can I take look at this issue?

--

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

>>> reversed({}.items())

>>> a = reversed({}.items())
>>> next(a)
Assertion failed: (value != NULL), function dictreviter_iternext, file 
Objects/dictobject.c, line 3834.
[1]4106 abort  ./python.exe

--

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

This issue is related to reversed dict iter.

>>> a = reversed({})
>>> next(a)
Assertion failed: (value != NULL), function dictreviter_iternext, file 
Objects/dictobject.c, line 3834.
[1]1366 abort  ./python.exe

--
nosy: +corona10

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue38526] zipfile.Path has the wrong method name

2019-10-19 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This looks like a valid issue to me. The docs were added with issue36832.

--
nosy: +jaraco, xtreak
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



[issue38501] multiprocessing.Pool hangs atexit (and garbage collection sometimes)

2019-10-19 Thread Caleb Hattingh


Change by Caleb Hattingh :


--
nosy: +cjrh

___
Python tracker 

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



[issue38526] zipfile.Path has the wrong method name

2019-10-19 Thread Alex Walters


New submission from Alex Walters :

https://docs.python.org/3.8/library/zipfile.html#zipfile.Path.listdir

The docs for zipfile.Path list a method named 'listdir', the closest 
approximation to the functionality described in the actual code is a method 
named 'iterdir'

--
assignee: docs@python
components: Documentation
messages: 354936
nosy: docs@python, tritium
priority: normal
severity: normal
status: open
title: zipfile.Path has the wrong method name
versions: Python 3.8

___
Python tracker 

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



[issue37285] Python 2.7 setup.py incorrectly double-joins SDKROOT

2019-10-19 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report and the PR (and sorry for the delay in responding).  
There were several problems with building on macOS without installed header 
files, which is no longer supported in the most recent Xcode / Command Line 
Tools releases, as well as a problem specific to 2.7 which caused such builds 
to not find the system zlib.  All of these issues were addressed in the changes 
for bpo-36231 (c421c66a58a6caae30f0679d7e61411418e67cec) and bpo-19960 
(da7f6dbbf52fe7074360a9eae918806da60139c5) which were merged to 2.7 a few 
months ago and are being released with 2.7.17. With these changes, the 
double-join problem your PR was correcting no longer occur.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Support builds on macOS without installed system header files

___
Python tracker 

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



[issue38524] functools.cached_property is not supported for setattr

2019-10-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

You have to call __set_name__() if you create a cached_property dynamically 
outside of the class namespace.

p = cached_property(age)
p.__set_name__(cls, 'age3')
cls.age3 = p

(And setattr() is not needed here.)

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue38524] functools.cached_property is not supported for setattr

2019-10-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +carljm, ncoghlan

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report, by the way!

--

___
Python tracker 

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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Ned Deily


Ned Deily  added the comment:

Outside of IDLE, the example causes a segfault.  With debug build of current 
master HEAD:

Assertion failed: (value != NULL), function dictreviter_iternext, file 
../../source/Objects/dictobject.c, line 3834.

if (d->ma_values) {
if (i < 0) {
goto fail;
}
key = DK_ENTRIES(k)[i].me_key;
value = d->ma_values[i];
assert (value != NULL);
}

--
nosy: +inada.naoki, ned.deily
type: behavior -> crash
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



[issue38525] Strange reversed dict behavior

2019-10-19 Thread Ivan Bykov


New submission from Ivan Bykov :

Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> list(reversed({1: 1}))
[1]
>>> list(reversed({}))

 RESTART: Shell 
>>>

--
components: Interpreter Core
messages: 354931
nosy: ivb
priority: normal
severity: normal
status: open
title: Strange reversed dict behavior
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue38524] functools.cached_property is not supported for setattr

2019-10-19 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

The documentation doesn't mention ``__set_name__``, but it does say that 
cached_property is useful for properties which are "effectively immutable".

The ``__set_name__`` error message is pretty cryptic, that seems to have 
something to do with this PEP:

https://www.python.org/dev/peps/pep-0487/

but why it is relevant here, I don't know. I would expect that cached_property 
should apply only to read-only properties.

So I think that at the very least, this needs better documentation and a better 
error message.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, steven.daprano

___
Python tracker 

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



[issue38524] functools.cached_property is not supported for setattr

2019-10-19 Thread hongweipeng


New submission from hongweipeng :

```
from functools import cached_property
def age(self):
return 10
class A:
def __init__(self):
setattr(self.__class__, 'age', property(age))
setattr(self.__class__, 'age3', cached_property(age))

age2 = cached_property(age)

a = A()
print(a.age)# 10
print(a.age2)   # 10
print(a.age3)   # TypeError: Cannot use cached_property instance without 
calling __set_name__
```
Is it expected?

--
messages: 354929
nosy: hongweipeng
priority: normal
severity: normal
status: open
title: functools.cached_property is not supported for setattr
versions: Python 3.8

___
Python tracker 

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