[issue44140] WeakKeyDictionary should support lookup by id instead of hash

2021-06-23 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Josh: thanks for the explanation, this makes sense.

--

___
Python tracker 

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



[issue44140] WeakKeyDictionary should support lookup by id instead of hash

2021-06-23 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Andrei: If designed appropriately, a weakref callback attached to the actual 
object would delete the associated ID from the dictionary when the object was 
being deleted to avoid that problem. That's basically how WeakKeyDictionary 
works already; it doesn't store the object itself (if it did, that strong 
reference could never be deleted), it just stores a weak reference for it that 
ensures that when the real object is deleted, a callback removes the weak 
reference from the WeakKeyDictionary; this just adds another layer to that work.

I don't think this would make sense as a mere argument to WeakKeyDictionary; 
the implementation would differ significantly, and probably deserves a separate 
class.

--
nosy: +josh.r

___
Python tracker 

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



[issue44470] 3.11 docs.python.org in Polish not English?

2021-06-23 Thread Josh Rosenberg

Josh Rosenberg  added the comment:

I just visited the link, and it's now *mostly* English, but with random bits of 
Korean in it (mostly in links and section headers).

The first warning block for instance begins:

경고: The parser module is deprecated...

Then a few paragraphs later I'm told:

For full information on the language syntax, refer to 파이썬 언어 레퍼런스.

where the Korean is a hyperlink to the Python Language Reference. Very strange.

--
nosy: +josh.r

___
Python tracker 

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



[issue44452] Allow paths to be joined without worrying about a leading slash

2021-06-23 Thread Eric V. Smith


Eric V. Smith  added the comment:

You should bring this up on the python-ideas mailing list if you want some 
discussion.

--
nosy: +eric.smith

___
Python tracker 

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



Re: creating raw AWS log event

2021-06-23 Thread Larry Martell
On Wed, Jun 23, 2021 at 7:05 PM Dennis Lee Bieber  wrote:
>
> On Wed, 23 Jun 2021 10:42:42 -0700, Larry Martell 
> declaimed the following:
>
> >def _decode(data):
> >compressed_payload = b64decode(data)
> >json_payload = zlib.decompress(compressed_payload, 16+zlib.MAX_WBITS)
> >return json.loads(json_payload)
> >
>
> >message  = b'test message'
> >compressed= zlib.compress(message)
> >event['awslogs']['data'] = str(compressed)
>
> Where do you perform a B64 ENCODE operation?
>
> str() doesn't do that, it just converts the argument to a string which
> may mean using escapes for non-printable bytes. B64 converts everything to
> printable characters.

Copy/paste fail. This is actually the code I tried:

message = b'test message'
compressed= zlib.compress(message)
encoded = b64encode(compressed)
event['awslogs']['data'] = str(encoded)
message = _decode(json.dumps(event['awslogs']['data']))
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Optimizing Small Python Code

2021-06-23 Thread Avi Gross via Python-list
Yes, I agree that if you do not need to show your work to a human, then the
problem specified could be solved beforeand and a simple print statement
would suffice.

Ideally you want to make a problem harder such as by specifying an N that
varies then testing it with an arbitrary N.

But I suggest the item below is not minimal. You can store the printout more
compactly as the only symbols out put are tabs, newlines and seven digits.
If your language supported some function that expanded a binary string that
used say 4 bytes per symbol so it could be printed, or accepted a compressed
form of the string and uncompressed it, you might have code like:

print(unzip("n*n&!~se"))

-Original Message-
From: Python-list  On
Behalf Of Michael F. Stemper
Sent: Wednesday, June 23, 2021 10:23 AM
To: python-list@python.org
Subject: Re: Optimizing Small Python Code

On 23/06/2021 08.17, Stefan Ram wrote:
> "Avi Gross"  writes:
>> This can be made a one-liner too! LOL!
> 
> print( '1\n  0\n2\n  0\n  1\n3\n  0\n  1\n  2\n4\n
0\n  1\n  2\n  3\n5\n  0\n  1\n  2\n  3\n
4\n6\n  0\n  1\n  2\n  3\n  4\n  5\n' )

Unless I'm figuring ot wrong, you just took it from O(n^2) to O(1). That
deserves a Turing award or something.

--
Michael F. Stemper
You can lead a horse to water, but you can't make him talk like Mr. Ed by
rubbing peanut butter on his gums.
--
https://mail.python.org/mailman/listinfo/python-list

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


NumPy 1.21.0 release

2021-06-23 Thread Charles R Harris
Hi All,

On behalf of the NumPy team I am pleased to announce the release of NumPy
1.21.0. The highlights are


   - continued SIMD work covering more functions and platforms,
   - initial work on the new dtype infrastructure and casting,
   - universal2 wheels for Python 3.8 and Python 3.9 on Mac,
   - improved documentation,
   - improved annotations,
   - new ``PCG64DXSM`` bitgenerator for random numbers.


This NumPy release is the result of 581 merged pull requests contributed by
175 people. The Python versions supported for this release are 3.7-3.9,
support for Python 3.10 will be added after Python 3.10 is released. Wheels
can be downloaded from PyPI ; source
archives, release notes, and wheel hashes are available on Github
. Linux users will
need pip >= 0.19.3 in order to install manylinux2010 and manylinux2014
wheels.

*Contributors*

A total of 175 people contributed to this release.  People with a "+" by
their
names contributed a patch for the first time.


   - @8bitmp3 +
   - @DWesl +
   - @Endolith
   - @Illviljan +
   - @Lbogula +
   - @Lisa +
   - @Patrick +
   - @Scian +
   - @h-vetinari +
   - @h6197627 +
   - @jbCodeHub +
   - @legoffant +
   - @sfolje0 +
   - @tautaus +
   - @yetanothercheer +
   - Abhay Raghuvanshi +
   - Adrian Price-Whelan +
   - Aerik Pawson +
   - Agbonze Osazuwa +
   - Aitik Gupta +
   - Al-Baraa El-Hag
   - Alex Henrie
   - Alexander Hunt +
   - Alizé Papp +
   - Allan Haldane
   - Amarnath1904 +
   - Amrit Krishnan +
   - Andras Deak
   - AngelGris +
   - Anne Archibald
   - Anthony Vo +
   - Antony Lee
   - Atharva-Vidwans +
   - Ayush Verma +
   - Bas van Beek
   - Bharat Raghunathan
   - Bhargav V +
   - Brian Soto
   - Carl Michal +
   - Charles Harris
   - Charles Stern +
   - Chiara Marmo +
   - Chris Barnes +
   - Chris Vavaliaris
   - Christina Hedges +
   - Christoph Gohlke
   - Christopher Dahlin +
   - Christos Efstathiou +
   - Chunlin Fang
   - Constanza Fierro +
   - Daniel Evans +
   - Daniel Montes +
   - Dario Mory +
   - David Carlier +
   - David Stansby
   - Deepyaman Datta +
   - Derek Homeier
   - Dong Keun Oh +
   - Dylan Cutler +
   - Eric Larson
   - Eric Wieser
   - Eva Jau +
   - Evgeni Burovski
   - FX Coudert +
   - Faris A Chugthai +
   - Filip Ter +
   - Filip Trojan +
   - François Le Lay +
   - Ganesh Kathiresan
   - Giannis Zapantis +
   - Giulio Procopio +
   - Greg Lucas +
   - Hollow Man +
   - Holly Corbett +
   - I-Shen Leong +
   - Inessa Pawson
   - Isabela Presedo-Floyd
   - Ismael Jimenez +
   - Isuru Fernando
   - Jakob Jakobson
   - James Gerity +
   - Jamie Macey +
   - Jasmin Classen +
   - Jody Klymak +
   - Joseph Fox-Rabinovitz
   - Jérome Eertmans +
   - Jérôme Kieffer +
   - Kamil Choudhury +
   - Kasia Leszek +
   - Keller Meier +
   - Kenichi Maehashi
   - Kevin Sheppard
   - Kulin Seth +
   - Kumud Lakara +
   - Laura Kopf +
   - Laura Martens +
   - Leo Singer +
   - Leonardus Chen +
   - Lima Tango +
   - Lumir Balhar +
   - Maia Kaplan +
   - Mainak Debnath +
   - Marco Aurélio da Costa +
   - Marta Lemanczyk +
   - Marten van Kerkwijk
   - Mary Conley +
   - Marysia Winkels +
   - Mateusz Sokół +
   - Matt Haberland
   - Matt Hall +
   - Matt Ord +
   - Matthew Badin +
   - Matthias Bussonnier
   - Matthias Geier
   - Matti Picus
   - Matías Ríos +
   - Maxim Belkin +
   - Melissa Weber Mendonça
   - Meltem Eren Copur +
   - Michael Dubravski +
   - Michael Lamparski
   - Michal W. Tarnowski +
   - Michał Górny +
   - Mike Boyle +
   - Mike Toews
   - Misal Raj +
   - Mitchell Faas +
   - Mukulikaa Parhari +
   - Neil Girdhar +
   - Nicholas McKibben +
   - Nico Schlömer
   - Nicolas Hug +
   - Nilo Kruchelski +
   - Nirjas Jakilim +
   - Ohad Ravid +
   - Olivier Grisel
   - Pamphile ROY +
   - Panos Mavrogiorgos +
   - Patrick T. Komiske III +
   - Pearu Peterson
   - Peter Hawkins +
   - Raghuveer Devulapalli
   - Ralf Gommers
   - Raúl Montón Pinillos +
   - Rin Arakaki +
   - Robert Kern
   - Rohit Sanjay
   - Roman Yurchak
   - Ronan Lamy
   - Ross Barnowski
   - Ryan C Cooper
   - Ryan Polley +
   - Ryan Soklaski
   - Sabrina Simao +
   - Sayed Adel
   - Sebastian Berg
   - Shen Zhou +
   - Stefan van der Walt
   - Sylwester Arabas +
   - Takanori Hirano
   - Tania Allard +
   - Thomas J. Fan +
   - Thomas Orgis +
   - Tim Hoffmann
   - Tomoki, Karatsu +
   - Tong Zou +
   - Touqir Sajed +
   - Tyler Reddy
   - Wansoo Kim
   - Warren Weckesser
   - Weh Andreas +
   - Yang Hau
   - Yashasvi Misra +
   - Zolboo Erdenebaatar +
   - Zolisa Bleki


Cheers,

Charles Harris
___
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


[issue43988] Add test.support.check_disallow_instantiation()

2021-06-23 Thread miss-islington


miss-islington  added the comment:


New changeset 0a3452e7cf00c51ab1af0f674b670520b09f0e39 by Erlend Egeberg 
Aasland in branch '3.10':
[3.10] bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757) 
(GH-26885)
https://github.com/python/cpython/commit/0a3452e7cf00c51ab1af0f674b670520b09f0e39


--
nosy: +miss-islington

___
Python tracker 

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



[issue43553] [sqlite3] Improve test coverage

2021-06-23 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +25464
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26886

___
Python tracker 

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



[issue43988] Add test.support.check_disallow_instantiation()

2021-06-23 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
resolution: fixed -> 
status: closed -> open
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



[issue43988] Add test.support.check_disallow_instantiation()

2021-06-23 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +25463
pull_request: https://github.com/python/cpython/pull/26885

___
Python tracker 

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



[issue42514] Relocatable framework for macOS

2021-06-23 Thread Greg Neagle


Greg Neagle  added the comment:

While checking this issue hoping there might be updates, I realized that I 
didn't share a link to the script I use to convert python.org's Python 
framework into one that can be relocated.

It's here: https://github.com/gregneagle/relocatable-python

--

___
Python tracker 

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



[issue44498] add deprecation warnings for asynchat, asyncore and smtpd

2021-06-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> but only whether to issue the warning in 3.10 or 3.11. Is that correct?

Correct. It can also be mentioned in a more general message as long as people 
know that this is the plan and they have a chance to voice any concern to start 
on 3.10

--

___
Python tracker 

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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-06-23 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +25462
pull_request: https://github.com/python/cpython/pull/26884

___
Python tracker 

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



[issue44501] Packing constant call arguments

2021-06-23 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

Here is my branch for the reference (I didn't worked on about it much, so still 
lacks some error handling etc); 
https://github.com/isidentical/cpython/blob/b556d1172b08c65b88093f7ff1dadc985ce72f62/Python/ast_opt.c#L634-L698

--

___
Python tracker 

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



[issue44501] Packing constant call arguments

2021-06-23 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> I already experimented with this in issue33325. It does not worth an effort.

Yea, that is what the results for the CFG optimization shows to me (1.13x at 
best, ~1.03x in real cases). 

> For optimizing calls with constant arguments, it looks more interesting. Do 
> you have any statistic about what percentage of calls is with constant 
> arguments, what is the average number of constant arguments, what are 
> microbenchmark results in debug mode for the average number of constant 
> arguments? Please test for trivial Python function with variable and fixed 
> number of parameters.

Okay, addressing multiple points here (with the common dataset of a couple 
thousand pypi projects)

>> Do you have any statistic about what percentage of calls is with constant 
>> arguments

Since calls are the most common operation (?) in the language, the percentage 
might seem low since the total number is just absurd: 0.684083857563% 
(96170/14058218) of all calls are made with positional only constant arguments 
(LEN(args) >= 3, not including 1 or 2 arguments). 

>> what is the average number of constant arguments


> stats = {3: 69533, 4: 10867, 5: 9071, 6: 4323, 7: 1504, 8: 252, 9: 167, ...}
> np.average(list(stats.keys()), weights=list(stats.values()))
> 3.5765623375272955

points me out the result of 3.57 arguments, which is rounded to 4.

>> what are microbenchmark results in debug mode for the average number of 
>> constant arguments?

-s 'f = lambda *s: None' 'f(1,2,3,4)'
3  arguments: 1.01x faster
4  arguments: 1.05x faster
5  arguments: 1.08x faster
6  arguments: 1.11x faster
7  arguments: 1.13x faster
8  arguments: 1.16x faster
9  arguments: 1.30x faster
10 arguments: 1.32x faster

(there seems to be something special about 9, since it breaks the chart about 
the speedups)

An interesting (and potentially something related to the nature of 
datetime.datetime being implemented in C) benchmark is that instead of calling 
an empty python function, if we switch to datetime.datetime the early speed-up 
goes 1.13x for even 3 arguments!

-s 'from datetime import datetime' 'datetime(1,2,3)'

3 arguments: 1.13x faster
4 arguments: 1.15x faster
5 arguments: 1.16x faster
6 arguments: 1.17x faster
7 arguments: 1.20x faster

Another really good example is re.match().group() (I assume this is also 
implemented in C, so some sort of CALL_FUNCTION_EX magic)

-s 'import re; group = re.match("(a)(a)(a)(a)(a)(a)(a)(a)", "a" * 8).group' 
'group(0,1,2)'

3 arguments: 1.25x faster (seems to be the general speed-up)
4 arguments: 1.26x faster
5 arguments: 1.24x faster
6 arguments: 1.23x faster
7 arguments: 1.24x faster
8 arguments: 1.24x faster
9 arguments: 1.27x faster

These all can be verified by simply running the same code but wrapping all 
arguments as a tuple and expanding them (generates the same code) (e.g: -s 
'import re; group = re.match("(a)(a)(a)(a)(a)(a)(a)(a)", "a" * 8).group' 
'group(*(0,1,2,3,4,5,6,7,8))' would perform as fast as the optimized one) 

>> Please test for trivial Python function with variable and fixed number of 
>> parameters.

I already shared the variable one, so this is the results for a fixed one;

-s 'def foo(a, b, c): pass' 'foo(1,2,3)'

3 arguments: 1.03x faster
4 arguments: 1.07x faster
5 arguments: 1.10x faster
6 arguments: 1.13x faster
7 arguments: 1.17x faster
8 arguments: 1.20x faster
9 arguments: 1.36x faster (consistent with the other jump)

Here is the list of functions that I've found to be called with only constant 
arguments (very raw!): 
https://gist.github.com/isidentical/099da256f2a46d13cef8570e839a2cea

Overall I believe it shows a great improvement for little-to-none change on the 
codebase (especially for C-level functions).

--

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-06-23 Thread Zachary Ware


Change by Zachary Ware :


--
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-06-23 Thread Jack DeVries


Change by Jack DeVries :


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

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-06-23 Thread Jack DeVries


Jack DeVries  added the comment:

Hi All,

As I wrote on the PR::

I am picking up the torch on 39452, continuing where @maggyero left 
off, and also implementing my discourse proposal, which seemed to be 
well-liked.

Feel free to leave any feedback for me on the GitHub PR, I'm looking forward to 
continuing to develop this work based on community feedback.

--

___
Python tracker 

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



[issue39452] Improve the __main__ module documentation

2021-06-23 Thread Jack DeVries


Change by Jack DeVries :


--
keywords: +patch
nosy: +jack__d
nosy_count: 6.0 -> 7.0
pull_requests: +25460
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/26883

___
Python tracker 

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



[issue44494] Overhaul of Doc/library/__main__.rst

2021-06-23 Thread Jack DeVries


Change by Jack DeVries :


--
pull_requests: +25461
pull_request: https://github.com/python/cpython/pull/26883

___
Python tracker 

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



[issue43564] ftp tests in test_urllib2net should skip on unreachable network

2021-06-23 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue44498] add deprecation warnings for asynchat, asyncore and smtpd

2021-06-23 Thread Irit Katriel


Irit Katriel  added the comment:

Pablo, to be clear - my understanding is that the question to python-dev is not 
whether to deprecate or not (they have been deprecated for a long time), but 
only whether to issue the warning in 3.10 or 3.11. Is that correct?

--

___
Python tracker 

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



[issue44229] test_ssl: test_get_server_certificate() and test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

2021-06-23 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

See also bpo-33450.

--

___
Python tracker 

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



Re: Uninstall and Re-install Python - Windows 10 issues

2021-06-23 Thread Mats Wichmann

On 6/23/21 6:47 AM, Suretha Weweje wrote:

After I uninstalled Python 3.7and Python 3.9 and installed Python 3.9.5 and
is displayed in Apps & features:

Python 3.9.5 Python 3.9.5 (64-bit), size 101 MB, and
Python Launcher, size 1.80 MB

Upon checking the python version, I get the following error message:
C:\>python --version
Python was not found; run without arguments to install from the Microsoft
Store, or disable this shortcut from Settings > Manage App Execution
Aliases.

In the Start Menu, Python 3.9 shortcut is present, and when I click on that
it takes me to Python 3.9(64-bit) CMD.  Just to test, I add a print
statement.

Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

print("This is Tuesday")

This is Tuesday




In other words, your Python installation is working fine. So what's the 
problem?




Can someone kindly assist or direct me to where I can find a solution


python itself isn't normally in the path.  this is in common with every 
app you install on Windows, where they all go to their own place. some 
installers force-add their path to the environment, Python gives you a 
choice, which you can go back to the installer to activate. More 
commonly, if you use the python.org installer, you also install the 
Python Launcher which helps with a variety of problems, in particular 
with making sense  of when you have multiple Python versions installed. 
If you installed that, launch Python by typing "py" (rather than "python").


See here for some more reading:

https://docs.python.org/3/using/windows.html

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


Re: Uninstall and Re-install Python - Windows 10 issues

2021-06-23 Thread boB Stepp
Disclaimer:  I am no Python or programming expert!  However, I
recently installed Python 3.9.5 on my Windows 10 laptop, so I may be
able to help with some things.

On Wed, Jun 23, 2021 at 11:29 AM Suretha Weweje  wrote:
>
> After I uninstalled Python 3.7and Python 3.9 and installed Python 3.9.5 and
> is displayed in Apps & features:
>
> Python 3.9.5 Python 3.9.5 (64-bit), size 101 MB, and
> Python Launcher, size 1.80 MB
>
> Upon checking the python version, I get the following error message:
> C:\>python --version
> Python was not found; run without arguments to install from the Microsoft
> Store, or disable this shortcut from Settings > Manage App Execution
> Aliases.

Unless you checked the checkbox to add Python to your path in the
installer then this is normal.  To check your version, instead type:

PS C:\Users\boB> py --version
Python 3.9.5

If you did not add Python 3.9.5 to your path you will need to use "py"
wherever you think you would use "python" to launch whatever, for
instance

py -m pip install ...

if you were going to install a package.  BTW, if you *want* to add
Python 3.9.5 to your path it is not very difficult to do so.  Search
online if you do not know how.

> In the Start Menu, Python 3.9 shortcut is present, and when I click on that
> it takes me to Python 3.9(64-bit) CMD.  Just to test, I add a print
> statement.
>
> Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64
> bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> print("This is Tuesday")
> This is Tuesday
> >>>
>
> Python 3.9.5 was installed in the C:\Python3.9.5 folder and it seems that
> not all the files were downloaded and for some reason, old files were added.
>
> On the Local Disk (C:) > Python3.9.5 and the folder created for the
> installation displays:
>
> Folders - DLLs, Doc, include, Lib, libs, Scripts, tcl, Tools
>
> The date on the above-mentioned folders is the same date as when Python
> 3.9.5 was installed (2021/06/21) however, the dates are displayed
> (2021/05/03) on the rest of the files as below:
>
> Text Document - LICENSE, NEWS,
> Application - python, pythonw
> Application extention - python3.dll, python39.dll, vcruntime140.dll,
> vcruntime140_1.dll
> The dates are different from the date of Python 3.9.5 installation

I believe these differing dates are normal as I show similar results.
For instance the individual files you mention all have the same date
of "5/3/2021 5:35 PM" on my laptop.  However, the folders all have a
date of "5/12/2021 7:25 (or 7:24)PM" with one exception, the "Scripts"
folder which has a date of "5/28/2021 9:52 PM".  This makes sense to
me.  The heading for this date/time column in the file explorer is
"Date modified".  Neither of us have "modified" the dll's for
instance.  The date of release of Python 3.9.5 was, in fact,
"5/3/2021", so that checks out.  OTOH, after installing Python 3.9.5 I
*later* installed (using pip) pytest and spacy.  The most recent of
these two installations reflects the "Scripts" folder's date modified
stamp.  If I go into the "Scripts" folder I do in fact see that pytest
was installed earlier and its date modified reflects that correct date
and time. As for the other folders I believe (Someone correct me if I
am mistaken.) that the folder dates normally reflect the installation
date by you as that is when those folders were created.  However, if
you open one of them and examine the contents you will see that the
individual files have the Python 3.9.5 release date since you have not
modified those files.

> I have no way of fully uninstalling the separate python installations and
> install a new python version.

As for your Python 3.7 installation still being around it all depends.
You will get different results when you originally installed Python
3.7.x if you (1) install for all users; (2) install with
administrative privileges; or (3) install just for the current user.
For instance I had Python 3.7.x installed prior to installing 3.9.5.
I uninstalled Python 3.7.x.  But it is still available!  If I run "py
-3.7 --version" I see it is still there.  If I look in my Windows
Start folder there is an entry for Python 3.7.  What gives?  In my
case my son also uses my laptop and *he* installed his own version of
Python 3.7.x as a *user*.  My uninstalling *my* installation of Python
3.7.x did not affect his installation.  And since my laptop account
has administrator privileges I can still see it in the Start Menu, but
*not* in the settings uninstall programs list.  Perhaps you are
experiencing something similar?

I don't fully understand how Windows implements user privileges and
the full details of what an administrator account can and cannot see.
Wiser heads than mine will have to chime in and explain as needed.

HTH!
boB Stepp
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue44501] Packing constant call arguments

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> folding all contiguous LOAD_CONSTs (within some sort of limit ofc) into a 
> single tuple load and then adding an UNPACK_SEQUENCE

I already experimented with this in issue33325. It does not worth an effort.

For optimizing calls with constant arguments, it looks more interesting. Do you 
have any statistic about what percentage of calls is with constant arguments, 
what is the average number of constant arguments, what are microbenchmark 
results in debug mode for the average number of constant arguments? Please test 
for trivial Python function with variable and fixed number of parameters.

--

___
Python tracker 

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



[issue44498] add deprecation warnings for asynchat, asyncore and smtpd

2021-06-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I'm fine with a 3.10 backport as long as this is mentioned in python-dev to 
give time for folks to raise concerns. Additionally, please make sure that:

*The test site runs with -Werror as these warnings may make it fail so tests 
may need to be adapted.
* This deprecation is covered in the 3.10 what's new document.
* There is enough time for people to raise objections to the inclusion in 3.10 
(so don't merge immediately after mentioning in python-dwv ;) )

--
nosy: +pablogsal

___
Python tracker 

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



[issue44229] test_ssl: test_get_server_certificate() and test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

2021-06-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Only on MacOS afaik

--

___
Python tracker 

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



[issue44490] PEP 604 Union (int | str) doesn't have __parameters__

2021-06-23 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue44498] add deprecation warnings for asynchat, asyncore and smtpd

2021-06-23 Thread Irit Katriel


Change by Irit Katriel :


--
assignee: iritkatriel -> 

___
Python tracker 

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



[issue44501] Packing constant call arguments

2021-06-23 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

It is a common scenario to make calls with only constant arguments (e.g to 
datetime.datetime/os.path.join/re.match.group/nox.session.run etc) and the 
bytecode that we currently generate looks like this;
f(1,2,3,4,5,6)
  1   0 LOAD_NAME0 (f)
  2 LOAD_CONST   0 (1)
  4 LOAD_CONST   1 (2)
  6 LOAD_CONST   2 (3)
  8 LOAD_CONST   3 (4)
 10 LOAD_CONST   4 (5)
 12 LOAD_CONST   5 (6)
 14 CALL_FUNCTION6
 16 POP_TOP
 18 LOAD_CONST   6 (None)
 20 RETURN_VALUE

But if we are sure that all arguments to a function is positional* (it is also 
possible to support keyword arguments to some extent, needs more research, but 
out of the scope for this particular optimization) and constant, then we could 
simply pack everything together and use CALL_FUNCTION_EX (we also need to set 
some limits, since when it is too little might prevent constant cache, and when 
it is too high might create giant tuples in the code object, perhaps 75 > N > 4)

  1   0 LOAD_NAME0 (f)
  2 LOAD_CONST   0 ((1, 2, 3, 4, 5, 6))
  4 CALL_FUNCTION_EX 0
  6 POP_TOP
  8 LOAD_CONST   1 (None)
 10 RETURN_VALUE

The implementation is also very simple, and doesn't even touch anywhere beside 
the ast optimizer itself. It is possible to do this in the compiler, but that 
might complicate the logic so I'd say it is best to keep it as isolated as it 
can be.

(debug builds)

-s 'foo = lambda *args: None' 'foo("y", 123, 123321321312, (1,2,3), 
"y", 1.0, (1,2,3), "y", "y", (1,2,3), 5, 6, 7)'
Mean +- std dev: [master_artificial] 251 ns +- 2 ns -> [optimized_artificial] 
185 ns +- 1 ns: 1.36x faster

-s 'from datetime import datetime' 'datetime(1997, 7, 27, 12, 10, 0, 0)'
Mean +- std dev: [master_datetime] 461 ns +- 1 ns -> [optimized_datetime] 386 
ns +- 2 ns: 1.19x faster

One other potential candidate to this optimization is doing something similar 
in the CFG optimizer, and folding all contiguous LOAD_CONSTs (within some sort 
of limit ofc) into a single tuple load and then adding an UNPACK_SEQUENCE 
(which would replicate the effect). This is a poorer form, and I was only able 
to observe a speedup of 1.13x / 1.03x respectively on the benchmarks. The good 
thing about that optimization was that, first it was able to work with mixed 
parameters (so if you have some other types of expressions besides constants, 
but all constants follow each other, then it was able to optimize that case as 
well) and also it wasn't only for calls but rather all compiler cases where 
LOAD_CONST blocks were generated.

--
assignee: BTaskaya
components: Interpreter Core
messages: 396437
nosy: BTaskaya, Mark.Shannon, pablogsal, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Packing constant call arguments
type: performance
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



[issue44498] add deprecation warnings for asynchat, asyncore and smtpd

2021-06-23 Thread Irit Katriel


Change by Irit Katriel :


--
title: move deprecated asynchat, asyncore and smtpd from the stdlib to 
test.support -> add deprecation warnings for asynchat, asyncore and smtpd

___
Python tracker 

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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
pull_requests: +25459
pull_request: https://github.com/python/cpython/pull/26882

___
Python tracker 

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



creating raw AWS log event

2021-06-23 Thread Larry Martell
When an AWS cloudwatch event is passed to a consumer it looks like this:

{
"awslogs": {
 "data": "ewogICAgIm1l..."
 }
}

To get the actual message I do this:

def _decode(data):
compressed_payload = b64decode(data)
json_payload = zlib.decompress(compressed_payload, 16+zlib.MAX_WBITS)
return json.loads(json_payload)

message = _decode(json.dumps(event['awslogs']['data']))

This returns the log message as a string.

For my unit tests I need to reverse this - given a message as a string
I want to generate the compressed, encoded event structure.

I have not been able to get this to work. I have this:

message  = b'test message'
compressed= zlib.compress(message)
event['awslogs']['data'] = str(compressed)

message = _decode(json.dumps(event['awslogs']['data']))
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 3, in _decode
zlib.error: Error -3 while decompressing data: incorrect header check

Anyone see how to make this work?

TIA!
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue44229] test_ssl: test_get_server_certificate() and test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

2021-06-23 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Has these issues (ConnectionRefusedError/ConnectionResetError during handshake) 
been reported on other systems than macOS? AFAICS, they've only been reported 
for the macOS CI.

--

___
Python tracker 

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



[issue36243] Python os.listdir fails with FileNotFoundError when directory exists

2021-06-23 Thread Irit Katriel


Irit Katriel  added the comment:

Geoff, it's been over two years. Do you think there is a chance you will want 
to follow up with a reproducer, or shall we close this issue?

--
nosy: +iritkatriel
status: pending -> open

___
Python tracker 

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



[issue41515] typing.get_type_hints generates KeyError

2021-06-23 Thread Will Chen


Change by Will Chen :


--
nosy: +WCA
nosy_count: 6.0 -> 7.0
pull_requests: +25458
pull_request: https://github.com/python/cpython/pull/26862

___
Python tracker 

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



[issue40620] [doc] Range tutorial shorthand could be made clearer

2021-06-23 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
title: Range tutorial shorthand could be made clearer -> [doc] Range tutorial 
shorthand could be made clearer
versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8

___
Python tracker 

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



[issue44404] tkinter's after() AttributeError with functools.partial (no attribute __name__)

2021-06-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I was thinking the same.

--

___
Python tracker 

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



[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-06-23 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 769d7d0c66c5b86e2dd29b9ce67ac2daaab1bb38 by Guido van Rossum in 
branch 'main':
bpo-43693 Get rid of CO_NOFREE -- it's unused (GH-26839)
https://github.com/python/cpython/commit/769d7d0c66c5b86e2dd29b9ce67ac2daaab1bb38


--

___
Python tracker 

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



[issue44470] 3.11 docs.python.org in Polish not English?

2021-06-23 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy:  -mark.dickinson

___
Python tracker 

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



[issue44500] Document changes to code object.

2021-06-23 Thread Mark Shannon


New submission from Mark Shannon :

We are making lots of changes to the code object.

We should clearly document all the changes in one place and explain the new 
design well before 3.11 beta.

--
assignee: docs@python
components: Documentation
messages: 396432
nosy: Mark.Shannon, docs@python, eric.snow, gvanrossum
priority: normal
severity: normal
status: open
title: Document changes to code object.
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue44486] Modules should alway have a dictionary

2021-06-23 Thread Mark Shannon


Change by Mark Shannon :


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



Re: Python-list Digest, Vol 213, Issue 24

2021-06-23 Thread Ayaana Soni
Thank you it worked using the code you gave!!!

On Tue, Jun 22, 2021 at 9:33 PM  wrote:

> Send Python-list mailing list submissions to
> python-list@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mail.python.org/mailman/listinfo/python-list
> or, via email, send a message with subject or body 'help' to
> python-list-requ...@python.org
>
> You can reach the person managing the list at
> python-list-ow...@python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Python-list digest..."
> Today's Topics:
>
>1. Re: PYTHON (Peter Pearson)
>2. Re: create an empty RGB image with specified number of cells
>   (rows, columns) (Dan Stromberg)
>3. Re: Subpixel positioning on Tk canvas (Christian Gollwitzer)
>4. IDLE is not working after Python installation . (Ayaana Soni)
>5. Re: create an empty RGB image with specified number of cells
>   (rows, columns) (Arak Rachael)
>6. Re: create an empty RGB image with specified number of cells
>   (rows, columns) (Arak Rachael)
>7. Re: IDLE is not working after Python installation . (Terry Reedy)
>8. Re: IDLE is not working after Python installation .
>   (Mats Wichmann)
>
>
>
> -- Forwarded message --
> From: Peter Pearson 
> To: python-list@python.org
> Cc:
> Bcc:
> Date: 21 Jun 2021 14:27:05 GMT
> Subject: Re: PYTHON
> On Mon, 21 Jun 2021 10:33:26 +0530, Ayaana Soni 
> wrote:
> > have installed python from your site. After installation my IDLE doesn't
> > work.  IDLE is not in my search list. Plz help!!
>
> "Your site" is ambiguous.
>
> Does your computer run Windows, Linux, Apple something, ... ?
>
> --
> To email me, substitute nowhere->runbox, invalid->com.
>
>
>
>
> -- Forwarded message --
> From: Dan Stromberg 
> To: Arak Rachael 
> Cc: Python List 
> Bcc:
> Date: Mon, 21 Jun 2021 12:19:45 -0700
> Subject: Re: create an empty RGB image with specified number of cells
> (rows, columns)
> I don't know about OpenCV, but here's a way of creating a ppm image file of
> arbitrary size and arbitrary solid color:
> https://stromberg.dnsalias.org/svn/solid/trunk
>
> On Mon, Jun 21, 2021 at 4:01 AM Arak Rachael 
> wrote:
>
> > Hi guys!
> >
> > Does anyone know how to do this, if possible with OpenCv?
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
>
>
>
>
> -- Forwarded message --
> From: Christian Gollwitzer 
> To: python-list@python.org
> Cc:
> Bcc:
> Date: Mon, 21 Jun 2021 23:37:42 +0200
> Subject: Re: Subpixel positioning on Tk canvas
> Am 20.06.21 um 01:49 schrieb Terry Reedy:
> > On 6/19/2021 12:42 AM, Christian Gollwitzer wrote:
> >> Sorry for that answer, but Tkinter does not support many of the most
> >> useful extensions for Tcl/Tk, because someone has to write the
> >> wrappers. It only supports what is provided by base Tk. Among those I
> >> consider useful and use in almost any application are:
> >
> > Are these extensions included with the tcl/tk distribution, or otherwise
> > available from active state?  Are this extensions included with Linux
> > installations of tcl/tk?  Or easily installed?
>
> Since ActiveState has pulled out the developers of Tcl a few years ago,
> I haven't used ActiveTcl anymore. I was surprised to see that they
> actually offer a fairly recent version, but it also cannot be simply
> downloaded, one has to register. It was unclear to me if it costs money.
>
> Other people have stepped in to provide Tcl distributions where tese
> extensions are included; notable exanples are BAWT by Paul Obermeier
> http://www.bawt.tcl3d.org/download.html which offers all of the
> mentioned packages (and many more), Androwish/Undroidwish by Christian
> Werner which was originally developed for Android, but now works on te
> major desktop platforms, http://androwish.org/home/wiki?name=undroidwish
> and even kbskit can be mentioned, started by Rene Zaumseil and now
> updated in irregular intervals by me https://github.com/auriocus/kbskit
>
> I haven't checked the major linux distros, but they also might ship with
> some of these extensions.
>
> Concerning installation, it differs. Tablelist (also part of tklib) and
> pdf4tcl are pure-Tcl packages and therefore easily installed.
> TkDnD, TkTable and tkTreeCtrl are compiled extensions and therefore more
> difficult - however, due to the stubs mechanism of Tcl, the version
> number of Tcl and C compiler do NOT need to match. Typically a binary
> downloaded for the right OS and bitness will work, and compilation from
> source works with an autoconf-based configure script.
>
> Due to ActiveState's failure with the teapot, the Tcl world does now not
> any longer have a central repository tool like "pip" which works for
> everyone. This has just recently been discussed on comp.lang.tcl, but it
> is unlikely to happen in the near future.
>
> It is of course unrealistic to expect that 

Uninstall and Re-install Python - Windows 10 issues

2021-06-23 Thread Suretha Weweje
After I uninstalled Python 3.7and Python 3.9 and installed Python 3.9.5 and
is displayed in Apps & features:

Python 3.9.5 Python 3.9.5 (64-bit), size 101 MB, and
Python Launcher, size 1.80 MB

Upon checking the python version, I get the following error message:
C:\>python --version
Python was not found; run without arguments to install from the Microsoft
Store, or disable this shortcut from Settings > Manage App Execution
Aliases.

In the Start Menu, Python 3.9 shortcut is present, and when I click on that
it takes me to Python 3.9(64-bit) CMD.  Just to test, I add a print
statement.

Python 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("This is Tuesday")
This is Tuesday
>>>

Python 3.9.5 was installed in the C:\Python3.9.5 folder and it seems that
not all the files were downloaded and for some reason, old files were added.

On the Local Disk (C:) > Python3.9.5 and the folder created for the
installation displays:

Folders - DLLs, Doc, include, Lib, libs, Scripts, tcl, Tools

The date on the above-mentioned folders is the same date as when Python
3.9.5 was installed (2021/06/21) however, the dates are displayed
(2021/05/03) on the rest of the files as below:

Text Document - LICENSE, NEWS,
Application - python, pythonw
Application extention - python3.dll, python39.dll, vcruntime140.dll,
vcruntime140_1.dll
The dates are different from the date of Python 3.9.5 installation

I have no way of fully uninstalling the separate python installations and
install a new python version.

Can someone kindly assist or direct me to where I can find a solution
for this?

Thank you,

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


Re: Optimizing Small Python Code

2021-06-23 Thread Michael F. Stemper

On 23/06/2021 08.17, Stefan Ram wrote:

"Avi Gross"  writes:

This can be made a one-liner too! LOL!


print( '1\n  0\n2\n  0\n  1\n3\n  0\n  1\n  2\n4\n  
0\n  1\n  2\n  3\n5\n  0\n  1\n  2\n  3\n  
4\n6\n  0\n  1\n  2\n  3\n  4\n  5\n' )


Unless I'm figuring ot wrong, you just took it from O(n^2) to
O(1). That deserves a Turing award or something.

--
Michael F. Stemper
You can lead a horse to water, but you can't make him talk like Mr. Ed
by rubbing peanut butter on his gums.
--
https://mail.python.org/mailman/listinfo/python-list


Re: Optimizing Small Python Code

2021-06-23 Thread Dieter Maurer
Kais Ayadi wrote at 2021-6-22 08:03 -0700:
>Hi There!
>this is a small python code executed in 61 steps
>
>for n in range(1, 7):
>print (n)
>for x in range(0, n):
>print(" ", x)
>
>can this code be more optimised?

You should proceed as follows:
implement a task in the most straightforward way possible.
Only if you hit a problem look for optimizations -- to solve the problem.
Small pieces of code rarely need optimizations -- unless they are
called very often.

Optimizations often aim to reduce runtime.
In your code, the runtime is dominated by the output.
Output speed is mostly outside your control.
Do not try to optimize the code above for runtime.

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


[issue44229] test_ssl: test_get_server_certificate() and test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

2021-06-23 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Although I simphatise with the frustration and I would really like to skip them 
myself, as a release manager I am quite concerned that skip them would masks an 
actual regression, as these failures are not present in previous versions.

--

___
Python tracker 

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



[issue44297] Frame with -1 line number

2021-06-23 Thread Mark Shannon


Mark Shannon  added the comment:

Thanks for the reproducer.

--
assignee:  -> Mark.Shannon

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks kryheb for your bug report, reproducer and your fix!

The bug should now be fixed in 3.9, 3.10 and main branches.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5ed7827b1620f5b3729bc9767158d24a33863fa9 by Victor Stinner in 
branch '3.9':
bpo-1: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26878)
https://github.com/python/cpython/commit/5ed7827b1620f5b3729bc9767158d24a33863fa9


--

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ece3841d3ddf38875b997eb919488cbb911a66e2 by Victor Stinner in 
branch '3.10':
bpo-1: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26877)
https://github.com/python/cpython/commit/ece3841d3ddf38875b997eb919488cbb911a66e2


--

___
Python tracker 

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



[issue41621] Document collections.defaultdict parameter default_factory

2021-06-23 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue41621] Document collections.defaultdict parameter default_factory

2021-06-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 88a3342314c8b9ff40a2b6fd4759cfbf64712c67 by Miss Islington (bot) 
in branch '3.10':
bpo-41621: Document defaultdict's default_factory parameter (GH-21945)
https://github.com/python/cpython/commit/88a3342314c8b9ff40a2b6fd4759cfbf64712c67


--

___
Python tracker 

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



[issue44229] test_ssl: test_get_server_certificate() and test_msg_callback_deadlock_bpo43577() fail randomly on the macOS CI

2021-06-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Two GHI test macOS failures yesterday, once on main, this is on 3.10 backport
https://github.com/python/cpython/pull/26850/checks?check_run_id=2885797677

ERROR: test_get_server_certificate (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/test/test_ssl.py", line 2180, in 
test_get_server_certificate
_test_get_server_certificate(self, *self.server_addr, cert=SIGNING_CA)
  File "/Users/runner/work/cpython/cpython/Lib/test/test_ssl.py", line 2377, in 
_test_get_server_certificate
pem = ssl.get_server_certificate((host, port), ca_certs=cert)
  File "/Users/runner/work/cpython/cpython/Lib/ssl.py", line 1527, in 
get_server_certificate
with create_connection(addr, timeout=timeout) as sock:
  File "/Users/runner/work/cpython/cpython/Lib/socket.py", line 844, in 
create_connection
raise err
  File "/Users/runner/work/cpython/cpython/Lib/socket.py", line 832, in 
create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused

So far reported (including #44237) ConnectionRefusedError in
test_get_server_certificate X many
test_msg_callback_deadlock_bpo43577
test_get_server_certificate_sni

ConnectionResetError: 
test_connect_cadata

Please, please, skip the randomly failing tests, as is done for other modules.  
This has been going on a month now.  It waste other people's time, making 
merging more painful.

--
priority: normal -> high

___
Python tracker 

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



[issue44480] test_compile killed by signal 9 on AMD64 FreeBSD Non-Debug 3.x

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

https://buildbot.python.org/all/#/builders/172/builds/399

test_sequence_unpacking_error (test.test_compile.TestSpecifics) ... ok
test_single_statement (test.test_compile.TestSpecifics) ... ok
test_stack_overflow (test.test_compile.TestSpecifics) ... *** Signal 9
Stop.
make: stopped in /usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build
program finished with exit code 1
elapsedTime=835.734730

--

___
Python tracker 

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



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

I think this may be worth bringing up on python-dev. The solution currently is 
rather verbose. I like adding the with-protocol to generators.

--
nosy: +Guido.van.Rossum

___
Python tracker 

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



[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-06-23 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 34356a0a4bad0be124ae892cda6c30a38f5f1061 by Erlend Egeberg 
Aasland in branch 'main':
bpo-42862: Strip stale sqlite3 cache ignores from c-analyzer (GH-26876)
https://github.com/python/cpython/commit/34356a0a4bad0be124ae892cda6c30a38f5f1061


--
nosy: +corona10

___
Python tracker 

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



[issue39947] [C API] Make the PyThreadState structure opaque (move it to the internal C API)

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset db532a09990c837ec1348e6e6bd2719f5d4a8216 by Victor Stinner in 
branch 'main':
bpo-39947: Remove old private trashcan C API functions (GH-26869)
https://github.com/python/cpython/commit/db532a09990c837ec1348e6e6bd2719f5d4a8216


--

___
Python tracker 

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



[issue43770] Rework C types initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2a396d65b8e63300ff05e217adacf0765c502ba3 by Victor Stinner in 
branch 'main':
bpo-43770:  Cleanup PyModuleDef_Init() (GH-26879)
https://github.com/python/cpython/commit/2a396d65b8e63300ff05e217adacf0765c502ba3


--

___
Python tracker 

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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Christian Heimes


Christian Heimes  added the comment:

I'm with Petr, please follow PEP 4 and PEP 387. At a bare minimum you should 
have one minor Python version with deprecation warnings. You could ask Pablo if 
he allows to add deprecation warnings to Python 3.10 beta.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Petr Viktorin


Petr Viktorin  added the comment:

Please follow the backwards compatibility policy (PEP 387):
- Have a discussion
- Raise deprecation warnings
- Wait at least two minor Python versions where warnings are raised
- Consider any feedback
- Then remove stuff
(Or ask the SC for an exception, but these "are only granted for extreme 
situations such as dangerously broken or insecure features or features no one 
could reasonably be depending on".)

There were no deprecation warnings raised so far, so removing these in 3.11 is 
very premature.

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue44499] [sqlite3] make sqlite3.Connection exception refs strong

2021-06-23 Thread Erlend E. Aasland


New submission from Erlend E. Aasland :

Currently, pysqlite_Connection keeps borrowed references to all the sqlite3 
exception types. Suggesting to convert these to strong refs.

See comments on GH-26745: 
https://github.com/python/cpython/pull/26745#issuecomment-866810269

--
assignee: erlendaasland
components: Extension Modules
messages: 396417
nosy: erlendaasland, petr.viktorin
priority: normal
severity: normal
status: open
title: [sqlite3] make sqlite3.Connection exception refs strong
type: enhancement
versions: Python 3.11

___
Python tracker 

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



[issue43770] Rework C types initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25457
pull_request: https://github.com/python/cpython/pull/26881

___
Python tracker 

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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-06-23 Thread miss-islington


miss-islington  added the comment:


New changeset a50e28377bcf37121b55c2de70d95a5386c478f8 by Erlend Egeberg 
Aasland in branch 'main':
bpo-42064: Move `sqlite3` exceptions to global state, part 1 of 2 (GH-26745)
https://github.com/python/cpython/commit/a50e28377bcf37121b55c2de70d95a5386c478f8


--
nosy: +miss-islington

___
Python tracker 

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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

+1 for removal

--
nosy: +barry

___
Python tracker 

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



[issue43770] Rework C types initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25456
pull_request: https://github.com/python/cpython/pull/26880

___
Python tracker 

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



[issue43770] Rework C types initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25455
pull_request: https://github.com/python/cpython/pull/26879

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25454
pull_request: https://github.com/python/cpython/pull/26878

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25453
pull_request: https://github.com/python/cpython/pull/26877

___
Python tracker 

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



[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-06-23 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +25452
pull_request: https://github.com/python/cpython/pull/26876

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 489699ca05bed5cfd10e847d8580840812b476cd by Victor Stinner in 
branch 'main':
bpo-1: _PyImport_Fini2() resets PyImport_Inittab (GH-26874)
https://github.com/python/cpython/commit/489699ca05bed5cfd10e847d8580840812b476cd


--

___
Python tracker 

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



[issue44494] Overhaul of Doc/library/__main__.rst

2021-06-23 Thread Irit Katriel


Irit Katriel  added the comment:

That's a good plan!

--

___
Python tracker 

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



[issue44237] test_ssl randomly fails on macOS GH Action: test_get_server_certificate_sni() and test_get_server_certificate_timeout()

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

https://github.com/python/cpython/pull/26874/checks?check_run_id=2893904059

ERROR: test_connect_cadata (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File "/Users/runner/work/cpython/cpython/Lib/test/test_ssl.py", line 2131, in 
test_connect_cadata
s.connect(self.server_addr)
  File "/Users/runner/work/cpython/cpython/Lib/ssl.py", line 1379, in connect
self._real_connect(addr, False)
  File "/Users/runner/work/cpython/cpython/Lib/ssl.py", line 1370, in 
_real_connect
self.do_handshake()
  File "/Users/runner/work/cpython/cpython/Lib/ssl.py", line 1346, in 
do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer

--

___
Python tracker 

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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-06-23 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 019ad62afd20e80c74f879aa716e339b992a0bb9 by Erlend Egeberg 
Aasland in branch 'main':
bpo-42064: Remove stale extern declarations in `sqlite3` headers (GH-26840)
https://github.com/python/cpython/commit/019ad62afd20e80c74f879aa716e339b992a0bb9


--

___
Python tracker 

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



[issue44496] string.Formatter class not allowing {.field}

2021-06-23 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue44494] Overhaul of Doc/library/__main__.rst

2021-06-23 Thread Jack DeVries


Change by Jack DeVries :


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



[issue44494] Overhaul of Doc/library/__main__.rst

2021-06-23 Thread Jack DeVries


Jack DeVries  added the comment:

@iritkatriel, ok, I will close this issue, close PR26867, and move the work I 
have over there. I probably can merge in and build upon the work from the 
contributor on bpo-39452.

--

___
Python tracker 

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



[issue20012] Re: Allow Path.relative_to() to accept non-ancestor paths

2021-06-23 Thread Antony Lee


Change by Antony Lee :


--
nosy:  -Antony.Lee

___
Python tracker 

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



[issue34389] CPython may fail to build in the presence of a ~/.pydistutils.cfg

2021-06-23 Thread Antony Lee


Change by Antony Lee :


--
nosy:  -Antony.Lee

___
Python tracker 

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



[issue20859] Context of documentation for conditional expressions

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> "and exponentiation and conditional expressions, which group from right to 
> left".

LGTM

> "Python evaluates expressions from left to right (except for conditional 
> expressions)."

LGTM. It would be nice to add also examples for conditional and assignment 
expressions.

> Should 'except for lambda' be added to the end of the sentence?

Yes, lambda and assignment expressions have lower priority.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue42234] pathlib relative_to behaviour change

2021-06-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> pathlib's relative_to should behave like os.path.relpath

___
Python tracker 

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



[issue20012] Re: Allow Path.relative_to() to accept non-ancestor paths

2021-06-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> pathlib's relative_to should behave like os.path.relpath

___
Python tracker 

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



[issue44404] tkinter's after() AttributeError with functools.partial (no attribute __name__)

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is on borderline between new feature and bugfix (depends on your 
interpretation of the documentation), so I decided to backport it to not yet 
released 3.10, but not to 3.9 which has been already used for a year.

--
stage: patch review -> 
type: behavior -> 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



[issue44404] tkinter's after() AttributeError with functools.partial (no attribute __name__)

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset e9c8f784fa13ea3a51df3b72a498a3896ec9e768 by E-Paine in branch 
'main':
bpo-44404: tkinter `after` support callable classes (GH-26812)
https://github.com/python/cpython/commit/e9c8f784fa13ea3a51df3b72a498a3896ec9e768


--

___
Python tracker 

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



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 38e021ab90b595945f15c59273c788f2f24053dc by Miss Islington (bot) 
in branch '3.10':
bpo-44482: Fix very unlikely resource leak in glob in non-CPython 
implementations (GH-26843) (GH-26872)
https://github.com/python/cpython/commit/38e021ab90b595945f15c59273c788f2f24053dc


--

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

Oh, I didn't notice your PR 26767 fix! Thanks. I wrote PR 26874 which includes 
the same fix, but adds also a regression test.

--

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for inittab-bug_no-threads.c reproducer. I managed to reproduce the 
issue and I wrote PR 26767 to fix with a regression test.

--

___
Python tracker 

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



[issue44441] Malformed PyImport_Inittab after re-initialization

2021-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25449
pull_request: https://github.com/python/cpython/pull/26874

___
Python tracker 

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



[issue44498] move deprecated asynchat, asyncore and smtpd from the stdlib to test.support

2021-06-23 Thread Irit Katriel


Irit Katriel  added the comment:

There are some tests that use asynchat, asyncore and smtpd so we first move 
them to test.support and document their removal from the stdlib.

--
title: remove deprecated smtpd from the stdlib -> move deprecated asynchat, 
asyncore and smtpd from the stdlib to test.support

___
Python tracker 

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



[issue44482] Possible resource leeak in glob in non-refcount implementations

2021-06-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Yes. I added you Guido to the nosy list to attract attention to a general 
issue. If the generator owns resources, it should be guaranteed closed. Since 
generator do not support the context manager protocol, we need to use closing().

Using generators is common in the code on my work, so I am going to revise all 
uses of resource-owning generators in my work code, in the stdlib and in common 
libraries like aiohttp.

May be we will add a decorator for generator functions which would add support 
of the context manager protocol. Or make generator objects supporting the 
context manager protocol by default. Or make the with statement fall back to 
the close() method by default. Or even add special syntax shortcut for 
combining "with" and "for" if this idiom will be common enough.

--

___
Python tracker 

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



[issue28395] Remove unnecessary semicolons in tests

2021-06-23 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue28395] Remove unnecessary semicolons in tests

2021-06-23 Thread miss-islington


miss-islington  added the comment:


New changeset fcde2c6a8c99a56576b25733d5cc60bce6d51f46 by Miss Islington (bot) 
in branch '3.9':
bpo-28395: Remove unnecessary semicolons in tests (GH-26868)
https://github.com/python/cpython/commit/fcde2c6a8c99a56576b25733d5cc60bce6d51f46


--

___
Python tracker 

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



[issue28395] Remove unnecessary semicolons in tests

2021-06-23 Thread miss-islington


miss-islington  added the comment:


New changeset 280425d41797f9c0b20fb02a22341937a13a8987 by Miss Islington (bot) 
in branch '3.10':
bpo-28395: Remove unnecessary semicolons in tests (GH-26868)
https://github.com/python/cpython/commit/280425d41797f9c0b20fb02a22341937a13a8987


--

___
Python tracker 

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



[issue44498] remove deprecated smtpd from the stdlib

2021-06-23 Thread Irit Katriel


Change by Irit Katriel :


--
assignee:  -> iritkatriel

___
Python tracker 

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



[issue44497] distutil findall can choke with recursive symlinks (performance)

2021-06-23 Thread Sorin Sbarnea


Change by Sorin Sbarnea :


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

___
Python tracker 

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



[issue44498] remove deprecated smtpd from the stdlib

2021-06-23 Thread Irit Katriel


New submission from Irit Katriel :

smtpd uses asynchat which has been deprecated since 3.6.

See discussion at
https://mail.python.org/archives/list/python-committ...@python.org/thread/KNF6YQE2O4OLJDNKSGAT4NLZUNCQ5QSH/#KNF6YQE2O4OLJDNKSGAT4NLZUNCQ5QSH

--
messages: 396399
nosy: iritkatriel, vstinner
priority: normal
severity: normal
status: open
title: remove deprecated smtpd from the stdlib
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



[issue44483] Fatal error in type union

2021-06-23 Thread Ken Jin


Ken Jin  added the comment:

Oh, that's a good point too. Thanks for the explanation, reviews and merge 
Serhiy.

--

___
Python tracker 

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



  1   2   >