[issue44277] cpython forks are spammed with dependabot PRs

2021-05-31 Thread Anthony Sottile


New submission from Anthony Sottile :

for example: https://github.com/asottile/cpython/pull/1

--
messages: 394842
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: cpython forks are spammed with dependabot PRs

___
Python tracker 

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



[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Eryk Sun

Eryk Sun  added the comment:

> PS > [System.Console]::InputEncoding = $OutputEncoding

If changing the console input codepage to UTF-8 fixes the mojibake problem, 
then probably you're running Python in UTF-8 mode. pydoc.tempfilepager() 
encodes the temporary file with the preferred encoding, which normally would 
not be UTF-8. There are possible variations in how your system and the console 
are configured, so I can't say for sure.

tempfilepager() could temporarily set the console's input codepage to UTF-8 via 
SetConsoleCP(65001). However, if python.exe is terminated or crashes before it 
can reset the codepage, the console will be left in a bad state. By bad state, 
I mean that leaving the input code page set to UTF-8 is broken. Legacy console 
applications rely on the input codepage for reading input via ReadFile() and 
ReadConsoleA(), but the console host (conhost.exe or openconsole.exe) doesn't 
support reading input as UTF-8. It simply replaces each non-ASCII character 
(i.e. characters that require 2-4 bytes as UTF-8) with a null byte, e.g. 
"abĀcd" is read as "ab\x00cd". 

If you think the risk of crashing is negligible, and the downside of breaking 
legacy applications in the console session is trivial, then paging with full 
Unicode support is easily possible. Implement _winapi.GetConsoleCP() and 
_winapi.SetConsoleCP(). Write UTF-8 text to the temporary file. Change the 
console input codepage to UTF-8 before spawning "more.com". Revert to the 
original input codepage in the finally block.

A more conservative fix would be to change tempfilepager() to encode the file 
using the console's current input codepage, GetConsoleCP(). At least there's no 
mojibake.

> PS > $OutputEncoding =  [System.Text.Encoding]::GetEncoding("UTF-8")

FYI, $OutputEncoding in PowerShell has nothing to do with the python.exe and 
more.com processes, nor the console session to which they're attached.

> PS > [System.Console]::OutputEncoding = $OutputEncoding

The console output code page is irrelevant since more.com writes wide-character 
text via WriteConsoleW() and decodes the file using the console input code 
page, GetConsoleCP(). The console output codepage from GetConsoleOutputCP() 
isn't used for anything here.

--

___
Python tracker 

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



[issue44276] Replace if-elif-else structure with match-case (PEP634)

2021-05-31 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



RE: How to debug python + curses? [was: RE: Applying winpdb_reborn]

2021-05-31 Thread pjfarley3
> -Original Message-
> From: Dennis Lee Bieber 
> Sent: Sunday, May 30, 2021 4:32 PM
> To: python-list@python.org
> Subject: Re: How to debug python + curses? [was: RE: Applying
winpdb_reborn]
> 
> On Sun, 30 May 2021 13:26:40 -0400,  declaimed
the
> following:
> 
>   Follow-up to my prior response (which doesn't seem to have
> propagated out and back in to gmane yet).
> 
> >Does anyone here know if winpdb-reborn or any other debugger can
> >support 2-window debugging for a python script that uses the curses
> >module?  It seems to me that a 2-window debugging session is necessary
> >for a python script that uses the curses module because using curses
> >takes over the screen from which the script is started, so debugging
> >output and script output need to be in separate windows.
> >
> 
>   The winpdb executable itself (with a .py as argument) was doing
> NOTHING on my system. Running the winpdb.py file (again with a .py as
> argument) instead did open a graphical user interface, AND it opened a new
> console window... But that is as far as it went. The winpdb GUI status
reported
> that it could not find the script (even if I specified a full path to it).
> 
>   The File/Launch behaved the same way -- opened a console for the
> selected .py, but did not run it...
 

Thank you Dennis. I think I remember having the same issue.  From
examination of the session_manager.py code at the winpdb_reborn github repo
it would appear that the RPDBTERM environment variable needs to be defined
on a Windows system at a global level with the value "nt" to get the correct
osSpawn dictionary entry to start a new Windows console window.  And there
may be more that needs to be done to ensure that starting a new CMD.EXE
console window gets you into the correct directory.  There may need to be
additional CMD.EXE options passed into the osSpawn value to get to that
working directory where you are actually debugging.  Although I do also see
code in that same module that *looks" like it should do that job, but it may
or may not be working right for a Windows system.

I may try winpdb_reborn again using RPDBTERM=nt.  Thanks for the several
replies, appreciated.

Peter

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


[issue44276] Replace if-elif-else structure with match-case (PEP634)

2021-05-31 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This is done on a case by case basis and in places necessary in future code. 
Modifying existing code can pollute git history, make backports hard, might 
introduce subtle bugs etc. This is similar to proposal to use walrus operator, 
f-strings, etc. throughout the codebase.

--
nosy: +xtreak

___
Python tracker 

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



[issue44276] Replace if-elif-else structure with match-case (PEP634)

2021-05-31 Thread Kshitiz Arya


New submission from Kshitiz Arya :

Replace if-elif-else with match-case for pattern matching, which is generally 
faster and more intuitive.

--
components: Library (Lib)
messages: 394839
nosy: Kshitiz17
priority: normal
severity: normal
status: open
title: Replace if-elif-else structure with match-case (PEP634)
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



RE: How to debug python + curses? [was: RE: Applying winpdb_reborn]

2021-05-31 Thread pjfarley3
> -Original Message-
> From: Chris Angelico 
> Sent: Sunday, May 30, 2021 5:47 PM
> To: Python 
> Subject: Re: How to debug python + curses? [was: RE: Applying winpdb_reborn]
> 
 
> Never had this problem with curses per se (partly because I've used it very 
> little),
> but a more general technique for debugging things that don't have a "normal"
> console is to create one via a pipe or file. The easiest way is something 
> like:
> 
> log = open("logfile.txt", "w")
> print(f"At this point, {foo=}", file=log, flush=True)
> 
> Then, in a separate window - or even on a completely different machine, via 
> SSH
> or equivalent - "tail -F logfile.txt" will be your console.

Thank Chris.  Your method will certainly work, I just used the python logging 
facilities to do effectively the same thing, but it is a slower debugging 
process than having the ability to examine the program environment dynamically 
while it is actually executing but stopped at a chosen breakpoint.

Using tail on a Windows system requires non-native facilities (though 
gnuwin32's tail does a creditable job).

I'm used to having the facilities of an interactive debugger available in my 
day job (not on *ix or Windows systems though), I just thought that interactive 
debugging would be more the rule than the exception here too.

Peter
--


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


[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Inada Naoki


Inada Naoki  added the comment:

I confirmed this fixes the mojibake:

```
PS > $OutputEncoding =  [System.Text.Encoding]::GetEncoding("UTF-8")
PS > [System.Console]::OutputEncoding = $OutputEncoding
PS > [System.Console]::InputEncoding = $OutputEncoding
```

--

___
Python tracker 

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



[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Inada Naoki


Inada Naoki  added the comment:

> In Windows, pydoc uses the old "more.com" pager with a temporary file that's 
> encoded with the default encoding, which is the process active codepage (i.e. 
> "ansi" or "mbcs"), unless UTF-8 mode is enabled. The "more.com" utility, 
> however, decodes the file using the console's current input codepage from 
> GetConsoleCP(), and then it writes the decoded text via wide-character 
> WriteConsoleW(). 

Then, we need to check `[System.Console]::InputEncoding` too. It is a 
`GetConsoleCP()`.

--

___
Python tracker 

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



[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Eryk Sun


Eryk Sun  added the comment:

> PS> [System.Console]::OutputEncoding

The console's current output encoding is irrelevant to this problem.

In Windows, pydoc uses the old "more.com" pager with a temporary file that's 
encoded with the default encoding, which is the process active codepage (i.e. 
"ansi" or "mbcs"), unless UTF-8 mode is enabled. The "more.com" utility, 
however, decodes the file using the console's current input codepage from 
GetConsoleCP(), and then it writes the decoded text via wide-character 
WriteConsoleW(). 

The only supported way to query the latter in the standard library is via 
os.device_encoding(0), and that's only if stdin isn't redirected to a file or 
pipe. Alternatively, ctypes can be used via 
ctypes.WinDLL('kernel32').GetConsoleCP(). For the latter, we would need to add 
_winapi.GetConsoleCP(), since using ctypes is discouraged.

--
nosy: +eryksun

___
Python tracker 

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



Re: python 3.9.5

2021-05-31 Thread boB Stepp
On Mon, May 31, 2021 at 8:43 AM said ganoune  wrote:
>
> Hi
> Just installed python 3.9.5 in my HP laptop, cant open it.
> Laptop hp I3 running with windows 10.

Did you try going to your Start Menu list of programs?  There should
be a Python folder.  Click to expand.  Click on IDLE to open an
IDE-like environment where you can either write Python program files
and run them or instead type Python commands into the interpreter
after the ">>>" prompt.

Or you can click on Python 3.9 which will take you to a Windows
terminal-like window (cmd.exe) and present you with the Python
interpreter and the ">>>" prompt for typing in Python commands.

Hope this helps!
boB Stepp
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Inada Naoki


Inada Naoki  added the comment:

Do you use PowerShell?
Please run this command and paste the output.

```
PS> $OutputEncoding
PS> [System.Console]::OutputEncoding
```

--
nosy: +methane

___
Python tracker 

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



[issue44274] Installation problem for python-3.6.4rc1-macosx10.6.pkg-('python cannot be opened because of a problem') in my MacOS11.4

2021-05-31 Thread Abhishek Ramesh


Abhishek Ramesh  added the comment:

Thank you for the information.

On Tue, Jun 1, 2021, 6:48 AM Ned Deily  wrote:

>
> Ned Deily  added the comment:
>
> It appears you are trying to use a very old version of Python 3.6.4 from a
> python.org installer, and a release candidate at that.  This particular
> installer version will not run on current macOS systems. Note that Python
> 3.6 has been in the security-fix-only phase of its life cycle for some
> years now and will reach end-of-life at the end of this year. The current
> supported version of Python 3 is now 3.9.5. If at all possible, you should
> upgrade to it as soon as possible.
>
> If you feel you must use Python 3.6, the last macOS binary installers for
> it were produced for 3.6.8 in 2018; there are two installers for that
> release but only the "10.9 and later" installer variant will even launch at
> all on macOS 11 Big Sur. But keep in mind that there are known issues with
> trying to run Python 3.6 on macOS 11 (i.e. it is not officially supported)
> and there have been many bug and security fixes to Python 3 since that
> installer was built. You should think twice about trying to use it.
>
> https://www.python.org/downloads/
> https://www.python.org/dev/peps/pep-0494/
>
> --
> nosy: +ned.deily
> resolution:  -> out of date
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Ned Deily


Change by Ned Deily :


--
components: +Windows -Documentation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue44274] Installation problem for python-3.6.4rc1-macosx10.6.pkg-('python cannot be opened because of a problem') in my MacOS11.4

2021-05-31 Thread Ned Deily


Ned Deily  added the comment:

It appears you are trying to use a very old version of Python 3.6.4 from a 
python.org installer, and a release candidate at that.  This particular 
installer version will not run on current macOS systems. Note that Python 3.6 
has been in the security-fix-only phase of its life cycle for some years now 
and will reach end-of-life at the end of this year. The current supported 
version of Python 3 is now 3.9.5. If at all possible, you should upgrade to it 
as soon as possible.

If you feel you must use Python 3.6, the last macOS binary installers for it 
were produced for 3.6.8 in 2018; there are two installers for that release but 
only the "10.9 and later" installer variant will even launch at all on macOS 11 
Big Sur. But keep in mind that there are known issues with trying to run Python 
3.6 on macOS 11 (i.e. it is not officially supported) and there have been many 
bug and security fixes to Python 3 since that installer was built. You should 
think twice about trying to use it.

https://www.python.org/downloads/
https://www.python.org/dev/peps/pep-0494/

--
nosy: +ned.deily
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-31 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


Removed file: https://bugs.python.org/file50077/DTD-Matching-Gift-Dashboard - 
Google Sheets.html

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-31 Thread Soffie Swan


Soffie Swan  added the comment:

thanks and god blesse you all

--
nosy: +soffieswan015
type:  -> behavior
Added file: https://bugs.python.org/file50077/DTD-Matching-Gift-Dashboard - 
Google Sheets.html

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-31 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +25070
pull_request: https://github.com/python/cpython/pull/26475

___
Python tracker 

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



[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-05-31 Thread Andre Roberge


Andre Roberge  added the comment:

Up to your best judgment Pablo - and thanks for your ongoing work on improving 
error messages.

--

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset d0991e2db3bb932e2411ee9dca54fd69ff2611c4 by Miss Islington (bot) 
in branch '3.10':
bpo-44246: Remove note about access by index now that a compatibility shim is 
offered. (GH-26472) (#26473)
https://github.com/python/cpython/commit/d0991e2db3bb932e2411ee9dca54fd69ff2611c4


--

___
Python tracker 

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



[issue17153] tarfile extract fails when Unicode in pathname

2021-05-31 Thread Vinay Sajip


Change by Vinay Sajip :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-05-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I suggest to just close it or otherwise changing the message to include "..." 
instead of "Ellipsis". Anything else is actually much more complex than it 
seems, unfortunately

--

___
Python tracker 

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



Re: How to debug python + curses? [was: RE: Applying winpdb_reborn]

2021-05-31 Thread Cameron Simpson
On 30May2021 20:36, Dennis Lee Bieber  wrote:
>On Mon, 31 May 2021 08:07:21 +1000, Cameron Simpson 
>declaimed the following:
>>Open another terminal, note its terminal device with the "tty" 
>>command.
>>Start your programme like this:
>>python .. 2>/dev/tty-of-the-other-termina
>>
>   The OP specified Win10, so the above is dead from the start.

Good point; I wasn't aware that curses worked in Windows.

Is it still unworkable if they've a POSIXish layer to hand, eg Cygwin?

Cheers,
Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue17153] tarfile extract fails when Unicode in pathname

2021-05-31 Thread Zackery Spytz


Zackery Spytz  added the comment:

Python 2.7 is no longer supported, so I think this issue should be closed.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-05-31 Thread Andre Roberge


Andre Roberge  added the comment:

>
> I think that the suggestion to explicitly refer to '...' instead of the
name Ellipsis would be preferable.

Aside: I had not realized that this was done at a different stage for
__debug__ and Ellipsis ("Ignorance is bliss"...) and do realize that this
is a rare corner case that a beginner would almost never encountered.
(I'm just trying my best to prevent any kind of confusion in my own
program, and probably overestimate the potential for confusion here for
cPython users).

--

___
Python tracker 

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



[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-05-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

What we can do is to replace:

SyntaxError: cannot assign to Ellipsis here. Maybe you meant '==' instead of 
'='?

for

SyntaxError: cannot assign to '...' here. Maybe you meant '==' instead of '='?

--

___
Python tracker 

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



[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-05-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Also, another problem is that "cannot assign to __debug__" is actually a 
compiler error, while "cannot assign to Ellipsis here. Maybe you meant '==' 
instead of '='?" is a parser error. This is because "__debug__" is tokenized as 
NAME while '...' is tokenized as ELLIPSIS (it's own token).

--

___
Python tracker 

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



[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-05-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Hu, I sort of agree, but I need to weigh how complex is going to be to 
special-case. I really don't want to start adding many different paths for the 
different built-ins in different situations.

--

___
Python tracker 

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



[issue44260] _Random.seed() is called twice

2021-05-31 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue44260] _Random.seed() is called twice

2021-05-31 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset a6a20658814e8668966fc86de0e80a4772864781 by Serhiy Storchaka in 
branch 'main':
bpo-44260: Do not read system entropy without need in Random() (GH-26455)
https://github.com/python/cpython/commit/a6a20658814e8668966fc86de0e80a4772864781


--

___
Python tracker 

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



Re: Definition of "property"

2021-05-31 Thread Irv Kalb



> On May 30, 2021, at 10:15 AM, Jon Ribbens via Python-list 
>  wrote:
> 
> On 2021-05-30, Irv Kalb  wrote:
>> I understand what a "property" is, how it is used and the benefits,
>> but apparently my explanation hasn't made the light bulb go on for my
>> editor.  The editor is asking for a definition of property.  I've
>> looked at many articles on line and a number of books, and I haven't
>> found an appropriate one yet.
>> 
>> I have written some good examples of how it works, but I agree that a
>> definition up front would be helpful.  I have tried a number of times,
>> but my attempts to define it have not been clear.  Perhaps the best
>> I've found so far is from the Python documentation:  
>> 
>> A property object has getter, setter, and deleter methods usable as
>> decorators that create a copy of the property with the corresponding
>> accessor function set to the decorated function. 
> 
> A property is an attribute of a class that pretends to be a data
> attribute but in fact causes methods to be called when it is
> accessed.

Thank you to everyone who made suggestions of a definition of a property.  I 
will go with a definition based on this one from Jon R, with the clarification 
from Terry R.

Yes, the upcoming book is on object-oriented programing using Python, and goes 
into detail about the concepts behind OOP.  The unique approach is that I use 
pygame and explain how to build a number of user interface "widgets" (like 
buttons, text input and output boxes, draggers, etc.) to show the fundamentals 
of OOP in a highly visible way.  I use these widgets to implement a number of 
small games that also incorporate some additional classes like timers, 
animation, etc.

Irv

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


[issue44227] help(bisect.bisect_left)

2021-05-31 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Conceptually, yes, but the function does return an index,

The function does not return an index.  It returns an integer that represents 
an insertion point.  The documentation is clear about this:

Locate the insertion point for x in a to maintain sorted order.
...
return value is suitable for use as the first
parameter to list.insert()

Likewise, the documented and precise invariants are stated in terms of slice 
points:

   The returned insertion point i partitions the array ``a ``
   into two halves so that ``all(val < x for val in a[lo : i])``
   for the left side and ``all(val >= x for val in a[i : hi])``
   for the right side.


> and values are stored at these indices.

That isn't true:

>>> bisect([], 5)
0

There is no value at 0.

The bisect functions are all about insertion points and ranges.  They aren't 
expressed in terms of an index and value.  The underlying algorithm never 
checks for equality.  Instead, it only uses __lt__(), so it is never aware of 
having "found" a value at all.

For people with use cases expressed in terms of index and value, there is a 
separate section of the docs showing show how to bridge between what they want 
and what the module actually does:

https://docs.python.org/3.10/library/bisect.html#searching-sorted-lists

--

___
Python tracker 

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



[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-05-31 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +pablogsal

___
Python tracker 

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



[issue39529] Deprecate get_event_loop()

2021-05-31 Thread Kyle Stanley


Kyle Stanley  added the comment:

> But why does `asyncio.run` unconditionally create a new event loop instead of 
> running on `asyncio.get_event_loop`? 

AFAIK, it does so for purposes of compatibility in programs that need multiple 
separate event loops and providing a degree of self-dependency. asyncio.run() 
is entirely self-reliant in that it creates all needed resources at the start 
and closes them in finalization, rather than depending on existing resources. I 
believe this to be significantly safer and better guaranteed to function as 
intended, although perhaps at some cost to convenience in cases like your own 
where there only needs to be one event loop.

--

___
Python tracker 

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



[issue41100] Support macOS 11 and Apple Silicon Macs

2021-05-31 Thread Isuru Fernando


Change by Isuru Fernando :


--
nosy: +isuruf
nosy_count: 23.0 -> 24.0
pull_requests: +25069
pull_request: https://github.com/python/cpython/pull/26474

___
Python tracker 

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



Farewell, for now :)

2021-05-31 Thread Kyle Stanley
Hi all,

Last week, I started a new thread on discuss.python.org
 about my
intention to take a further extended break from open source to continue my
mental health healing process. Just wanted to announce it in the other
channels as well since I know that not everyone has the bandwidth to keep
up with more than just the MLs.

In the thread, I discussed my intention to pursue the path of becoming a
Buddhist monk for some time, and recently detailed my adventures at a local
Thai temple. Check it out if you are interested. :)

With Loving Regards,
-- 
--Kyle R. Stanley, Python Core Developer (what is a core dev?
)
*Pronouns: they/them **(why is my pronoun here?*

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


Re: Functions as Enum member values

2021-05-31 Thread Colin McPhail via Python-list



> On 31 May 2021, at 18:24, Peter Otten <__pete...@web.de> wrote:
> 
> On 31/05/2021 17:57, Colin McPhail via Python-list wrote:
>> Hi,
>> According to the enum module's documentation an Enum-based enumeration's 
>> members can have values of any type:
>>  "Member values can be anything: int, str, etc.."
> 
> You didn't read the fineprint ;)
> 
Ah, neither I did.

> """
> The rules for what is allowed are as follows: names that start and end with a 
> single underscore are reserved by enum and cannot be used; all other 
> attributes defined within an enumeration will become members of this 
> enumeration, with the exception of special methods (__str__(), __add__(), 
> etc.), descriptors (methods are also descriptors), and variable names listed 
> in _ignore_
> 
> 
> Functions written in Python are descriptors and therefore cannot be used. 
> Builtin functions aren't, leading to the following somewhat surprising 
> difference:
> 
> >>> def foo(self): print("foo")
> 
> >>> class A(Enum):
>   x = foo  # foo.__get__ exists -> foo is a descriptor
> # the enum library assumes you are adding a
> # method to your
> # class, not an enumeration value.
> 
>   y = sum  # no sum.__get__ attribute -> function
> # treated as an enumeration value.
> 
> >>> list(A)
> [>]
> >>> A.x
> 
> >>> A.y
> >
> >>> A.y.x()
> foo
> 
Thank you for explaining it.

Regards,
Colin

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


[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Jesse Silverman

Jesse Silverman  added the comment:

I looked around some more and it definitely is not just one isolated instance.  
I noted a similar issue on the lines from CLASSES topic pasted here.  I think 
it is all usages of the ellipsis in the context of the help text?  Maybe also 
fancy quote marks that didn't survive the jump from ASCII to Unicode?  And some 
fancy dashes.
The theme of my day was excitement at how much more docs and help ship than I 
had realized with the most basic Python install and thus are at my fingertips 
anywhere, everywhere, internet access or not.  This mars that exuberance only 
slightly.
help> CLASSES
The standard type hierarchy
***

Below is a list of the types that are built into Python.  Extension
modules (written in C, Java, or other languages, depending on the
implementation) can define additional types.  Future versions of
Python may add types to the type hierarchy (e.g., rational numbers,
efficiently stored arrays of integers, etc.), although such additions
will often be provided via the standard library instead.

Some of the type descriptions below contain a paragraph listing
ΓÇÿspecial attributes.ΓÇÖ  These are attributes that provide access to the
...
methodΓÇÖs documentation (same as "__func__.__doc__"); "__name__"
...
dictionary containing the classΓÇÖs namespace; "__bases__" is a tuple
   containing the base classes, in the order of their occurrence in
   the base class list; "__doc__" is the classΓÇÖs documentation string,

ΓÇ£ClassesΓÇ¥.  See section Implementing Descriptors for another way

--

___
Python tracker 

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



Re: Functions as Enum member values

2021-05-31 Thread Peter Otten

On 31/05/2021 17:57, Colin McPhail via Python-list wrote:

Hi,

According to the enum module's documentation an Enum-based enumeration's 
members can have values of any type:

"Member values can be anything: int, str, etc.."


You didn't read the fineprint ;)

"""
The rules for what is allowed are as follows: names that start and end 
with a single underscore are reserved by enum and cannot be used; all 
other attributes defined within an enumeration will become members of 
this enumeration, with the exception of special methods (__str__(), 
__add__(), etc.), descriptors (methods are also descriptors), and 
variable names listed in _ignore_



Functions written in Python are descriptors and therefore cannot be 
used. Builtin functions aren't, leading to the following somewhat 
surprising difference:


>>> def foo(self): print("foo")

>>> class A(Enum):
x = foo  # foo.__get__ exists -> foo is a descriptor
 # the enum library assumes you are adding a
 # method to your
 # class, not an enumeration value.

y = sum  # no sum.__get__ attribute -> function
 # treated as an enumeration value.

>>> list(A)
[>]
>>> A.x

>>> A.y
>
>>> A.y.x()
foo


I defined one with functions as member values. This seemed to work as long as the functions 
were defined ahead of the enumeration's definition. However I then noticed that my 
enumeration class was a bit weird: even although I could reference the enumeration's 
members individually by name I couldn't iterate through the members in the normal fashion - 
it seemed to have no members. Also, calling type() on a member gave the result  instead of the expected .

I am using Python 3.9.5 from python.org on macOS 11.4. Below is a small test 
script and its output. Are my expectations wrong or is there a problem with 
Enum?

Regards,
Colin

---
from enum import Enum

def connect_impl():
 print("message from connect_impl()")

def help_impl():
 print("message from help_impl()")

class Command1(Enum):
 CONNECT = 1
 HELP = 2

class Command2(Enum):
 CONNECT = connect_impl
 HELP = help_impl

if __name__ == "__main__":

 def print_enum(cls, mbr):
 print(f"{cls.__name__}\n  type(): {type(Command1)}")
 print(f"  type of enum member: {type(mbr)}")
 print(f"  number of members: {len(cls)}")
 print("  enum members:")
 if len(cls) > 0:
 for c in cls:
 print(f"{c}")
 else:
 print("")
 print(f"  dir(): {dir(cls)}")

 member_1 = Command1.HELP
 print_enum(Command1, member_1)
 print()

 member_2 = Command2.HELP
 print_enum(Command2, member_2)
 print()
 print("call Command2 member: ", end="")
 member_2()
 print()

---
(qt6) % python3 try_enum.py
Command1
   type(): 
   type of enum member: 
   number of members: 2
   enum members:
 Command1.CONNECT
 Command1.HELP
   dir(): ['CONNECT', 'HELP', '__class__', '__doc__', '__members__', 
'__module__']

Command2
   type(): 
   type of enum member: 
   number of members: 0
   enum members:
 
   dir(): ['__class__', '__doc__', '__members__', '__module__']

call Command2 member: message from help_impl()

(qt6) %
---




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


[issue15795] Zipfile.extractall does not preserve file permissions

2021-05-31 Thread Éric Araujo

Éric Araujo  added the comment:

The pull request needs unit tests added to validate the changes.

Note that the patch attached here was a new feature, adding constants and 
parameters to control the behaviour, but the PR simply checks and applies 
permissions bits stored in the entry.  That seems correct and nice to me, and 
arguably a bugfix that should be backported, but more active core devs and/or 
zipfile experts should weigh in.

--
nosy: +eric.araujo
versions: +Python 3.10 -Python 3.5

___
Python tracker 

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



[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Andre Roberge

Andre Roberge  added the comment:

I observe something similar, though with different symbols. My Windows 
installation uses French (fr-ca) as default language.
===
help> COMPARISON
Comparisons
***

...

Formally, if *a*, *b*, *c*, à, *y*, *z* are expressions and *op1*,
*op2*, à, *opN* are comparison operators, then "a op1 b op2 c ... y
opN z" is equivalent to "a op1 b and b op2 c and ... y opN z", except
that each expression is evaluated at most once.

Note that "a op1 b op2 c" doesnÆt imply any kind of comparison between
*a* and *c*, so that, e.g., "x < y > z" is perfectly legal (though
perhaps not pretty).

So, in my case, the unusual characters are: à, Æ.  In this case, the French 
word 'à' would make some sense in this context (as it means 'to' in English).

--
nosy: +aroberge

___
Python tracker 

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



[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Jesse Silverman

New submission from Jesse Silverman :

I didn't know whether to file this under DOCUMENTATION or WINDOWS.
I recently discovered the joys of the interactive help in the REPL, rather than 
just help(whatever).
I was exploring the topics and noticed multiple encoding or rendering errors.
I realized I stupidly wasn't using the Windows Terminal program but the default 
console.  I addressed that and they persisted in Windows Terminal.
I upgraded from 3.9.1 to 3.9.5...same deal.

I tried running:
Set-Item -Path Env:PYTHONUTF8 -Value 1

before starting the REPL, still no dice.

I confirmed this worked in the same session:
>>> ustr2='ʑʒʓʔʕʗʘʙʚʛʜʝʞ'
>>> ustr2
'ʑʒʓʔʕʗʘʙʚʛʜʝʞ'
It does.

The help stuff that doesn't render correctly is under topic COMPARISON:
lines 20, 21 and 25 of this output contain head-scratch-inducing mystery 
characters:
help> COMPARISON
Comparisons
***

Unlike C, all comparison operations in Python have the same priority,
which is lower than that of any arithmetic, shifting or bitwise
operation.  Also unlike C, expressions like "a < b < c" have the
interpretation that is conventional in mathematics:

   comparison::= or_expr (comp_operator or_expr)*
   comp_operator ::= "<" | ">" | "==" | ">=" | "<=" | "!="
 | "is" ["not"] | ["not"] "in"

Comparisons yield boolean values: "True" or "False".

Comparisons can be chained arbitrarily, e.g., "x < y <= z" is
equivalent to "x < y and y <= z", except that "y" is evaluated only
once (but in both cases "z" is not evaluated at all when "x < y" is
found to be false).

Formally, if *a*, *b*, *c*, …, *y*, *z* are expressions and *op1*,
*op2*, …, *opN* are comparison operators, then "a op1 b op2 c ... y
opN z" is equivalent to "a op1 b and b op2 c and ... y opN z", except
that each expression is evaluated at most once.

Note that "a op1 b op2 c" doesnΓÇÖt imply any kind of comparison between
*a* and *c*, so that, e.g., "x < y > z" is perfectly legal (though
perhaps not pretty).

That is: …, …, ’

em-dash or ellipsis might be involved somehow...maybe fancy apostrophe?
My current guess is that it isn't about rendering anymore, because something 
went awry further upstream?

Thanks!

--
assignee: docs@python
components: Documentation
messages: 394817
nosy: docs@python, jessevsilverman
priority: normal
severity: normal
status: open
title: Is there a mojibake problem rendering interactive help in the REPL on 
Windows?
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread miss-islington


miss-islington  added the comment:


New changeset 7207203e1d71e4bf65e5b4991f60e7dc1e35e813 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-44246: Restore compatibility in entry_points (GH-26468) (GH-26471)
https://github.com/python/cpython/commit/7207203e1d71e4bf65e5b4991f60e7dc1e35e813


--

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25068
pull_request: https://github.com/python/cpython/pull/26473

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 78d9a9b1904f0e1d9db1e941c19782f4f5a881d4 by Jason R. Coombs in 
branch 'main':
bpo-44246: Remove note about access by index now that a compatibility shim is 
offered. (GH-26472)
https://github.com/python/cpython/commit/78d9a9b1904f0e1d9db1e941c19782f4f5a881d4


--

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +25067
pull_request: https://github.com/python/cpython/pull/26472

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

The compatibility concerns are addressed with PR 26468 and some of the 
performance concerns may be mitigated with PR 26467. As I mentioned before, if 
there are continuing performance concerns, please raise them separately 
(preferably with python/importlib_metadata, and please include use-cases that 
exemplify not just the effect, but the impact.

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset c34ed08d975fb7daa7b329f7c631647782290393 by Jason R. Coombs in 
branch 'main':
bpo-44246: Restore compatibility in entry_points (GH-26468)
https://github.com/python/cpython/commit/c34ed08d975fb7daa7b329f7c631647782290393


--

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread miss-islington


miss-islington  added the comment:


New changeset d1480ad2f5d5f02ecbe4b4091e8c428ddfa39ff6 by Miss Islington (bot) 
in branch '3.10':
bpo-44246: Entry points performance improvements. (GH-26467)
https://github.com/python/cpython/commit/d1480ad2f5d5f02ecbe4b4091e8c428ddfa39ff6


--

___
Python tracker 

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



[issue44048] test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot

2021-05-31 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


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

___
Python tracker 

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



Functions as Enum member values

2021-05-31 Thread Colin McPhail via Python-list
Hi,

According to the enum module's documentation an Enum-based enumeration's 
members can have values of any type:

"Member values can be anything: int, str, etc.."

I defined one with functions as member values. This seemed to work as long as 
the functions were defined ahead of the enumeration's definition. However I 
then noticed that my enumeration class was a bit weird: even although I could 
reference the enumeration's members individually by name I couldn't iterate 
through the members in the normal fashion - it seemed to have no members. Also, 
calling type() on a member gave the result  instead of the 
expected .

I am using Python 3.9.5 from python.org on macOS 11.4. Below is a small test 
script and its output. Are my expectations wrong or is there a problem with 
Enum?

Regards,
Colin

---
from enum import Enum

def connect_impl():
print("message from connect_impl()")

def help_impl():
print("message from help_impl()")

class Command1(Enum):
CONNECT = 1
HELP = 2

class Command2(Enum):
CONNECT = connect_impl
HELP = help_impl

if __name__ == "__main__":

def print_enum(cls, mbr):
print(f"{cls.__name__}\n  type(): {type(Command1)}")
print(f"  type of enum member: {type(mbr)}")
print(f"  number of members: {len(cls)}")
print("  enum members:")
if len(cls) > 0:
for c in cls:
print(f"{c}")
else:
print("")
print(f"  dir(): {dir(cls)}")

member_1 = Command1.HELP
print_enum(Command1, member_1)
print()

member_2 = Command2.HELP
print_enum(Command2, member_2)
print()
print("call Command2 member: ", end="")
member_2()
print()

---
(qt6) % python3 try_enum.py
Command1
  type(): 
  type of enum member: 
  number of members: 2
  enum members:
Command1.CONNECT
Command1.HELP
  dir(): ['CONNECT', 'HELP', '__class__', '__doc__', '__members__', 
'__module__']

Command2
  type(): 
  type of enum member: 
  number of members: 0
  enum members:

  dir(): ['__class__', '__doc__', '__members__', '__module__']

call Command2 member: message from help_impl()

(qt6) % 
---

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


[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25064
pull_request: https://github.com/python/cpython/pull/26469

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 410b70d39d9d77384f8b8597560f6731530149ca by Jason R. Coombs in 
branch 'main':
bpo-44246: Entry points performance improvements. (GH-26467)
https://github.com/python/cpython/commit/410b70d39d9d77384f8b8597560f6731530149ca


--

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +25063
pull_request: https://github.com/python/cpython/pull/26468

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +25062
pull_request: https://github.com/python/cpython/pull/26467

___
Python tracker 

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



[issue44272] DeprecationWarning: The *random* parameter to shuffle() has been deprecated since Python 3.9 and will be removed in a subsequent version

2021-05-31 Thread Irit Katriel


Irit Katriel  added the comment:

If you pass an integer to a function that expects a sequence you get an error 
message (in most languages).

Please read the documentation.

--

___
Python tracker 

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



[issue44274] Installation problem for python-3.6.4rc1-macosx10.6.pkg-('python cannot be opened because of a problem') in my MacOS11.4

2021-05-31 Thread Abhishek Ramesh


New submission from Abhishek Ramesh :

Process:   Python [98546]
Path:  
/Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python
Identifier:Python
Version:   3.6.4rc1 (3.6.4rc1)
Code Type: X86-64 (Native)
Parent Process:zsh [98306]
Responsible:   Terminal [98304]
User ID:   501

Date/Time: 2021-05-31 20:29:06.728 +0530
OS Version:macOS 11.4 (20F71)
Report Version:12
Anonymous UUID:8C556153-D4E6-C8AE-84FD-AF178FDC2C1E

Sleep/Wake UUID:   FD76DA89-FD05-4CE3-8F34-101C34A63578

Time Awake Since Boot: 10 seconds
Time Since Wake:   64 seconds

System Integrity Protection: enabled

Crashed Thread:0

Exception Type:EXC_CRASH (SIGABRT)
Exception Codes:   0x, 0x
Exception Note:EXC_CORPSE_NOTIFY

Termination Reason:DYLD, [0x1] Library missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  dyld: No shared cache present
Library not loaded: 
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
  Referenced from: 
/Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python
  Reason: image not found

Binary Images:
   0x1 -0x10fff +org.python.python (3.6.4rc1 - 
3.6.4rc1)  
/Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python
0x7fff6a3cc000 - 0x7fff6a467fff  dyld (852) 
<1AC76561-4F9A-34B1-BA7C-4516CACEAED7> /usr/lib/dyld

Model: MacBookPro14,1, BootROM 429.120.4.0.0, 2 processors, Dual-Core Intel 
Core i5, 2.3 GHz, 8 GB, SMC 2.43f11
Graphics: kHW_IntelIrisGraphics640Item, Intel Iris Plus Graphics 640, 
spdisplays_builtin
Memory Module: BANK 0/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x802C, 
0x4D5435324C3531324D3332443250462D3039
Memory Module: BANK 1/DIMM0, 4 GB, LPDDR3, 2133 MHz, 0x802C, 
0x4D5435324C3531324D3332443250462D3039
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x170), Broadcom 
BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1680.8)
Bluetooth: Version 8.0.5d7, 3 services, 18 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB 3.0 Bus
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.4

--
files: Screenshot 2021-05-31 at 8.30.21 PM.png
messages: 394809
nosy: abhishek5799
priority: normal
severity: normal
status: open
title: Installation problem for python-3.6.4rc1-macosx10.6.pkg-('python cannot 
be opened because of a problem') in my MacOS11.4
versions: Python 3.6
Added file: https://bugs.python.org/file50076/Screenshot 2021-05-31 at 8.30.21 
PM.png

___
Python tracker 

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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread Anthony Sottile


Anthony Sottile  added the comment:

it does not, it restores apis but in a way which requires a huge performance 
hit to avoid deprecation warnings

it also still has the 2-500x performance regression I've stated above

--

___
Python tracker 

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



[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-05-31 Thread Andre Roberge


New submission from Andre Roberge :

Consider the following in Python 3.10

>>> ... = 1
  File "", line 1
... = 1
^^^
SyntaxError: cannot assign to Ellipsis here. Maybe you meant '==' instead of 
'='?
>>> __debug__ = 1
  File "", line 1
SyntaxError: cannot assign to __debug__

In prior Python versions, assignments to Ellisis written as ... were treated 
the same as assignment to __debug__. I believe that the old message was a 
better choice.

The error message about assigning to Ellipsis (...) is made even more confusing 
since Ellipsis (the name) can be assigned to a different value.

>>> ... == Ellipsis
True
>>> Ellipsis = 1
>>> ... == Ellipsis
False
>>> ...
Ellipsis

--
components: Interpreter Core
messages: 394808
nosy: aroberge
priority: normal
severity: normal
status: open
title: Assigning to Ellipsis should be the same as assigning to __debug__
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



[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-05-31 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

importlib_metadata 4.4 restores compatibility for the reported concerns. I'll 
merge those into CPython later.

--

___
Python tracker 

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



EuroPython 2021: Session List Available

2021-05-31 Thread Marc-Andre Lemburg
Our program work group (WG) has been working hard over the last week to
select sessions for EuroPython 2021, based on your talk voting and our
diversity criteria.

We’re now happy to announce the initial list with more than 100
sessions, brought to you by more than 100 speakers.

   * EuroPython 2021 Session List *

 https://ep2021.europython.eu/events/sessions/


More than 130 sessions
--

In the coming weeks, we will complete the session list, adding keynotes,
sponsored talks and training sessions. Once finalized, we expect to have
more than 130 sessions waiting for, including three lightning talk
slots, six keynotes, a recruiting session and several free sponsored
training sessions.

The program work group will start working on the schedule, which should
be ready in about two weeks.

Conference Tickets
--

Conference tickets are available on our registration page. We have
several ticket types available to make the conference affordable for
everyone and we're also offering financial aid to increase our reach
even more.

https://ep2021.europython.eu/registration/buy-tickets/
https://ep2021.europython.eu/registration/financial-aid/

As always, all proceeds from the conference will go into our grants
budget, which we use to fund financial aid for the next EuroPython
edition, special workshops and other European conferences and projects:

  * EuroPython Society Grants Program *

 https://www.europython-society.org/grants


We hope to see lots of you at the conference in July. Rest assured that
we’ll make this a great event again — even within the limitations of
running the conference online.


Quick Summary
-
EuroPython 2021 will be run online from July 26 - August 1:

- Two workshop/training days (July 26 - 27)
- Three conference days (July 28 - 30)
- Two sprint days (July 31 - August 1)

The sessions will be scheduled to ensure they are also accessible for
those in the Asian and Americas time zones.


Help spread the word


Please help us spread this message by sharing it on your social
networks as widely as possible. Thank you !

Link to the blog post:

https://blog.europython.eu/europython-2020-initial-session-list-available/

Tweet:

https://twitter.com/europython/status/1399357596117708812

Enjoy,
--
EuroPython 2021 Team
https://ep2021.europython.eu/
https://www.europython-society.org/

___
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


EuroPython 2021: Session List Available

2021-05-31 Thread Marc-Andre Lemburg
Our program work group (WG) has been working hard over the last week to
select sessions for EuroPython 2021, based on your talk voting and our
diversity criteria.

We’re now happy to announce the initial list with more than 100
sessions, brought to you by more than 100 speakers.

   * EuroPython 2021 Session List *

 https://ep2021.europython.eu/events/sessions/


More than 130 sessions
--

In the coming weeks, we will complete the session list, adding keynotes,
sponsored talks and training sessions. Once finalized, we expect to have
more than 130 sessions waiting for, including three lightning talk
slots, six keynotes, a recruiting session and several free sponsored
training sessions.

The program work group will start working on the schedule, which should
be ready in about two weeks.

Conference Tickets
--

Conference tickets are available on our registration page. We have
several ticket types available to make the conference affordable for
everyone and we're also offering financial aid to increase our reach
even more.

https://ep2021.europython.eu/registration/buy-tickets/
https://ep2021.europython.eu/registration/financial-aid/

As always, all proceeds from the conference will go into our grants
budget, which we use to fund financial aid for the next EuroPython
edition, special workshops and other European conferences and projects:

  * EuroPython Society Grants Program *

 https://www.europython-society.org/grants


We hope to see lots of you at the conference in July. Rest assured that
we’ll make this a great event again — even within the limitations of
running the conference online.


Quick Summary
-
EuroPython 2021 will be run online from July 26 - August 1:

- Two workshop/training days (July 26 - 27)
- Three conference days (July 28 - 30)
- Two sprint days (July 31 - August 1)

The sessions will be scheduled to ensure they are also accessible for
those in the Asian and Americas time zones.


Help spread the word


Please help us spread this message by sharing it on your social
networks as widely as possible. Thank you !

Link to the blog post:

https://blog.europython.eu/europython-2020-initial-session-list-available/

Tweet:

https://twitter.com/europython/status/1399357596117708812

Enjoy,
--
EuroPython 2021 Team
https://ep2021.europython.eu/
https://www.europython-society.org/

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


Re: Definition of "property"

2021-05-31 Thread Greg Ewing

On 31/05/21 9:13 am, Jon Ribbens wrote:

No, I said it pretends to be a *data* attribute.


I don't think it's pretending to be anything. From the outside,
it's just an attribute.

Data attributes are more common than non-data attributes, so
we tend to assume that an attribute is a data attribute until
told otherwise. But that's just our psychological bias, not
because of any pretence on the part of properties.

Also, there's a sense in which *all* attributes are properties.
At the lowest level, all attribute accesses end up calling
a method. It's just that in most cases the method is implemented
in C and it looks up a value in the object's dict.

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


Re: Definition of "property"

2021-05-31 Thread Greg Ewing

On 31/05/21 4:57 am, Irv Kalb wrote:

Perhaps the best I've found so far is from the Python documentation:

A property object has getter, setter, and deleter methods usable as decorators 
that create a copy of the property with the corresponding accessor function set 
to the decorated function.


That's not a definition of a property -- it's talking about a
mechanism that provides one way of creating a property, using
decorators. DON'T quote that as a definition!

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


Re: Definition of "property"

2021-05-31 Thread Greg Ewing

On 31/05/21 8:20 am, Alan Gauld wrote:


That's a very Pythonic description.


If it's a book about Python, it needs to be. The word "property"
has a very specialised meaning in Python.

In some other languages it's used the way we use "attribute" in
Python. So a Python-specific definition is necessarily going
to be very different from a generic one.

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


python 3.9.5

2021-05-31 Thread said ganoune
Hi
Just installed python 3.9.5 in my HP laptop, cant open it.
Laptop hp I3 running with windows 10.

Thank you


Sent from Mail for Windows 10

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


Re: Definition of "property"

2021-05-31 Thread Alan Gauld via Python-list
On 30/05/2021 23:57, Mike Dewhirst wrote:

> 
> A property is an object method masquerading as a cachable object attribute

Or a group of methods perhaps?

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


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


Re: Definition of "property"

2021-05-31 Thread Jon Ribbens via Python-list
On 2021-05-30, Terry Reedy  wrote:
> Note: at least one person says a property *pretends* to be an attribute. 

No, I said it pretends to be a *data* attribute. It is effectively
several methods in a trenchcoat pretending to be a variable.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue44271] asyncio random crash with longtime run

2021-05-31 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
title: asyncio random carsh with longtime run -> asyncio random crash with 
longtime run

___
Python tracker 

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



[issue44229] Intermittent connection errors in ssl tests on macOS CI

2021-05-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Are you sure? All the reports are from macOS CI. Christian mentioned that it 
> could be similar to another ssl test failure that also happen on Windows, but 
> those tracebacks do not match the ones in this issue.

I am certainly not sure, but I think they are related.

--

___
Python tracker 

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



[issue44272] DeprecationWarning: The *random* parameter to shuffle() has been deprecated since Python 3.9 and will be removed in a subsequent version

2021-05-31 Thread Kshitish Kumar


Kshitish Kumar  added the comment:

I was expecting a proper result from this code. Because If you do same thing in 
other computer language. You will get a proper answer.

--

___
Python tracker 

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



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread miss-islington


miss-islington  added the comment:


New changeset 46b16d0bdbb1722daed10389e27226a2370f1635 by Miss Islington (bot) 
in branch '3.9':
bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464)
https://github.com/python/cpython/commit/46b16d0bdbb1722daed10389e27226a2370f1635


--

___
Python tracker 

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



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7fe9cad606a4ac7ac138528dcd19546394bc5a44 by Miss Islington (bot) 
in branch '3.10':
bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464) (GH-26465)
https://github.com/python/cpython/commit/7fe9cad606a4ac7ac138528dcd19546394bc5a44


--

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset f097d2302be46b031687726011b86fc241a042ef by Miss Islington (bot) 
in branch '3.10':
bpo-42972: Fully implement GC protocol for xxlimited (GH-26451) (GH-26460)
https://github.com/python/cpython/commit/f097d2302be46b031687726011b86fc241a042ef


--

___
Python tracker 

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



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25061
pull_request: https://github.com/python/cpython/pull/26466

___
Python tracker 

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



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25060
pull_request: https://github.com/python/cpython/pull/26465

___
Python tracker 

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



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 142e5c5445c019542246d93fe2f9e195d3131686 by Victor Stinner in 
branch 'main':
bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464)
https://github.com/python/cpython/commit/142e5c5445c019542246d93fe2f9e195d3131686


--

___
Python tracker 

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



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +25059
pull_request: https://github.com/python/cpython/pull/26464

___
Python tracker 

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



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue44272] DeprecationWarning: The *random* parameter to shuffle() has been deprecated since Python 3.9 and will be removed in a subsequent version

2021-05-31 Thread Steven D'Aprano


Change by Steven D'Aprano :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue42213] Get rid of cyclic GC hack in sqlite3.Connection and sqlite3.Cache

2021-05-31 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +25057
pull_request: https://github.com/python/cpython/pull/26462

___
Python tracker 

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



[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-05-31 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue. I would prefer to change PyType_FromSpecWithBases() to 
raise an error if a type has the Py_TPFLAGS_HAVE_GC flag but its tp_traverse 
function is NULL.

Oops, the Python stdlib has more types than only _ssl.SSLError with this error:

* _decimal: PyDecSignalDictMixin_Type (internal type)
* _testcapi: heapctype

--
nosy: +vstinner
status: closed -> open

___
Python tracker 

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



[issue44229] Intermittent connection errors in ssl tests on macOS CI

2021-05-31 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

FWIW:

1st shell:
$ ./python.exe -m test test_ssl -u all -m test_get_server_certificate -F
$ ps
[...]
 1271 ttys0040:01.00 ./python.exe -m test test_ssl -u all -m 
test_get_server_certificate -F

2nd shell:
$ sudo errinfo -p 1271

The syscall trace shows that errno 41 is returned by write():
  python.exewrite   41  Protocol wrong type for socket 
  python.exeioctl   25  Inappropriate ioctl for device 
  python.exeioctl   25  Inappropriate ioctl for device 
  python.exeioctl   25  Inappropriate ioctl for device 
  python.exeioctl   25  Inappropriate ioctl for device 
  python.exe  connect   61  Connection refused 
  python.exe  connect   61  Connection refused 
  python.exeioctl   25  Inappropriate ioctl for device 
  python.exeioctl   25  Inappropriate ioctl for device 
  python.exeioctl   25  Inappropriate ioctl for device 
  python.exeioctl   25  Inappropriate ioctl for device 
  python.exe   stat642  No such file or directory

--

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ff359d735f1a60878975d1c5751bfd2361e84067 by Miss Islington (bot) 
in branch '3.10':
bpo-42972: Fix sqlite3 traverse/clear functions (GH-26452) (GH-26461)
https://github.com/python/cpython/commit/ff359d735f1a60878975d1c5751bfd2361e84067


--

___
Python tracker 

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



[issue44271] asyncio random carsh with longtime run

2021-05-31 Thread 世界第一好吃

世界第一好吃  added the comment:

I test it on
OS :Windows 10 Pro x64
Python: 3.9.5 x64

This Code if work will it will print "are you ok" and stop.
bug it print a random line like "done task 20897" ,stop print ,press Ctrl+C 
cannot break it.

--

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d1124b09e8251061dc040cbd396f35ae57783f4a by Erlend Egeberg 
Aasland in branch 'main':
bpo-42972: Fix sqlite3 traverse/clear functions (GH-26452)
https://github.com/python/cpython/commit/d1124b09e8251061dc040cbd396f35ae57783f4a


--

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25056
pull_request: https://github.com/python/cpython/pull/26461

___
Python tracker 

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



[issue44271] asyncio random carsh with longtime run

2021-05-31 Thread Irit Katriel

Irit Katriel  added the comment:

What’s the output, what system are you using?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue44272] DeprecationWarning: The *random* parameter to shuffle() has been deprecated since Python 3.9 and will be removed in a subsequent version

2021-05-31 Thread Irit Katriel


Irit Katriel  added the comment:

What were you expecting?

The documentation is here:
https://docs.python.org/3/library/random.html

--
nosy: +iritkatriel

___
Python tracker 

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



[issue44272] DeprecationWarning: The *random* parameter to shuffle() has been deprecated since Python 3.9 and will be removed in a subsequent version

2021-05-31 Thread Kshitish Kumar


New submission from Kshitish Kumar :

Code:

import random as ran


x = ran.shuffle(10,random=1)

Output:

DeprecationWarning: The *random* parameter to shuffle() has been deprecated 
since Python 3.9 and will be removed in a subsequent version.

 x = ran.shuffle(10,random=1)
  File "C:\Users\nisha\AppData\Local\Programs\Python\Python39\lib\random.py", 
line 369, in shuffle
for i in reversed(range(1, len(x))):
TypeError: object of type 'int' has no len()

--
files: main.py
messages: 394792
nosy: Kkshitish
priority: normal
severity: normal
status: open
title: DeprecationWarning: The *random* parameter to shuffle() has been 
deprecated since Python 3.9 and will be removed in a subsequent version
versions: Python 3.9
Added file: https://bugs.python.org/file50075/main.py

___
Python tracker 

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



[issue11871] test_default_timeout() of test_threading.BarrierTests failure: BrokenBarrierError

2021-05-31 Thread STINNER Victor


Change by STINNER Victor :


--
status: closed -> open

___
Python tracker 

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



[issue11871] test_default_timeout() of test_threading.BarrierTests failure: BrokenBarrierError

2021-05-31 Thread STINNER Victor


STINNER Victor  added the comment:

10 years ago, the issue is not solved. Recent failure on AMD64 Windows8.1 
Refleaks PR buildbot:
https://buildbot.python.org/all/#/builders/470/builds/45

The issue started to make the buildbot fail since I added a 
threading.excepthook in libregrtest.

0:58:59 load avg: 4.46 [107/427/2] test_threading failed (1 min 21 sec) -- 
running: test_bufio (9 min 53 sec), test_asyncio (5 min 29 sec), 
test_compileall (19 min 3 sec)
beginning 6 repetitions
123456
..Warning -- Unraisable exception
Exception ignored in thread started by: .task 
at 0x00F31C974050>
Traceback (most recent call last):
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\test\lock_tests.py",
 line 48, in task
f()
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\test\lock_tests.py",
 line 998, in f
i = barrier.wait()
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\threading.py", 
line 661, in wait
self._wait(timeout)
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\threading.py", 
line 701, in _wait
raise BrokenBarrierError
threading.BrokenBarrierError: 
Warning -- Unraisable exception
Exception ignored in thread started by: .task 
at 0x00F31C974050>
Traceback (most recent call last):
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\test\lock_tests.py",
 line 48, in task
f()
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\test\lock_tests.py",
 line 998, in f
i = barrier.wait()
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\threading.py", 
line 661, in wait
self._wait(timeout)
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\threading.py", 
line 701, in _wait
raise BrokenBarrierError
threading.BrokenBarrierError: 
Warning -- Unraisable exception
Exception ignored in thread started by: .task 
at 0x00F31C974050>
Traceback (most recent call last):
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\test\lock_tests.py",
 line 48, in task
f()
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\test\lock_tests.py",
 line 998, in f
i = barrier.wait()
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\threading.py", 
line 652, in wait
self._enter() # Block while the barrier drains.
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\threading.py", 
line 676, in _enter
raise BrokenBarrierError
threading.BrokenBarrierError: 
Warning -- Unraisable exception
Exception ignored in thread started by: .task 
at 0x00F31C974050>
Traceback (most recent call last):
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\test\lock_tests.py",
 line 48, in task
f()
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\test\lock_tests.py",
 line 998, in f
i = barrier.wait()
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\threading.py", 
line 652, in wait
self._enter() # Block while the barrier drains.
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\threading.py", 
line 676, in _enter
raise BrokenBarrierError
threading.BrokenBarrierError: 
test test_threading failed -- Traceback (most recent call last):
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\test\lock_tests.py",
 line 1003, in test_default_timeout
self.run_threads(f)
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\test\lock_tests.py",
 line 832, in run_threads
f()
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\test\lock_tests.py",
 line 998, in f
i = barrier.wait()
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\threading.py", 
line 661, in wait
self._wait(timeout)
  File 
"D:\buildarea\pull_request.ware-win81-release.refleak\build\lib\threading.py", 
line 699, in _wait
raise BrokenBarrierError
threading.BrokenBarrierError

--
resolution: out of date -> 

___
Python tracker 

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



[issue44271] asyncio random carsh with longtime run

2021-05-31 Thread 世界第一好吃

New submission from 世界第一好吃 :

import asyncio
import timeit

num = 0


async def test():
global num
num += 1
print(f"done task {num}")
return f"task: {num}"


async def main():
task = asyncio.create_task(test())

# ko = await test()
# print(await task, ko)


if __name__ == '__main__':
number = 100
while number:
number -= 1
asyncio.run(main())
print("are you ok")
# time_stage = timeit.timeit("asyncio.run(main())", globals=globals(), 
number=10)
# print(time_stage)

--
components: +asyncio
nosy: +asvetlov, yselivanov
title: asyncio random -> asyncio random carsh with longtime run
type:  -> crash
versions: +Python 3.9
Added file: https://bugs.python.org/file50074/wait.py

___
Python tracker 

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



[issue44271] asyncio random

2021-05-31 Thread 世界第一好吃

Change by 世界第一好吃 :


--
nosy: twbt4f
priority: normal
severity: normal
status: open
title: asyncio random

___
Python tracker 

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



ANN: distlib 0.3.2 released on PyPI

2021-05-31 Thread Vinay Sajip via Python-announce-list
I've recently released version 0.3.2 of distlib on PyPI [1]. For newcomers,
distlib is a library of packaging functionality which is intended to be
usable as the basis for third-party packaging tools.

The main changes in this release are as follows:

* Fixed #139: improved handling of errors related to the test PyPI server.

* Fixed #140: allowed "Obsoletes" in more scenarios, to better handle faulty
  metadata already on PyPI.

* Fixed #141: removed unused regular expression.

* Fixed #143: removed normcase() to avoid some problems on Windows.

* Fixed #146: added entry for SourcelessFileLoader to the finder registry.

* Fixed #147: permission bits are now preserved on POSIX when installing from a 
wheel.

* Made the generation of scripts more configurable.

* Added support for manylinux wheel tags.

A more detailed change log is available at [2].

Please try it out, and if you find any problems or have any suggestions for 
improvements,
please give some feedback using the issue tracker! [3]

Regards,

Vinay Sajip

[1] https://pypi.org/project/distlib/0.3.2/
[2] https://distlib.readthedocs.io/en/0.3.2/
[3] https://bitbucket.org/pypa/distlib/issues/new
___
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


[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-31 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4b20f2574d412f4c4a5b1ab799d8e71a5dd3b766 by Hai Shi in branch 
'main':
bpo-42972: Fully implement GC protocol for xxlimited (GH-26451)
https://github.com/python/cpython/commit/4b20f2574d412f4c4a5b1ab799d8e71a5dd3b766


--

___
Python tracker 

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



[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-31 Thread miss-islington


Change by miss-islington :


--
pull_requests: +25055
pull_request: https://github.com/python/cpython/pull/26460

___
Python tracker 

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



[issue43964] ctypes CDLL search path issue on MacOS

2021-05-31 Thread Victor Lazzarini


Victor Lazzarini  added the comment:

Hi Ned,

thanks for your detailed response. I have to say that the LD_LIBRARY_PATH 
partially worked in some cases, the library got loaded. However in cases where 
there were dependencies, further issues appeared particularly when the  link 
(as revealed by otool -L) was prefixed by '@rpath'. I was able to fix these by 
editing these paths (which is possible in my use case), but we just need to 
note that it may cause difficulties for others.

We also found a solution to avoid needing to set the environment var. We use 
the following code

ct.CDLL(ctypes.util.find_library('mylib'))

instead of just passing the library. That works well, and perhaps you may 
recommend it in the docs.

--

___
Python tracker 

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



  1   2   >