[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[issue44262] tarfile: some content different output

2021-05-31 Thread Vasco Gervasi


Vasco Gervasi  added the comment:

Yes, you can close it.

For future reference:

tar_reset = "/tmp/py_tar_reset.tar"

def reset(tarinfo):
tarinfo.uid = tarinfo.gid = 0
tarinfo.uname = tarinfo.gname = "root"
tarinfo.mtime = 1
return tarinfo

with tarfile.open(tar_reset, "w:xz") as tar_obj:
tar_obj.add("/tmp/a", arcname="a", filter=reset)

--

___
Python tracker 

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