[issue43612] zlib.compress should have a wbits argument

2021-04-26 Thread Ruben Vorderman


Change by Ruben Vorderman :


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



[issue43612] zlib.compress should have a wbits argument

2021-04-26 Thread Ruben Vorderman


Ruben Vorderman  added the comment:

A patch was created, but has not been reviewed yet.

--

___
Python tracker 

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



[issue26092] doctest should allow custom sys.displayhook

2021-04-26 Thread Sergey B Kirpichev


Sergey B Kirpichev  added the comment:

Tim, lets decide on this simple issue.

To me, https://bugs.python.org/issue8048 was obviously a bad thing.  While it 
"fixes" one application, which customize sys.displayhook in a strange way - it 
break testing almost everyone, which do sys.displayhook customization.  See 
e.g. https://github.com/sympy/sympy/blob/master/conftest.py or 
https://github.com/diofant/diofant/blob/master/conftest.py.  BTW, SymPy is far 
more popular library than dreampie, which is py2-only and looks unmaintained.

Last, but not least - introduced doctest's behaviour wasn't documented.  It 
break things in a surprising way and do this silently...  There is a 
documentation issue if you decide to keep this "feature".

Noam, what do you think about fixing your problem with mock.patch?

>>> import sys
>>> from unittest.mock import patch
>>> with patch('sys.displayhook', sys.__displayhook__):
... doctest.testmod()

Tentative patch attached.

--
keywords: +patch
Added file: https://bugs.python.org/file49985/doctest-displayhook.diff

___
Python tracker 

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



[issue12403] Mention sys.displayhook in code module docs and the compile builtin docs

2021-04-26 Thread Sergey B Kirpichev


Change by Sergey B Kirpichev :


--
nosy: +Sergey.Kirpichev

___
Python tracker 

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



[issue43940] int casting to float results to a different value in memory

2021-04-26 Thread Mark Dickinson


Mark Dickinson  added the comment:

There's an implicit float-to-double conversion here (`fp.contents.value` is 
represented as a Python float, which is backed by a C double). What you're 
seeing is that converting the single-precision signaling NaN to double 
precision loses the signaling bit, producing a quiet double-precision NaN with 
the same sign and payload (modulo the signaling bit). That's what I'd expect 
under IEEE 754 semantics. (IEEE 754-2008 says, in section 6.2, "Under default 
exception handling, any operation signaling an invalid operation exception and 
for which a floating-point result is to be delivered shall deliver a quiet 
NaN.".)

I don't think there's anything we can or should do about this at Python level. 
ctypes is correctly reflecting the existing C-level behaviour. In other words, 
this is expected behaviour, not a bug.

--

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-04-26 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +24323
pull_request: https://github.com/python/cpython/pull/25624

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Shreyan Avigyan


Change by Shreyan Avigyan :


--
nosy: +shreyanavigyan

___
Python tracker 

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



[issue43940] int casting to float results to a different value in memory

2021-04-26 Thread Mark Dickinson


Change by Mark Dickinson :


--
resolution:  -> not a bug
status: open -> pending

___
Python tracker 

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



[issue43940] int casting to float results to a different value in memory

2021-04-26 Thread Huang Yang


Huang Yang  added the comment:

OK. Seems it's the default behavior of CPU instruction. And CPU follows the 
IEEE standard of float. 

Is there any workaround?

--
status: pending -> open

___
Python tracker 

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



[issue43901] Lazy-create an empty annotations dict in all unannotated user classes and modules

2021-04-26 Thread Kubilay Kocak


Change by Kubilay Kocak :


--
components: +Interpreter Core -FreeBSD
nosy:  -koobs

___
Python tracker 

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



[issue43940] int casting to float results to a different value in memory

2021-04-26 Thread Mark Dickinson


Mark Dickinson  added the comment:

> Is there any workaround?

Sorry, I can't answer that without knowing what it is you're trying to do - 
that is, I don't know which part of the behaviour you want a workaround for. 
But that's getting off topic for this tracker, which is for bug reporting; I'd 
suggest taking the discussion to one of the mailing lists, Stack Overflow, or 
some other resource.

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



[issue41139] cgi uses the locale encoding for log files

2021-04-26 Thread Inada Naoki


Change by Inada Naoki :


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

___
Python tracker 

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



[issue43939] Deadlock in logging

2021-04-26 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Feel free to submit a PR to use context managers, though I'm not sure it solves 
the problem in a guaranteed way.

Nick, what is the official word wrt. interruptibility of context managers?

--
nosy: +ncoghlan

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-04-26 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 3c586ca500854476e6eff06713236faff233d035 by Christian Heimes in 
branch 'master':
bpo-38820: Old OpenSSL 3.0.0 releases are in /old/3.0/ (GH-25624)
https://github.com/python/cpython/commit/3c586ca500854476e6eff06713236faff233d035


--

___
Python tracker 

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



[issue43939] Deadlock in logging

2021-04-26 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

But also, please ask the "external package" that uses PyThreadState_SetAsyncExc 
to clear up its documentation and mentions the pitfalls.

--

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-04-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24326
pull_request: https://github.com/python/cpython/pull/25627

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-04-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24325
pull_request: https://github.com/python/cpython/pull/25626

___
Python tracker 

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



[issue40878] Use c99 on the aixtools bot

2021-04-26 Thread Michael Felt

Michael Felt  added the comment:

Disregard the last mail -seems many routines go to unresolved.

On 15/08/2020 20:43, Stefan Krah wrote:
> Change by Stefan Krah :
>
>
> --
> assignee:  -> skrah
> resolution:  -> fixed
> stage: patch review -> resolved
> status: open -> closed
> type:  -> compile error
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: https://bugs.python.org/file49986/OpenPGP_0x722BFDB61F396FC2.asc

___
Python tracker 

___

OpenPGP_0x722BFDB61F396FC2.asc
Description: application/pgp-keys
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43942] RawDescriptionHelpFormatter seems to be ignored for argument descriptions

2021-04-26 Thread Reuben Thomas


New submission from Reuben Thomas :

The documentation seems very clear on this subject:

"RawTextHelpFormatter maintains whitespace for all sorts of help text, 
including argument descriptions. However, multiple new lines are replaced with 
one."

But consider the following code:

```
from argparse import ArgumentParser, RawDescriptionHelpFormatter

parser = ArgumentParser(
  description='A simple templating system.',
  epilog='Use `-\' as a file name to indicate standard input or output.',
  formatter_class=RawDescriptionHelpFormatter,
)
parser.add_argument(
  '--verbose',
  help='show on standard error the path being built,\nand the names of files 
built, included and pasted'
)
args = parser.parse_args()
```

Then try running it in a suitably-sized terminal:

$ python3 test.py --help
usage: test.py [-h] [--verbose VERBOSE]

A simple templating system.

optional arguments:
  -h, --help show this help message and exit
  --verbose VERBOSE  show on standard error the path being built, and the names 
of files built, included and pasted

Use `-' as a file name to indicate standard input or output.
```

The \n in the help for the `--verbose` argument is not respected.

--
components: Library (Lib)
messages: 391890
nosy: rrt
priority: normal
severity: normal
status: open
title: RawDescriptionHelpFormatter seems to be ignored for argument descriptions
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



[issue43942] RawDescriptionHelpFormatter seems to be ignored for argument descriptions

2021-04-26 Thread Reuben Thomas


Reuben Thomas  added the comment:

(Tested with Python 3.9.4.)

--

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-04-26 Thread miss-islington


miss-islington  added the comment:


New changeset 10ee2662dfeeb3b00d232f8f1c2eecc4d7e65244 by Miss Islington (bot) 
in branch '3.8':
[3.8] bpo-38820: Old OpenSSL 3.0.0 releases are in /old/3.0/ (GH-25624) 
(GH-25627)
https://github.com/python/cpython/commit/10ee2662dfeeb3b00d232f8f1c2eecc4d7e65244


--

___
Python tracker 

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



[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-04-26 Thread Mark Shannon


Mark Shannon  added the comment:

What exactly is the issue here?
That the line number is -1, or that is different from 3.9?

The `-1` should be `None`. I can fix that, but there is the issue of whether 
the cleanup code in a with statement should have a line number or not.

The traceback for 3.9 is incorrect, the program is not on line 10 when __exit__ 
is called.

Currently we mark the cleanup code for the with statement as artificial meaning 
that it has no line number.
We could give it the line number of the `with` keyword, but that might break 
coverage and profiling tools.

PEP 626 says that the "with" keyword is executable, and should be traced, but 
nothing about whether that includes the cleanup call to __exit__.

--
nosy: +nedbat

___
Python tracker 

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



[issue26215] Make GC_Head a compile-time option

2021-04-26 Thread Irit Katriel


Change by Irit Katriel :


--
type:  -> enhancement
versions: +Python 3.11 -Python 2.7

___
Python tracker 

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



[issue26215] Make GC_Head a compile-time option

2021-04-26 Thread Irit Katriel


Irit Katriel  added the comment:

This seems like something that would require a PEP, or at least a discussion on 
python-ideas.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> Let's post the list here and post a brief mention of this issue on
python-dev.

Attached. The list contains commits, commit dates, affected files, and the name 
of the PyType_Spec variables (I _can_ resolve these to the actual type names, 
but I figured this would be ok for now).

I've also posted the list on Discsourse bco. readability. I'll post a 
notification on python-dev as well.

https://discuss.python.org/t/list-of-built-in-types-converted-to-heap-types/8403

--
Added file: https://bugs.python.org/file49987/list.txt

___
Python tracker 

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



[issue26092] doctest should allow custom sys.displayhook

2021-04-26 Thread Noam Yorav-Raphael


Noam Yorav-Raphael  added the comment:

Hi,

I think that using mock.patch to fix the problem is fine. I personally
haven't encountered this problem in the past years, so whatever you decide
is fine by me.

Thanks!
Noam

On Mon, Apr 26, 2021 at 10:08 AM Sergey B Kirpichev 
wrote:

>
> Sergey B Kirpichev  added the comment:
>
> Tim, lets decide on this simple issue.
>
> To me, https://bugs.python.org/issue8048 was obviously a bad thing.
> While it "fixes" one application, which customize sys.displayhook in a
> strange way - it break testing almost everyone, which do sys.displayhook
> customization.  See e.g.
> https://github.com/sympy/sympy/blob/master/conftest.py or
> https://github.com/diofant/diofant/blob/master/conftest.py.  BTW, SymPy
> is far more popular library than dreampie, which is py2-only and looks
> unmaintained.
>
> Last, but not least - introduced doctest's behaviour wasn't documented.
> It break things in a surprising way and do this silently...  There is a
> documentation issue if you decide to keep this "feature".
>
> Noam, what do you think about fixing your problem with mock.patch?
>
> >>> import sys
> >>> from unittest.mock import patch
> >>> with patch('sys.displayhook', sys.__displayhook__):
> ... doctest.testmod()
>
> Tentative patch attached.
>
> --
> keywords: +patch
> Added file: https://bugs.python.org/file49985/doctest-displayhook.diff
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-04-26 Thread Ned Batchelder


Ned Batchelder  added the comment:

Mark, you say:

> The traceback for 3.9 is incorrect, the program is not on line 10 when 
> __exit__ is called.

It's kind of not on any line in main(), but line 10 is the most useful line to 
indicate.  It's the last bit of the user's code that was running, and it is the 
reason for leaving the with statement.

--

___
Python tracker 

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



[issue26092] doctest should allow custom sys.displayhook

2021-04-26 Thread Sergey B Kirpichev


Sergey B Kirpichev  added the comment:

> I personally haven't encountered this problem in the past years

Noam, that's because Python has your patch :-)

But if we revert one - mentioned solution with mock.patch will work.  Please, 
tell us if you find it bad for any reason.

--

___
Python tracker 

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



[issue28968] xml rpc server fails with connection reset by peer error no 104

2021-04-26 Thread Irit Katriel


Irit Katriel  added the comment:

2.7 is no longer maintained. Please create a new issue with full reproduction 
information if you are still having this problem in 3.8+.

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



[issue26092] doctest should allow custom sys.displayhook

2021-04-26 Thread Noam Yorav-Raphael


Noam Yorav-Raphael  added the comment:

Yes, sorry, I didn't remember the history exactly.

I don't have a strong opinion. I'm okay with reverting the behavior to use 
sys.displayhook.

Thanks,
Noam

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I also opened https://bugs.python.org/issue43916 to track some points raised by 
Serhiy

--
nosy: +pablogsal

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

In Python 3.8 there were only few extension heap types: _curses_panel.panel, 
ssl.SSLError, _tkinter.tkapp, _tkinter.Tcl_Obj, _tkinter.tktimertoken and 
PyStructSequence types.

The following heap types were added in Python 3.9: posix.DirEntry, 
posix.ScandirIterator, select.devpoll, select.kevent, select.poll, 
select.epoll, select.kqueue, _struct.unpack_iterator, _struct.Struct, 
_abc._abc_data, _random.Random, _json.Scanner, _json.Encoder, zlib.Compress, 
zlib.Decompress, _hashlib.HASH, _hashlib.HASHXOF, _hashlib.HMAC, ast.AST.

The list of heap types added in Python 3.10 is too long (more than 60 types).

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

>From Objects/typeobject.c:

/* The condition below could use some explanation.
   It appears that tp_new is not inherited for static types
   whose base class is 'object'; this seems to be a precaution
   so that old extension types don't suddenly become
   callable (object.__new__ wouldn't insure the invariants
   that the extension type's own factory function ensures).
   Heap types, of course, are under our control, so they do
   inherit tp_new; static extension types that specify some
   other built-in type as the default also
   inherit object.__new__. */
if (base != &PyBaseObject_Type ||
(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
if (type->tp_new == NULL)
type->tp_new = base->tp_new;
}

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Shreyan Avigyan


Change by Shreyan Avigyan :


--
nosy: +shreyanavigyan

___
Python tracker 

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



[issue41486] Add _BlocksOutputBuffer for bz2/lzma/zlib module

2021-04-26 Thread Ma Lin


Ma Lin  added the comment:

Very sorry for update at the last moment.
But after the update, we should no need to touch it in the future, so I think 
it's worthy. 

Please review the last commit in PR 21740, the previous commits have not been 
changed.
IMO if use a Git client such as TortoiseGit, reviewing may be more convenient. 

The changes:

1, Move `Modules/blocks_output_buffer.h` to 
`Include/internal/pycore_blocks_output_buffer.h`
Keep the `Modules` folder clean.

2, Ask the user to initialize the struct instance like this, and use assertions 
to check it:
_BlocksOutputBuffer buffer = {.list = NULL};

Then no longer worry about whether buffer.list is uninitialized in error 
handling.
There is an extra assignment, but it's beneficial to long-term code maintenance.

3, Change the type of BUFFER_BLOCK_SIZE from `int` to `Py_ssize_t`.
The core code can remove a few type casts.

4, These functions return allocated size on success, return -1 on failure:
_BlocksOutputBuffer_Init()
_BlocksOutputBuffer_InitAndGrow()
_BlocksOutputBuffer_InitWithSize()
_BlocksOutputBuffer_Grow()
If the code is used in other sites, this API is simpler.

5, All functions are decorated with `inline`.
If the compiler is smart enough, it's possible to eliminate some code when 
`max_length` is constant and < 0.

--

___
Python tracker 

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



[issue20290] inspect module bug for modules with same filename

2021-04-26 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> inspect.findsource raises IndexError

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The explaining comment was added in f884b749103bad0724e2e4878cd5fe49a41bd7df.

The code itself is much older. It was originally added in 
6d6c1a35e08b95a83dbe47dbd9e6474daff00354, then
weaked in c11e192d416e2970e6a06cf06d4cf788f322c6ea and strengthen in 
29687cd2112c540a8a4d31cf3b191cf10db08412.

All types except static types which are direct descendants of object inherit 
tp_new from a base class.

We need to check which static types had tp_new = NULL before they were 
converted to heap types and set it to NULL manually after type creation.

--

___
Python tracker 

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



[issue21251] Standard library trace module crashes with exception

2021-04-26 Thread Irit Katriel


Irit Katriel  added the comment:

pyblock supports python 3 now. Are you seeing the problem pm 3.8+?Otherwise 
this issue can be closed since python 2 past EOL.

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



[issue35930] Raising an exception raised in a "future" instance will create reference cycles

2021-04-26 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

I retired the backporting request. Thanks, Ned.

--
versions:  -Python 3.6, Python 3.7

___
Python tracker 

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



[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-04-26 Thread Mark Shannon


Mark Shannon  added the comment:

In this case, if happens that line 10 was the last line of code executing in 
the body of the with statement.
But the reason it was listed, was that it was statically the last line of code 
in the body.

If the body is something like:

1. if TRUE:
2. ...
3. else:
4. ...

Then the reported last line will be 4, even though it is never executed.
We can fix this, at the cost of extra compiler complexity and increased 
bytecode size for the non-exceptional case, but it is very difficult for the 
exceptional case, because we don't know statically where the exception has come 
from.

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> We need to check which static types had tp_new = NULL before they were 
> converted to heap types

I did a quick git grep. Results pasted into the list over at 
https://discuss.python.org/t/list-of-built-in-types-converted-to-heap-types/8403.

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is incomplete. For example arrayiterator did have tp_new = NULL (in other 
words, PyArrayIter_Type.tp_new was not set to non-NULL value).

In 3.9:

>>> import array
>>> type(iter(array.array('I')))()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: cannot create 'arrayiterator' instances

In 3.10:

>>> import array
>>> type(iter(array.array('I')))()


--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> It is incomplete.

Yes, I know. I'm working on completing it manually. Some of the static structs 
were only partially initialised (most stop at tp_members). The rest of the 
struct (including tp_new) would then be initialised to zero.

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your work Erlend.

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Serhiy, do you think this should be a release blocker for the beta?

--

___
Python tracker 

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



[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-04-26 Thread Mark Shannon


Mark Shannon  added the comment:

This test case was added for 3.10.
In 3.9 it reports that the pass statement executes, even though it is 
unreachable.

https://github.com/python/cpython/blob/master/Lib/test/test_sys_settrace.py#L919

--

___
Python tracker 

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



[issue18233] SSLSocket.getpeercertchain()

2021-04-26 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 666991fc598bc312d72aff0078ecb553f0a968f1 by Christian Heimes in 
branch 'master':
bpo-18233: Add internal methods to access peer chain (GH-25467)
https://github.com/python/cpython/commit/666991fc598bc312d72aff0078ecb553f0a968f1


--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> Thank you for your work Erlend.

Anytime! I've updated the list now. There may still be errors, but I think it's 
pretty accurate now.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

> No, multiple tests fail. First test_distutils fails, then during the re-run, 
> test_multiprocessing_forkserver, test_multiprocessing_spawn, and test_pdb 
> fail.

Can you provide the error output log you're getting? I'm getting a lot of 
errors for a lot of tests by applying your patch. But the test_pdb error looks 
related. If test_pdb fails then all the tests after that also fail. I'm not 
sure if they are related at all.

--

___
Python tracker 

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



[issue43817] Add inspect.get_annotations()

2021-04-26 Thread Larry Hastings


Larry Hastings  added the comment:

I keep thinking about it, and I think letting inspect.get_annotations() and 
inspect.signature() raise exceptions is the right API choice.

I note that that's what typing.get_type_hints() did in Python 3.9.  During the 
development of Python 3.10, this was changed; typing.get_type_hints() started 
catching Exception and returning the original annotation dictionary (with 
un-eval'd strings).  This change has been reverted, and as of the current 
moment typing.get_type_hints() no longer catches exceptions on eval().

I think there are two types of people who will have string annotations that 
throw an exception when eval'd:

1) People who made a typo or other mistake.
2) People who deliberately use undefined identifiers in their annotations, due 
to circular import / circular dependencies in their code bases.

The people who are saying "just catch the exception and let it pass silently" 
seem to be in group 2.  I suggest that people in group 2 are sophisticated 
enough to start passing in eval_str=False to inspect.signature().  And I think 
people in group 1 would want to be alerted to their mistake, rather than have 
the library silently catch the error and mysteriously change its behavior.

--

___
Python tracker 

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



[issue43532] Add keyword-only fields to dataclasses

2021-04-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

I've checked in the code, tests, and some basic documentation. I didn't finish 
the documentation in order to make sure I could get this in before beta 1. I'm 
going to leave this issue open until I have time for the rest of the 
documentation.

--
resolution:  -> fixed
stage: patch review -> 

___
Python tracker 

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



[issue43466] ssl/hashlib: Add configure option to set or auto-detect rpath to OpenSSL libs

2021-04-26 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 5f87915d4af724f375b00dde2b948468d3e4ca97 by Christian Heimes in 
branch 'master':
bpo-43466: Link with libz in PY_UNSUPPORTED_OPENSSL_BUILD path (GH-25587)
https://github.com/python/cpython/commit/5f87915d4af724f375b00dde2b948468d3e4ca97


--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> Can you provide the error output log you're getting?

I don't think we should use more time on apply-to-all.diff, since it's probably 
not going to be applied as it is anyway.

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Here's a plaintext version:

- 0b858cdd5d2021-01-04 Modules/cjkcodecs/multibytecodec.c
- _multibytecodec.MultibyteCodec

- c8a87addb1 2021-01-04 Modules/pyexpat.c
- pyexpat.xmlparser

- 75bf107c62 2021-01-02 Modules/arraymodule.c
- array.arrayiterator

- dd39123970 2020-12-29 Modules/_functoolsmodule.c
- functools.KeyWrapper
- functools._lru_list_elem

- 6104013838 2020-12-18 Modules/_threadmodule.c
- _thread.lock
- _thread._localdummy

- a6109ef68d 2020-11-20 Modules/_sre.c
- re.Pattern
- re.Match
- _sre.SRE_Scanner

- c8c4200b65 2020-10-26 Modules/unicodedata.c
- unicodedata.UCD

- 256e54acdb 2020-10-01 Modules/_sqlite
- sqlite3.Connection
- sqlite3.Cursor

- 9031bd4fa4 2020-10-01 Modules/_sqlite
- sqlite3.Row
- sqlite3.Statement

- cb6db8b6ae 2020-09-27 Modules/_sqlite
- sqlite3.Node
- sqlite3.Cache

- 52a2df135c 2020-09-08 Modules/sha256module.c
- _sha256.sha224
- _sha256.sha256

- 2aabc3200b 2020-09-06 Modules/md5module.c Modules/sha1module.c 
Modules/sha512module.c
- _md5.md5
- _sha1.sha1
- _sha512.sha384
- _sha512.sha512

- e087f7cd43 2020-08-13 Modules/_winapi.c
- winapi__overlapped.Overlapped

- c4862e333a 2020-06-17 Modules/_gdbmmodule.c
- g_dbm.dbm

- bf69a8f99f 2020-06-16 Modules/_dbmmodule.c
- _dbm.dbm

- 33f15a16d4 2019-11-05 Modules/posixmodule.c
- posix.DirEntry
- posix.ScandirIterator

- df69e75edc 2019-09-25 Modules/_hashopenssl.c
- _hashlib.HASH

- f919054e53 2019-09-14 Modules/selectmodule.c
- select.devpoll
- select.kevent
- select.poll

- 04f0bbfbed 2019-09-10 Modules/zlibmodule.c
- zlib.Compress
- zlib.Decompress

- 4f384af067 2012-10-14 Modules/_tkinter.c
- _tkinter.Tcl_Obj
- _tkinter.tktimertoken
- _tkinter.tkapp

- bc07cb883e 2012-06-14 Modules/_curses_panel.c
- _curses_panel.panel

--

___
Python tracker 

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



[issue43943] test_ssl fails in the macos CI

2021-04-26 Thread Christian Heimes


Christian Heimes  added the comment:

I have seen the test fail before. It seems to be flaky on macOS but it fails 
only very rarely.

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Is there any way we can fix this in Objects/typeobject.c, or do we actually 
have to patch every single type manually?

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Is there any way we can fix this in Objects/typeobject.c, or do we actually 
> have to patch every single type manually?

That would be probably a bad idea since typeobject.c is supposed to be generic. 
We would be inverting the responsibility concerns to the base.

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I afraid that changing the corresponding code in Objects/typeobject.c will 
break existing user code. For now, it is safer to patch every single type 
manually. Later we can design a general solution.

--

___
Python tracker 

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



[issue43943] test_ssl fails in the macos CI

2021-04-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> it fails only very rarely.

Unfortunately, in https://github.com/python/cpython/pull/25584 it has failed 3 
times in a row. That's why I decided to open the issue.

Let me re-run again.

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am marking this as a release blocker, giving that this is probably going to 
involve a big change.

--
priority: deferred blocker -> release blocker

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I'm elevating this as a release blocker since this is probably going to involve 
a moderately big change and we don't want people relying on the new behaviour 
when we don't intend to.

--
priority: deferred blocker -> release blocker

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Is it worth it adding tests for this? I'm thinking a generic version of 
msg391910 (maybe Lib/test/test_uninitialised_heap_types.py) coupled with a 
dataset.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Christian Heimes


Christian Heimes  added the comment:

Could you please land the new flag and typeobject.c code now? I'm happy to take 
care of "my" code myself.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think it is safer to merge apply-to-all.diff, and revert the changes for 
individual types if we have reasons to make them mutable.

Correspondingly, for all converted heap types we should set tp_new = NULL 
unless they have special tp_new implementation.

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Christian Heimes


Christian Heimes  added the comment:

I have had this workaround in _hashopenssl.c for a while. Can I get rid of the 
function with "{Py_tp_new, NULL}" or is there a more generic way to accomplish 
the same goal?

/* {Py_tp_new, NULL} doesn't block __new__ */
static PyObject *
_disabled_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
PyErr_Format(PyExc_TypeError,
"cannot create '%.100s' instances", _PyType_Name(type));
return NULL;
}

--
nosy: +christian.heimes

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

test_uninitialised_heap_types.py will need to import unrelited modules (some of 
which can be platform depending). And more modules will be added as more types 
be converted. I think it is better to add tests for different modules in 
corresponding module test files. They are pretty trivial, for example:

def test_new_tcl_obj(self):
self.assertRaises(TypeError, _tkinter.Tcl_Obj)

@requires_curses_func('panel')
def test_new_curses_panel(self):
w = curses.newwin(10, 10)
panel = curses.panel.new_panel(w)
self.assertRaises(TypeError, type(panel))

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> Could you please land the new flag and typeobject.c code now?

I've only got two more questions before I mark it ready for review, and that's 
regarding Guido's comment in msg391756:
Should the new flag also take care of __class__ assignment, or should we leave 
that out?
Are there other places where !Py_TPFLAGS_HEAPTYPE is used where we would like 
to use the immutable flag?

> I'm happy to take care of "my" code myself.

No problem, I'll leave it out of the patch :)

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-26 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

You're right, that would become messy. Complementing existing test suites is a 
better approach.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

> I think it is safer to merge apply-to-all.diff, and revert the changes for 
> individual types if we have reasons to make them mutable.

I don't think it's a good idea though. About 10 or 8 tests are failing if 
apply-to-all.diff is applied. The tests that are not related to it are also 
failing because of it. After test_pdb fails a segfault error occurs and the 
remaining tests are never executed. If we want to merge apply-to-all.diff then 
we need to make some modifications first.

--

___
Python tracker 

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



[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-26 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Ping

--

___
Python tracker 

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



[issue42904] get_type_hints does not provide localns for classes

2021-04-26 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +24327
pull_request: https://github.com/python/cpython/pull/25632

___
Python tracker 

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



[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-04-26 Thread miss-islington


miss-islington  added the comment:


New changeset 3b917d177452dcacf41605254fc299d051fbf75a by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-38820: Old OpenSSL 3.0.0 releases are in /old/3.0/ (GH-25624) 
(GH-25626)
https://github.com/python/cpython/commit/3b917d177452dcacf41605254fc299d051fbf75a


--

___
Python tracker 

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



[issue43762] Add audit events for loading of sqlite3 extensions

2021-04-26 Thread Steve Dower


Steve Dower  added the comment:

Yeah, along those lines. I believe the event is ".../result" in other places, 
just to be clear that it's not a function with that name.

Also, don't forget to clean up when returning early from the connected event. 
We don't want to leak the connection object if the hook raises an error.

--

___
Python tracker 

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



[issue22972] Timeout making ajax calls to SimpleHTTPServer from internet explorer

2021-04-26 Thread Irit Katriel


Irit Katriel  added the comment:

Closing this as Python 2.7 is past EOL and there was no followup for over 6 
years. If you are still having this problem in 3.9+, and you believe it is 
indeed a python rather than javascript issue, please create a new issue.

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



[issue43892] Make match patterns explicit in the AST

2021-04-26 Thread Nick Coghlan


Nick Coghlan  added the comment:

PR is green now, and I don't have any further changes I want to make, so 
Brandt, please feel free to merge if you're happy with the proposed AST nodes, 
and the way I've gone about implementing them.

If you'd like some adjustments, it probably makes the most sense to just amend 
the PR directly - otherwise the 24-hour turnaround on comments due to the time 
zone difference will potentially give us trouble with the beta deadline.

--

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-26 Thread Nick Coghlan


Change by Nick Coghlan :


--
stage: patch review -> commit review

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-26 Thread Nick Coghlan


Change by Nick Coghlan :


--
assignee: ncoghlan -> brandtbucher

___
Python tracker 

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



[issue23336] Thread.LockType is misnamed

2021-04-26 Thread Irit Katriel


Irit Katriel  added the comment:

_dummy_thread and dummy_threading modules have been removed in V3.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



[issue43817] Add inspect.get_annotations()

2021-04-26 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm not a big user of the inspect module, but I always thought that its use was 
so that you could look at a function (or other object) *produced by a 3rd 
party* and learn something about it.

Asking for the signature is one such operation, and I'd be rather upset if I 
couldn't inspect the annotation if that 3rd party happened to have added a bad 
string annotation. especially if I wasn't interested in the annotation part of 
the signature in the first place. (There's a lot of other useful info to be 
gleaned from it.)

OTOH I think it's fine for get_annotations() to raise by default if there's a 
bad annotation.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

These types were immutable before. If merely making them immutable again makes 
tests failing then perhaps there is something wrong with these tests or there 
are other bugs which are needed to be fixed.

--

___
Python tracker 

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



[issue42609] Eval with too high string multiplication crashes newer Python versions

2021-04-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +24328
pull_request: https://github.com/python/cpython/pull/25634

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

> If merely making them immutable again makes tests failing then perhaps there 
> is something wrong with these tests or there are other bugs which are needed 
> to be fixed.

I've noticed that the test_pdb fails because it expected the a class method to 
have the __repr__ "some func" but it got "bound method some func at 0x000". 
This may be the affect of this apply-to-all.diff. Other tests failing were 
actually fixed in other issues but somehow apply-to-all.diff is suddenly 
triggering them I think. The most fatal test failures is the test_pdb and 
test_logging because after those tests failed there were some unexpected 
behaviors like other tests were executed randomly, segfault and most prominent 
is that they started compiling by themselves! These are the two tests we should 
really look into right now.

--

___
Python tracker 

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



[issue32822] finally block doesn't re-raise exception if return statement exists inside

2021-04-26 Thread robertohueso


robertohueso  added the comment:

Just opened PR 25600, if the changes are ok then I can backport it to 3.9 and 
3.8 docs.

--

___
Python tracker 

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



[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-04-26 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-26 Thread Brandt Bucher


Brandt Bucher  added the comment:

Sounds good. I'll probably be able to make time to review it today, or tomorrow 
at the latest.

--

___
Python tracker 

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



[issue10599] sgmllib.parse_endtag() is not respecting quoted text

2021-04-26 Thread Irit Katriel


Irit Katriel  added the comment:

sgmllib was removed in python 3.

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



[issue14810] tarfile does not support timestamp older 1970-01-01

2021-04-26 Thread Irit Katriel


Irit Katriel  added the comment:

Python 2 only issue.

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



[issue32891] Add 'Integer' as synonym for 'Integral' in numbers module.

2021-04-26 Thread Mark Dickinson


Mark Dickinson  added the comment:

Sorry, Sergey: I don't have the time, energy or inclination for an extended 
discussion here, so I'll simply record my -1 for the proposed change and move 
on. If you want to push this change through, the way forward would likely be to 
find a core developer (maybe Terry?) who's willing to champion the change (and 
review the PR, of course).

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Guido van Rossum


Guido van Rossum  added the comment:

> > Could you please land the new flag and typeobject.c code now?
>
> I've only got two more questions before I mark it ready for review,
> and that's regarding Guido's comment in msg391756:
> Should the new flag also take care of __class__ assignment,
> or should we leave that out?

Let's leave that out.
It's a separate can of worms and someone else can  look into it later.

> Are there other places where !Py_TPFLAGS_HEAPTYPE is used
> where we would like to use the immutable flag?

Again, I think we can do that later.

So I am in favor of landing your (small) patch that introduces the flag now.

I also think you should try to separately land small patches that add the 
IMMUTABLETYPE flag to a few very public types, e.g. array.array and the three 
in _sre (which are exported by re.py).

We can then look into the test failures with a little less time pressure.

--

___
Python tracker 

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



[issue42904] get_type_hints does not provide localns for classes

2021-04-26 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 1b1f9852bda85c01ef124858f293e9c13e04ffce by Ken Jin in branch 
'master':
bpo-42904: Change search order of typing.get_type_hints eval (#25632)
https://github.com/python/cpython/commit/1b1f9852bda85c01ef124858f293e9c13e04ffce


--

___
Python tracker 

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



[issue43943] test_ssl fails in the macos CI

2021-04-26 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

Check out this build:

https://github.com/python/cpython/pull/25584/checks?check_run_id=2437718845

Here, test_ssl fails in the macos CI target:

1 test failed:
test_ssl

20 tests skipped:
test_devpoll test_epoll test_gdb test_idle test_ioctl test_msilib
test_multiprocessing_fork test_ossaudiodev test_spwd
test_startfile test_tcl test_tix test_tk test_ttk_guionly
test_ttk_textonly test_turtle test_winconsoleio test_winreg
test_winsound test_zipfile64
0:18:53 load avg: 3.12
0:18:53 load avg: 3.12 Re-running failed tests in verbose mode
0:18:53 load avg: 3.12 Re-running test_ssl in verbose mode
test_ssl: testing with 'OpenSSL 1.1.1k  25 Mar 2021' (1, 1, 1, 11, 15)
  under Mac ('10.15.7', ('', '', ''), 'x86_64')
  HAS_SNI = True
  OP_ALL = 0x8054
  OP_NO_TLSv1_1 = 0x1000
test__create_stdlib_context (test.test_ssl.ContextTests) ... ok
test_cert_store_stats (test.test_ssl.ContextTests) ... ok
test_check_hostname (test.test_ssl.ContextTests) ... ok
test_ciphers (test.test_ssl.ContextTests) ... ok
test_constructor (test.test_ssl.ContextTests) ... ok
test_context_client_server (test.test_ssl.ContextTests) ... ok
test_context_custom_class (test.test_ssl.ContextTests) ... ok
test_create_default_context (test.test_ssl.ContextTests) ... ok
test_get_ca_certs (test.test_ssl.ContextTests) ... ok
test_get_ciphers (test.test_ssl.ContextTests) ... ok
test_hostname_checks_common_name (test.test_ssl.ContextTests) ... ok
test_load_cert_chain (test.test_ssl.ContextTests) ... ok
test_load_default_certs (test.test_ssl.ContextTests) ... ok
test_load_default_certs_env (test.test_ssl.ContextTests) ... ok
test_load_default_certs_env_windows (test.test_ssl.ContextTests) ... skipped 
'Windows specific'
test_load_dh_params (test.test_ssl.ContextTests) ... ok
test_load_verify_cadata (test.test_ssl.ContextTests) ... ok
test_load_verify_locations (test.test_ssl.ContextTests) ... ok
test_min_max_version (test.test_ssl.ContextTests) ... ok
test_num_tickest (test.test_ssl.ContextTests) ... ok
test_options (test.test_ssl.ContextTests) ... ok
test_python_ciphers (test.test_ssl.ContextTests) ... ok
test_security_level (test.test_ssl.ContextTests) ... ok
test_session_stats (test.test_ssl.ContextTests) ... ok
test_set_default_verify_paths (test.test_ssl.ContextTests) ... ok
test_set_ecdh_curve (test.test_ssl.ContextTests) ... ok
test_sni_callback (test.test_ssl.ContextTests) ... ok
test_sni_callback_refcycle (test.test_ssl.ContextTests) ... ok
test_verify_flags (test.test_ssl.ContextTests) ... ok
test_verify_mode_protocol (test.test_ssl.ContextTests) ... ok
test_DER_to_PEM (test.test_ssl.BasicSocketTests) ... ok
test_asn1object (test.test_ssl.BasicSocketTests) ... ok
test_cert_time_to_seconds (test.test_ssl.BasicSocketTests) ... ok
test_cert_time_to_seconds_locale (test.test_ssl.BasicSocketTests) ... skipped 
'locale-specific month name needs to be different from C locale'
test_cert_time_to_seconds_timezone (test.test_ssl.BasicSocketTests) ... skipped 
'local time needs to be different from UTC'
test_connect_ex_error (test.test_ssl.BasicSocketTests) ... ok
test_constants (test.test_ssl.BasicSocketTests) ... ok
test_dealloc_warn (test.test_ssl.BasicSocketTests) ... ok
test_empty_cert (test.test_ssl.BasicSocketTests)
Wrapping with an empty cert file ... ok
test_enum_certificates (test.test_ssl.BasicSocketTests) ... skipped 'Windows 
specific'
test_enum_crls (test.test_ssl.BasicSocketTests) ... skipped 'Windows specific'
test_errors_sslwrap (test.test_ssl.BasicSocketTests) ... ok
test_get_default_verify_paths (test.test_ssl.BasicSocketTests) ... ok
test_malformed_cert (test.test_ssl.BasicSocketTests)
Wrapping with a badly formatted certificate (syntax error) ... ok
test_malformed_key (test.test_ssl.BasicSocketTests)
Wrapping with a badly formatted key (syntax error) ... ok
test_match_hostname (test.test_ssl.BasicSocketTests) ... ok
test_openssl_version (test.test_ssl.BasicSocketTests) ... ok
test_parse_all_sans (test.test_ssl.BasicSocketTests) ... ok
test_parse_cert (test.test_ssl.BasicSocketTests) ... 
{'OCSP': ('http://ocsp.verisign.com',),
 'caIssuers': ('http://SVRIntl-G3-aia.verisign.com/SVRIntlG3.cer',),
 'crlDistributionPoints': ('http://SVRIntl-G3-crl.verisign.com/SVRIntlG3.crl',),
 'issuer': ((('countryName', 'US'),),
(('organizationName', 'VeriSign, Inc.'),),
(('organizationalUnitName', 'VeriSign Trust Network'),),
(('organizationalUnitName',
  'Terms of use at https://www.verisign.com/rpa (c)10'),),
(('commonName', 'VeriSign Class 3 International Server CA - G3'),)),
 'notAfter': 'Sep 20 23:59:59 2012 GMT',
 'notBefore': 'Sep 21 00:00:00 2011 GMT',
 'serialNumber': '2EE6EA7640A075CEE5005F4D7C79549A',
 'subject': ((('countryName', 'FI'),),
 (('stateOrProvinceName', 'Espoo'),),
 (('localityName', 'Espoo'),),
 (('organizationName', 'Nokia'

[issue3849] FUD in documentation for urllib.urlopen()

2021-04-26 Thread Irit Katriel


Irit Katriel  added the comment:

This caveat no longer appear in the doc, and I could not find anything similar, 
so I am concluding this is no longer relevant.

--
nosy: +iritkatriel
resolution:  -> out of date
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



[issue43938] Document that dataclasses.FrozenInstanceError derives from AttributeError

2021-04-26 Thread Llandy Riveron Del Risco


Llandy Riveron Del Risco  added the comment:

The CLA should be correctly signed. Using this message as a test to see if the 
star appears correctly after the name.

--

___
Python tracker 

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



[issue10764] sysconfig and alternative implementations

2021-04-26 Thread Irit Katriel


Irit Katriel  added the comment:

This was fixed in python 3 (see issue9878) and it's too late for 2.7.

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

No problem, will do!

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-26 Thread Guido van Rossum


Guido van Rossum  added the comment:

PS. Don't wait for me. I'm going on vacation this Thursday and won't be
back until well after the 3.10b1 release is done, and before I go I'm
pretty busy already.

--

___
Python tracker 

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



[issue31726] Missing token.COMMENT

2021-04-26 Thread Irit Katriel


Irit Katriel  added the comment:

Fixed in 3.7 and too late for earlier versions.

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



[issue43757] pathlib: move 'resolve()' logic out of path flavour

2021-04-26 Thread Steve Dower


Steve Dower  added the comment:

I'm happy with the PR as it stands now. Anyone else have an opinion?

--
nosy: +eryksun, steve.dower

___
Python tracker 

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



  1   2   >