[issue46175] Zero argument super() does not function properly inside generator expressions

2021-12-25 Thread TobiasHT


TobiasHT  added the comment:

I'm not so sure, but I think this characteristic was carried from python 2. I 
guess it's not well documented because they assumed that people would carry on 
the knowledge to python 3. To be on the safe side, I always pass the arguments 
to super.

https://docs.python.org/2/library/functions.html#super

--
nosy: +TobiasHT

___
Python tracker 

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



recover pickled data: pickle data was truncated

2021-12-25 Thread iMath
Normally, the shelve data should be read and write by only one process at a 
time, but unfortunately it was simultaneously read and write by two processes, 
thus corrupted it. Is there any way to recover all data in it ? Currently I 
just get "pickle data was truncated" exception after reading a portion of the 
data?

Data and code here 
:https://drive.google.com/file/d/137nJFc1TvOge88EjzhnFX9bXg6vd0RYQ/view?usp=sharing
-- 
https://mail.python.org/mailman/listinfo/python-list


Uninstall old python version(Python 3.9.7)

2021-12-25 Thread Công Huy
   I uninstalled Python 3.9.7 but I can't delete completely. And I received a
   notification "no Python 3.9 was detected". Of course, it won't be an issue
   if it defaulted my python version on my computer and it makes me can't use
   some libraries I installed before like numpy, matplotlib and network to
   solve my homework. I don't know how to fix it. Help me, please.



   Sent from [1]Mail for Windows



References

   Visible links
   1. https://go.microsoft.com/fwlink/?LinkId=550986
-- 
https://mail.python.org/mailman/listinfo/python-list


Uninstall old python version(Python 3.9.7)

2021-12-25 Thread Công Huy
   I had uninstalled Python 3.9.7 before but it wasn't uninstalled
   completely. I found it still in my computer and when I click "uninstall",
   it sent me a board "No Python 3.9 installation was detected". Of course,
   it won't be an issue if it defaulted my main Python version on my computer
   and I can't use some libraries I installed like numpy, matplotlib,
   networkx,... To solve my python homework. I found some help on the
   internet but it wasn't improved. I don't know how to fix it. Please help
   me.



   Thanks and Regards,

   Cong Huy



   Sent from [1]Mail for Windows



References

   Visible links
   1. https://go.microsoft.com/fwlink/?LinkId=550986
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue978604] wait_variable hangs at exit

2021-12-25 Thread Daniel Diniz


Daniel Diniz  added the comment:

Confirmed on Python 3.11.0a3+, assuming older versions also affected. This 
issue has different versions of tests to confirm it, but I think not in a test 
suite-friendly format yet.

There's also a patch and detailed analysis by gpolo indicating that it might 
need editing _tkinter.c to handle fallout from his proposed Python-side patch.

--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3

___
Python tracker 

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



Re: Isn't TypeError built in?

2021-12-25 Thread Mike Dewhirst via Python-list
Thanks Peter ... the problem was all mine.Can't quite remember what it was 
exactly but I introduced a bug in my own code and it manifested down there in 
the bowels of the snake.I suppose that indicates a possible kink to be ironed 
out and if that interests you I am happy to retrace my steps and describe 
it.Fyi, there was nothing out of kilter in the machine. It was in production 
and is stable.CheersMike--(Unsigned mail from my phone)
 Original message From: "Peter J. Holzer"  
Date: 26/12/21  06:19  (GMT+10:00) To: python-list@python.org Subject: Re: 
Isn't TypeError built in? On 2021-12-13 12:22:28 +1100, Mike Dewhirst via 
Python-list wrote:> Obviously something is wrong elsewhere but I'm not sure 
where to look.> Ubuntu 20.04 with plenty of RAM.[...]> [Mon Dec 13 
01:15:49.885659 2021] [mpm_event:notice] [pid 1033:tid> 140446449658944] 
AH00489: Apache/2.4.41 (Ubuntu) SVN/1.13.0 OpenSSL/1.1.1f> mod_wsgi/4.6.8 
Python/3.8 configured -- resuming normal operations> [Mon Dec 13 
01:15:49.885664 2021] [core:notice] [pid 1033:tid> 140446449658944] AH00094: 
Command line: '/usr/sbin/apache2'> Exception ignored in: > Traceback (most recent call last):>   File 
"/usr/local/lib/python3.8/dist-packages/asgiref/local.py", line 96,> in 
__del__> NameError: name 'TypeError' is not definedDid you upgrade the OS 
recently and do you use virtual environents withmod_wsgi?"Impossible" errors 
like the above are common when the virtualenvironment was built with a 
different (older) version of the Pythoninterpreter than the one trying to use 
it. Nuking and rebuilding thevirtual environment is usually the quickest way to 
fix it.    hp--    _  | Peter J. Holzer    | Story must make more sense 
than reality.|_|_) |    || |   | h...@hjp.at |    -- 
Charles Stross, "Creative writing__/   | http://www.hjp.at/ |   
challenge!"-- https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue42259] pprint: infinite recursion for saferepr() when using nested objects, but str() works

2021-12-25 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

The recursion protection in `saferepr` applies when two conditions are met: 

- the structure is subclassed from list, tuple or dict
- __repr__ is not overriden

In this case neither condition is met.

However, the recursion is caused by the `__repr__` so when it's removed, 
recursion doesn't happen (but not due to recursion protection).

Btw also note that recursive path must be continuous for recursion detection to 
apply, e.g. if it's list[cust_obj[list[cust_obj...]]], detection also won't 
work.

I don't think we can fix this in code in a straightforward way, because  we 
want to avoid recursively calling saferepr in case __repr__ does not recurse.

In other words, if we knew __repr__ DOES recurse, we could call saferepr 
recursively and apply recursion detection without any problems, but __repr__ 
might intentionally say something like "", and then 
recursively calling saferepr would be undesirable.

So unfortunately we lose the recursion detection because of that.

One possible option would be to add an optional param like *force_recursion*, 
to recurse with detection even on overridden *__repr__*. I'm not sure it's 
worth it. But that's something users can consider: subclass PrettyPrinter and 
override saferepr() and either remove the checks for __repr__ override or add a 
param to do just that.

Current docs really make it sound like any recursion that shows up in repr() 
will be protected; it's really much more limited than that. Adding PR to 
clarify the limitations.

--
versions: +Python 3.11 -Python 3.8

___
Python tracker 

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



[issue42259] pprint: infinite recursion for saferepr() when using nested objects, but str() works

2021-12-25 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
keywords: +patch
nosy: +andrei.avk
nosy_count: 2.0 -> 3.0
pull_requests: +28477
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30256

___
Python tracker 

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



Re: email.message_from_file & quoted printable

2021-12-25 Thread Skip Montanaro
> That sometimes you want the raw content as it was in the file? That if
> you have that choice (decoded or raw) the default should be False, as it
> does less?

Yeah, thinking back later, the round-trip possibility seemed plausible.
I'll stop overthinking this now...

> That we my _first_ instinct - I've never used get_payload(), myself, and
> I've written my own complete mailfiler :-)

I'm only trying to display email through a web browser, possibly with a
link to the raw message.


> Really, if a function isn't doing what you want you should always read
> the docs for that function specificly, even if you don't want to read
> the entire module docs (which is a big ask).

Yeah, my mental model was simply off. I frequently pull up docs in my
browser. I was thinking the message contents would be normalized when
reading. It didn't occur to me the transformation would occur on the way
out.

I think another way I might have saved myself was if I was using a modern
IDE where I might have gotten some hints hovering over the method call.
But, I'm an End user. I'm sure there is some add-on package I could
install, but I haven't looked.

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue46177] can't install launcher for all users

2021-12-25 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Try right-clicking the installer and choosing "run as administrator". Then 
hopefully that checkbox should be available.

It's not enough to be logged in as an admin, you also have to run this 
particular program with admin permissions.

--
nosy: +Dennis Sweeney

___
Python tracker 

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



Re: Isn't TypeError built in?

2021-12-25 Thread Peter J. Holzer
On 2021-12-13 12:22:28 +1100, Mike Dewhirst via Python-list wrote:
> Obviously something is wrong elsewhere but I'm not sure where to look.
> Ubuntu 20.04 with plenty of RAM.
[...]
> [Mon Dec 13 01:15:49.885659 2021] [mpm_event:notice] [pid 1033:tid
> 140446449658944] AH00489: Apache/2.4.41 (Ubuntu) SVN/1.13.0 OpenSSL/1.1.1f
> mod_wsgi/4.6.8 Python/3.8 configured -- resuming normal operations
> [Mon Dec 13 01:15:49.885664 2021] [core:notice] [pid 1033:tid
> 140446449658944] AH00094: Command line: '/usr/sbin/apache2'
> Exception ignored in: 
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.8/dist-packages/asgiref/local.py", line 96,
> in __del__
> NameError: name 'TypeError' is not defined

Did you upgrade the OS recently and do you use virtual environents with
mod_wsgi?

"Impossible" errors like the above are common when the virtual
environment was built with a different (older) version of the Python
interpreter than the one trying to use it. Nuking and rebuilding the
virtual environment is usually the quickest way to fix it.

hp

-- 
   _  | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| |   | h...@hjp.at |-- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |   challenge!"


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue46177] can't install launcher for all users

2021-12-25 Thread Amine Harrabi


Amine Harrabi  added the comment:

the install launcher for all users is grayed out although im logged in as admin
windows 10 64bit

--
Added file: https://bugs.python.org/file50521/Annotation 2021-12-25 165843.png

___
Python tracker 

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



[issue46177] can't install launcher for all users

2021-12-25 Thread Amine Harrabi


Change by Amine Harrabi :


Added file: https://bugs.python.org/file50520/Annotation 2021-12-25 165843.png

___
Python tracker 

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



[issue46177] can't install launcher for all users

2021-12-25 Thread Amine Harrabi


Change by Amine Harrabi :


--
type:  -> behavior

___
Python tracker 

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



[issue46177] can't install launcher for all users

2021-12-25 Thread Amine Harrabi


New submission from Amine Harrabi :

the install launcher for all users is grayed out although im logged in as admin

--
components: Windows
messages: 409173
nosy: Amine, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: can't install launcher for all users
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



[issue46173] Clarify conditions under which float(x) with large x raises OverflowError

2021-12-25 Thread Mark Dickinson


Mark Dickinson  added the comment:

Changing to a documentation issue.

--
assignee:  -> docs@python
components: +Documentation -Interpreter Core
nosy: +docs@python
resolution: not a bug -> 
title: float(x) with large x not raise OverflowError -> Clarify conditions 
under which float(x) with large x raises OverflowError
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



[issue46175] Zero argument super() does not function properly inside generator expressions

2021-12-25 Thread Carlos Damazio


Carlos Damazio  added the comment:

By explicitly sending a type and object to the super function, it should work 
as usual, like in the file that I've just sent. I've seen this behavior before, 
it's related to Python's module reload function, which returns a new reference 
to the reloaded module. This issue is not widely known though, should be 
documented.

--
nosy: +carlosdamazio
Added file: https://bugs.python.org/file50519/superbug-fixd.py

___
Python tracker 

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



[issue46032] functools' singledispatch does not support GenericAlias

2021-12-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 03c7449fbc7c57f5e0365f234a0b65c1dde763f2 by Serhiy Storchaka in 
branch '3.10':
[3.10] bpo-46032: Check types in singledispatch's register() at declaration 
time (GH-30050) (GH-30254)
https://github.com/python/cpython/commit/03c7449fbc7c57f5e0365f234a0b65c1dde763f2


--

___
Python tracker 

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



[issue46032] functools' singledispatch does not support GenericAlias

2021-12-25 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue46032] functools' singledispatch does not support GenericAlias

2021-12-25 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +28475
pull_request: https://github.com/python/cpython/pull/30254

___
Python tracker 

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



[issue46032] functools' singledispatch does not support GenericAlias

2021-12-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 078abb676cf759b1e960f78390b6e80f256f0255 by Serhiy Storchaka in 
branch 'main':
bpo-46032: Check types in singledispatch's register() at declaration time 
(GH-30050)
https://github.com/python/cpython/commit/078abb676cf759b1e960f78390b6e80f256f0255


--

___
Python tracker 

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



[issue40296] help(list[int]) fails

2021-12-25 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue46176] mmap module add MAP_STACK constant mostly for OpenBSD

2021-12-25 Thread David CARLIER


Change by David CARLIER :


--
components: Library (Lib)
nosy: devnexen
priority: normal
pull_requests: 28473
severity: normal
status: open
title: mmap module add MAP_STACK constant mostly for OpenBSD
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



[issue4079] urllib.request.Request 'timeout' attribute needs to have a default

2021-12-25 Thread Alex Waygood


Change by Alex Waygood :


--
title: urllib.requst.Request 'timeout' attribute needs to have a default -> 
urllib.request.Request 'timeout' attribute needs to have a default

___
Python tracker 

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



[Python-announce] PyCon India 2021 videos are available now.

2021-12-25 Thread Chandan Kumar
Hello,

Thank you all for attending PyCon India 2021 online.

The PyCon India 2021 online videos are available now.
Here is the playlist link for all videos:
https://www.youtube.com/playlist?list=PL6GW05BfqWIcKgvP3KsQKYsDm8tLJapVW

and Keynote playlist link:
https://www.youtube.com/playlist?list=PL6GW05BfqWIerlriJKq-o5aKB4luR3xkN

Keep watching, Happy Holidays and see you all in the next edition of
PyCon India :-)

Thanks,

Chandan Kumar
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[issue46175] Zero argument super() does not function properly inside generator expressions

2021-12-25 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



[issue46172] [doc] Outdated description of `license` object

2021-12-25 Thread CCXXXI


CCXXXI  added the comment:

3.10.1 packaged by conda-forge on Windows. Maybe the behavior is changed by 
conda-forge.

```
from sys import version

print(version)
print(license)
license()
```

```
3.10.1 | packaged by conda-forge | (main, Dec 22 2021, 01:34:40) [MSC v.1929 64 
bit (AMD64)]
See https://www.python.org/psf/license/
See https://www.python.org/psf/license/
```

--

___
Python tracker 

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