[issue45839] python3 executable is able to install pandas

2021-11-21 Thread Muhammad Irfan Asghar


Muhammad Irfan Asghar  added the comment:

Hi

I am really astonished and I have tried all tricks, help available on
internet. Is there any manual way to do this. i.e open any file and enter
information separately so that ssL certificate issue can be solved. or can
you tell me, how you configured your mac.

Irfan

On Sun, Nov 21, 2021 at 1:45 AM Ned Deily  wrote:

>
> Ned Deily  added the comment:
>
> That is very unusual behavior. Pip has its own private certificate store
> that it uses to make secure connections to pypi.org and the version of
> pip supplied with the python.org 3.10.0 macOS installer should work just
> fine as is. I just verified that it works for me. I'm just guessing here
> but I think the most likely cause of this behavior is that your internet
> connection is behind a misconfigured or malevolent proxy server. You may
> want to check your DNS settings as well to try to use a neutral DNS
> provider. There are discussions of similar problems on the web: try
> searching for: pypi self signed certificate in certificate chain. Good luck!
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py

2021-11-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

BTW, is not the correct name _IGNORED_ERRNOS?

--

___
Python tracker 

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



[issue45709] 3.11 regression: tracing with-statement on exit from block

2021-11-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: needs patch -> 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



[issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP)

2021-11-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I agree with Serhiy

--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-11-21 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset f201d261cf53365b5769a434ca2bb21a892bd23f by Christian Heimes in 
branch 'main':
bpo-45847: Port grp, spwd, termios, resource, syslog to PY_STDLIB_MOD (GH-29668)
https://github.com/python/cpython/commit/f201d261cf53365b5769a434ca2bb21a892bd23f


--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-11-21 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27924
pull_request: https://github.com/python/cpython/pull/29685

___
Python tracker 

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



[issue31486] calling a _json.Encoder object raises a SystemError in case obj.items() returned a tuple

2021-11-21 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue45857] Type hint for methods

2021-11-21 Thread 洪明聖

New submission from 洪明聖 :

The class methods have a problem compiling when the type refers to the union of 
itself and others.


# tmp.py
class Foo:
def __init__(self, tmp: "Foo"|int):
pass


# Error
Traceback (most recent call last):
  File "/Project/Mslc/Grammar/tmp.py", line 1, in 
class Foo:
  File "/Project/Mslc/Grammar/tmp.py", line 2, in Foo
def __init__(self, tmp: "Foo"|int):
TypeError: unsupported operand type(s) for |: 'str' and 'type'

--
messages: 406720
nosy: TNThung
priority: normal
severity: normal
status: open
title: Type hint for methods
type: compile error
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



[issue32658] Metacharacter (\) documentation suggestion

2021-11-21 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy, newcomer friendly
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



[issue32936] RobotFileParser.parse() should raise an exception when the robots.txt file is invalid

2021-11-21 Thread Irit Katriel


Irit Katriel  added the comment:

The link to the robots.txt file no longer works, so it's not clear how to 
reproduce the problem you are seeing. Can you post the complete information on 
this issue?

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

___
Python tracker 

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



[issue45857] PEP 604 Union syntax does not support forward references

2021-11-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Presumably the correct way to do this is:

def __init__(self, tmp: "Foo|int"):

That is, the entire type hint is a string.

--
nosy: +eric.smith

___
Python tracker 

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



[issue43827] abc conflicts with __init_subclass__

2021-11-21 Thread Oleg Iarygin


Oleg Iarygin  added the comment:

Paul, PR OP made all changes requested; could you re-review please?

--
nosy: +arhadthedev, p-ganssle

___
Python tracker 

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



[issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py

2021-11-21 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Serhiy: I think you're right, it was likely meant to be _IGNORED_ERRNOS; for 
inlining it, it looks like it wasn't inlined to be more readable, but if we 
inline it, we should also inline _IGNORED_WINERRORS. I don't mind inlining both.

--

___
Python tracker 

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



[issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP)

2021-11-21 Thread Alex Waygood


Change by Alex Waygood :


--
type:  -> performance

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2021-11-21 Thread Guido van Rossum


Guido van Rossum  added the comment:

I could really use 3.10 here as well.

--
nosy: +Guido.van.Rossum

___
Python tracker 

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



[issue32582] chr raises OverflowError

2021-11-21 Thread Alex Waygood


Change by Alex Waygood :


--
type:  -> behavior

___
Python tracker 

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



[issue32658] Metacharacter (\) documentation suggestion

2021-11-21 Thread Alex Waygood


Change by Alex Waygood :


--
type:  -> enhancement

___
Python tracker 

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



[issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP)

2021-11-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Why anybody needs to write 255581293 > 12938373?

We try to keep the compiler code maintenable and only implement optimizations 
which have the largest effect. PR 29639 adds around 200 lines of complex code 
and I do not see the benefit.

--

___
Python tracker 

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



[issue45846] Incorrect name capitalisation in faq/programming

2021-11-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your report and PR JMcB.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue45766] Add direct proportion option to statistics.linear_regression()

2021-11-21 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Hi Raymond,

I'm satisfied that this should be approved. The code looks good to me 
and in my tests it matches the results from other software.

I don't think there is any need to verify that plain OLS regression 
produces an intercept close to zero. (What counts as close to zero?) If 
users want to check that, they can do so themselves.

Regarding my concern with the coefficient of determination, I don't 
think that's enough of a problem that it should delay adding this 
functionality. I don't know what, if anything, should be done, but in 
the meantime we should approve this new feature.

For the record, an example of the problem can be seen on the last slide 
here:

https://www.azdhs.gov/documents/preparedness/state-laboratory/lab-licensure-certification/technical-resources/calibration-training/09-linear-forced-through-zero-calib.pdf

The computed r**2 of 1.0 is clearly too high for the RTO line.

--

___
Python tracker 

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



[issue42233] GenericAlias does not support union type expressions

2021-11-21 Thread Dávid Nemeskey

Dávid Nemeskey  added the comment:

@kj Sorry, for some reason, I thought the that issue affected Union as well, 
but I have just re-tested it and found that it works.

--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-11-21 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 2afa1a12669e1812a9fe8130c8f60052c4ad8bf8 by Christian Heimes in 
branch 'main':
bpo-45847: Port codecs and unicodedata to PY_STDLIB_MOD (GH-29685)
https://github.com/python/cpython/commit/2afa1a12669e1812a9fe8130c8f60052c4ad8bf8


--

___
Python tracker 

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



[issue45766] Add direct proportion option to statistics.linear_regression()

2021-11-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks for looking at this and giving it some good thought.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue45804] IDLE - faster shell writing

2021-11-21 Thread wyz23x2


Change by wyz23x2 :


--
assignee:  -> terry.reedy
components: +IDLE

___
Python tracker 

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



[issue45766] Add direct proportion option to statistics.linear_regression()

2021-11-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset d2b55b07d2b503dcd3b5c0e2753efa835cff8e8f by Raymond Hettinger in 
branch 'main':
bpo-45766: Add direct proportion option to linear_regression(). (#29490)
https://github.com/python/cpython/commit/d2b55b07d2b503dcd3b5c0e2753efa835cff8e8f


--

___
Python tracker 

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



[issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py

2021-11-21 Thread Badal Sahani


Badal Sahani  added the comment:

Corrected Misspelled _IGNORED_ERROS in Lib/pathlib.py to _IGNORED_ERRORS

--
hgrepos: +411
keywords: +patch
message_count: 3.0 -> 4.0
nosy: +badalsahani
nosy_count: 2.0 -> 3.0
pull_requests: +27925
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29686
Added file: https://bugs.python.org/file50454/pathlib.py

___
Python tracker 

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



[issue45821] Many method parameters in the datetime module are positional-only in the C implementation but positional-or-keyword in the Python implementation

2021-11-21 Thread Alex Waygood


Alex Waygood  added the comment:

Ref to discussion on typeshed: https://github.com/python/typeshed/pull/6343

--

___
Python tracker 

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



[issue31486] calling a _json.Encoder object raises a SystemError in case obj.items() returned a tuple

2021-11-21 Thread Irit Katriel


Irit Katriel  added the comment:

Closing as fixed since it's too late to change 3.6 (if that did not happen yet).

--
nosy: +iritkatriel

___
Python tracker 

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



[issue32582] chr raises OverflowError

2021-11-21 Thread Irit Katriel


Irit Katriel  added the comment:

Still raising OVerflowError on 3.11:

>>> print(chr(0x8000))
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: Python int too large to convert to C int

--
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.7

___
Python tracker 

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



[issue45709] 3.11 regression: tracing with-statement on exit from block

2021-11-21 Thread Ned Batchelder


Ned Batchelder  added the comment:

I can confirm that this fixes the problem.

--

___
Python tracker 

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



[issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py

2021-11-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

If it is only used in a single place in the module would not be better to 
inline it?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45857] PEP 604 Union syntax does not support forward references

2021-11-21 Thread Alex Waygood


Alex Waygood  added the comment:

Reproduced on 3.11. The error occurs if a type is on the left-hand-side of the 
operand, as well as if a type is on the right-hand-side:

```
>>> int | "str"
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unsupported operand type(s) for |: 'type' and 'str'
>>> "str" | int
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unsupported operand type(s) for |: 'str' and 'type'
```

--
nosy: +AlexWaygood, gvanrossum, kj
title: Type hint for methods -> PEP 604 Union syntax does not support forward 
references
type: compile error -> behavior
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



[issue45805] CO_FUTURE_ANNOTATIONS flag is not documented or in inspect

2021-11-21 Thread Éric Araujo

Éric Araujo  added the comment:

I am not sure.  Adding compiler people to the nosy list!

--
nosy: +BTaskaya, Mark.Shannon, benjamin.peterson, brett.cannon, pablogsal, 
yselivanov

___
Python tracker 

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



[issue45805] CO_FUTURE_ANNOTATIONS flag is not documented or in inspect

2021-11-21 Thread Éric Araujo

Change by Éric Araujo :


--
stage: resolved -> 
versions: +Python 3.11 -Python 3.7

___
Python tracker 

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



[issue23952] cgi: Document the 'maxlen' member of the cgi module

2021-11-21 Thread Irit Katriel


Irit Katriel  added the comment:

I

--
components: +Library (Lib)
keywords: +easy, newcomer friendly
nosy: +iritkatriel
type:  -> enhancement
versions: +Python 3.11 -Python 3.7, Python 3.8

___
Python tracker 

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



[issue33558] Python has no icon in taskbar and in start screen

2021-11-21 Thread Irit Katriel


Irit Katriel  added the comment:

3.6 is no longer maintained. Please create a new issue if you are having this 
problem with a current version of python (3.9+).

--
nosy: +iritkatriel
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



[issue45859] test_collections has a wrong test in case _itemgetter is not available

2021-11-21 Thread Carl Friedrich Bolz-Tereick


Change by Carl Friedrich Bolz-Tereick :


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

___
Python tracker 

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



[issue26651] Deprecate register_adapter() and register_converter() in sqlite3

2021-11-21 Thread Ian Fisher


Ian Fisher  added the comment:

See bpo-45858 for a more limited proposal to only deprecate the default 
converters.

--

___
Python tracker 

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



[issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11

2021-11-21 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

I got a crash on Windows in Objects/genobject.c:

void
_PyGen_Finalize(PyObject *self)
{
PyGenObject *gen = (PyGenObject *)self;
PyObject *res = NULL;
PyObject *error_type, *error_value, *error_traceback;

if (gen->gi_xframe == NULL ||  _PyFrameHasCompleted(gen->gi_xframe)) { 
<--- Crash is here
/* Generator isn't paused, so no need to close */
return;
}
...


It looks like gen->gi_xframe is a junk-but-not-NULL pointer that is getting 
dereferenced by _PyFrameHasCompleted.

Maybe related to bpo-44590.

--
nosy: +Dennis Sweeney, Mark.Shannon

___
Python tracker 

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



[issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11

2021-11-21 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

I think the import is irrelevant (luckily). This still crashes:

async def f():
pass
frame = f().cr_frame
frame.clear()

--

___
Python tracker 

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



[issue45858] Deprecate default converters in sqlite3

2021-11-21 Thread Ian Fisher


Ian Fisher  added the comment:

See also bpo-26651 for a related proposal to deprecate the converter/adapter 
infrastructure entirely.

The proposal in this bug is more limited: remove the default converters (though 
I think the default adapters should stay), but continue to allow users to 
define their own converters.

--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-11-21 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +27928
pull_request: https://github.com/python/cpython/pull/29690

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-11-21 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +27927
pull_request: https://github.com/python/cpython/pull/29689

___
Python tracker 

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



[issue45859] test_collections has a wrong test in case _itemgetter is not available

2021-11-21 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2021-11-21 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +27926
pull_request: https://github.com/python/cpython/pull/29688

___
Python tracker 

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



[issue45857] PEP 604 Union syntax does not support forward references

2021-11-21 Thread Alex Waygood


Alex Waygood  added the comment:

Arguably, either the implementation should be altered to support forward 
references, or the documentation at 
https://docs.python.org/3/library/stdtypes.html#union-type should be altered to 
make clear that, when type-hinting a union that includes a forward reference, 
the entire expression should be given as a string, as Eric suggests.

--

___
Python tracker 

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



[issue33158] Add fileobj property to csv reader and writer objects

2021-11-21 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> rejected
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



[issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11

2021-11-21 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Even without garbage-collecting the coroutine, we get a failed assertion in 
debug mode (but no crash with the assertion removed):

Python 3.11.0a2+ (heads/main:c8c21bdd19, Nov 21 2021, 13:58:01) [MSC v.1929 64 
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> async def f():
... pass
...
>>> coro = f()
>>> frame = coro.cr_frame
>>> frame.clear()
:1: RuntimeWarning: coroutine 'f' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Assertion failed: f->f_frame->generator == NULL, file 
C:\Users\sween\Source\Repos\cpython2\cpython\Objects\frameobject.c, line 705

--

___
Python tracker 

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



[issue45677] [doc] improve sqlite3 docs

2021-11-21 Thread Ian Fisher


Ian Fisher  added the comment:

I think it would also be helpful to make the examples at the top simpler/more 
idiomatic, e.g. using a context manager for the connection and calling 
conn.execute directly instead of spawning a cursor.

I think the information about the isolation_level parameter should also be 
displayed more prominently as many people are surprised to find sqlite3 
automatically opening transactions.

--
nosy: +iafisher

___
Python tracker 

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



[issue45858] Deprecate default converters in sqlite3

2021-11-21 Thread Ethan Furman


Change by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue45858] Deprecate default converters in sqlite3

2021-11-21 Thread Ian Fisher


New submission from Ian Fisher :

Per discussion at 
https://discuss.python.org/t/fixing-sqlite-timestamp-converter-to-handle-utc-offsets/,
 the default converters in SQLite3 have several bugs and are probably not worth 
continuing to maintain, so I propose deprecating them and removing them in a 
later version of Python.

Since the converters are opt-in, this should not affect most users of SQLite3.

--
components: Library (Lib)
messages: 406727
nosy: erlendaasland, iafisher
priority: normal
severity: normal
status: open
title: Deprecate default converters in sqlite3
type: behavior

___
Python tracker 

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



[issue23952] cgi: Document the 'maxlen' member of the cgi module

2021-11-21 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue26651] Deprecate register_adapter() and register_converter() in sqlite3

2021-11-21 Thread Ethan Furman


Change by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue45859] test_collections has a wrong test in case _itemgetter is not available

2021-11-21 Thread Carl Friedrich Bolz-Tereick


New submission from Carl Friedrich Bolz-Tereick :

test_field_descriptor in test_collections tries to pickle the descriptors of a 
namedtuple's fields, which is _collections._itemgetter on CPython. However, on 
PyPy that class doesn't exist. The code in collections deals fine with that 
fact, but the above-mentioned test does not make sense in that situation, since 
you can't pickle properties.

To test this behaviour, you can replace
"from _collections import _tuplegetter"
in collections/__init__.py with raise ImportError and see the test fail on 
CPython too.

--
messages: 406738
nosy: Carl.Friedrich.Bolz
priority: normal
severity: normal
status: open
title: test_collections has a wrong test in case _itemgetter is not available
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



[issue42268] ./configure failing when --with-memory-sanitizer specified

2021-11-21 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +pablogsal

___
Python tracker 

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



[issue42268] ./configure failing when --with-memory-sanitizer specified

2021-11-21 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Reproducible on 3.9, 3.10, and on main.

The --with-memory-sanitizer option adds "-fsanitize=memory 
-fsanitize-memory-track-origins=2 -fno-omit-frame-pointer" to CFLAGS, and 
"-fsanitize=memory -fsanitize-memory-track-origins=2" to LDFLAGS. The 
MemorySanitizer is a clang specific feature, AFAIK. You're using GCC, so what 
happens is that these (GCC incompatible) flags are added and the following 
compile check (getaddrinfo) fails.


IMO, adding a compiler check and printing a warning if --with-memory-sanitizer 
is used with GCC should be an ok solution. Alternatively, we inform the user 
that we're switching to using the leak sanitiser, if we're on GCC.


+pablo

See also:
  - https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
  - https://clang.llvm.org/docs/MemorySanitizer.html

--
nosy: +erlendaasland
versions: +Python 3.10, Python 3.11

___
Python tracker 

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



[issue45861] Can't find a usable init.tcl

2021-11-21 Thread heheoa


New submission from heheoa :

_tkinter.TclError: Can't find a usable init.tcl in the following directories: 
/usr/lib/tcl8.6 /usr/lib/tcl8.6 /lib/tcl8.6 /usr/library /library 
/tcl8.6.12/library /tcl8.6.12/library

--
components: Tkinter
messages: 406741
nosy: nobodyatall
priority: normal
severity: normal
status: open
title: Can't find a usable init.tcl
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



[issue45861] Can't find a usable init.tcl

2021-11-21 Thread heheoa


heheoa  added the comment:

i just needed to install tcl

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



[issue45858] Deprecate default converters in sqlite3

2021-11-21 Thread Kevin


Change by Kevin :


--
nosy: +Strongbeard

___
Python tracker 

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



[issue44649] dataclasses slots with init=False field raises AttributeException

2021-11-21 Thread Eric V. Smith


Change by Eric V. Smith :


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



[issue44649] dataclasses slots with init=False field raises AttributeException

2021-11-21 Thread Eric V. Smith


Change by Eric V. Smith :


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

___
Python tracker 

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



[issue45860] UnboundLocalError leads to Illegal instruction crashing CPython

2021-11-21 Thread Xinmeng Xia


New submission from Xinmeng Xia :

The following code can lead to a crash and report Illegal instruction (core 
dumped)(few times) or Trace/breakpoint trap (core dumped) (very few times) or 
Segmentation fault (core dumped) (most times) on Python 3.11. 

test_free_different_thread.py

import inspect
import sys
import threading
import unittest
import weakref
import ctypes
from test.support import run_doctest, run_unittest, cpython_only, 
check_impl_detail
import _testcapi
from types import FunctionType
from test import test_code
import test_code

def test_free_different_thread():
f = CoExtra.get_func()

class ThreadTest(threading.Thread):

def __init__(CoExtra, f, test):
super().__init__()
CoExtra.f = CoExtra
CoExtra.test = test

def run(CoExtra):
del CoExtra.f
CoExtra.test.assertEqual(test_code.LAST_FREED, 500)
test_code.SetExtra(f.__code__, test_code.FREE_INDEX, ctypes.c_voidp(500))
f = ThreadTest(CoExtra, f)
del tt
tt.start()
tt.join()
CoExtra.assertEqual(test_code.LAST_FREED, 500)

CoExtra = test_code.CoExtra()
test_free_different_thread()
=

-
Traceback (most recent call last):
  File "/home/xxm/Desktop/test_free_different_thread.py", line 33, in 
test_free_different_thread()

  File "/home/xxm/Desktop/test_free_different_thread.py", line 28, in 
test_free_different_thread
del tt
^^
UnboundLocalError: cannot access local variable 'tt' where it is not associated 
with a value
Illegal instruction (core dumped)/Trace/breakpoint trap (core 
dumped)/Segmentation fault (core dumped)


Version: python 3.9, python 3.10, python 3.11 on ubuntu 16.04

Reproduce step:
1.download test_code.py and place test_free_different_thread.py and test_code 
in a same directory.
2. run with "python test_free_different_thread.py"

The test_code.py is from cpython' test. We can also annotate "import test_code" 
and run test_free_different_thread.py directly. But it seems that Illegal 
instruction and Trace/breakpoint trap cannot be reproduced.

--
components: Interpreter Core
files: test_code.py
messages: 406740
nosy: xxm
priority: normal
severity: normal
status: open
title: UnboundLocalError leads to Illegal instruction crashing CPython
type: crash
versions: Python 3.11
Added file: https://bugs.python.org/file50455/test_code.py

___
Python tracker 

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



[issue45862] Anomaly of eval() of list comprehension

2021-11-21 Thread David Pratten


New submission from David Pratten :

Hi

Example "eg def2" works but "eg def4" gives an error?

David

```
emp = [
{
"empno": 7839,
"mgr": 0,
"ename": "KING"
},
{
"empno": 7566,
"mgr": 7839,
"ename": "JONES"
},
{
"empno": 7698,
"mgr": 7839,
"ename": "BLAKE"
}
]

a = [e for e in emp if e["mgr"] == 0]
print('eg 1', [b for b in a])
print('eg 2', eval('[b for b in a]'))
print('eg 3', [e for e in emp for b in a if e["mgr"] == b["empno"]])
print('eg 4', eval('[e for e in emp for b in a if e["mgr"] == b["empno"]]'))


def eval_anomaly():
a_anomaly = [e for e in emp if e["mgr"] == 0]
print('eg def1', [b for b in a_anomaly])
print('eg def2', eval('[b for b in a_anomaly]'))
print('eg def3', [e for e in emp for b in a_anomaly if e["mgr"] == 
b["empno"]])
print('eg def4', eval('[e for e in emp for b in a_anomaly if e["mgr"] == 
b["empno"]]'))

eval_anomaly()
```

--
messages: 406743
nosy: david2
priority: normal
severity: normal
status: open
title: Anomaly of eval() of list comprehension
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