[issue39529] Deprecate get_event_loop()

2021-11-30 Thread Min RK


Min RK  added the comment:

The comments in this thread suggest that `set_event_loop` should also be 
deprecated, but it hasn't been. It doesn't seem to have any use without 
`get_event_loop()`.

I'm trying to understand the consequences of these changes for IPython, and 
make the changes intended by asyncio folks, but am not quite clear, yet.

If I understand it correctly, this means that the whole concept of a 'current' 
event loop is deprecated while no event loop is running?

My interpretation of these changes is that it means any persistent handles on 
any event loop while it isn't running is fully the responsibility of individual 
libraries (e.g. tornado, IPython).

This is coming up in IPython where we need a handle on the event loop and 
advance it with `run_until_complete` for each iteration (it should be the same 
loop to maintain persistent state across advances, so `asyncio.run()` would not 
be appropriate). We previously relied on `get_event_loop` to manage this 
handle, but I think we have to now shift to tracking our own handle, and can no 
longer rely on standard APIs to track a shared instance across packages.

--
nosy: +minrk

___
Python tracker 

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



[issue11352] Update cgi module doc

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Marking as easy. What needs to be done here is to review the patches and see if 
there are any doc improvements in them worth having. Then make a PR.

--
keywords: +easy, newcomer friendly

___
Python tracker 

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



[issue45943] Spam

2021-11-30 Thread Zachary Ware


Change by Zachary Ware :


Removed file: https://bugs.python.org/file50463/PSX_20210903_080553.jpg

___
Python tracker 

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



[issue45943] Spam

2021-11-30 Thread Zachary Ware


Change by Zachary Ware :


--
components:  -email
nosy:  -barry, oktaine57, r.david.murray
title: kids10yrsap...@gmail.com -> Spam
type: 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



[issue45944] Avoid calling isatty() for most open() calls

2021-11-30 Thread Collin Anderson


New submission from Collin Anderson :

isatty() is a system call on linux. Most open()s are files, and we're already 
getting the size of the file. If it has a size, then we know it's not a atty, 
and can avoid calling it.

--

___
Python tracker 

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



[issue45944] Avoid calling isatty() for most open() calls

2021-11-30 Thread Collin Anderson


Change by Collin Anderson :


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

___
Python tracker 

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



[issue45944] Avoid calling isatty() for most open() calls

2021-11-30 Thread Collin Anderson


Change by Collin Anderson :


--
components: IO
nosy: collinanderson
priority: normal
severity: normal
status: open
title: Avoid calling isatty() for most open() calls
type: performance
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue45943] kids10yrsap...@gmail.com

2021-11-30 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


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

___
Python tracker 

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



[issue31042] Inconsistency in documentation of operator.index

2021-11-30 Thread Joseph Fox-Rabinovitz


Joseph Fox-Rabinovitz  added the comment:

I closed the issue (it's already been rejected), primarily based on

> a.__index__ =  is an unauthorized use of a *reserved* word and the 
> effect of such usage is not and need not be documented.  

> The entry for __*__ does include "*Any* use of __*__ names, in any context, 
> that does not follow explicitly documented use, is subject to breakage 
> without warning."  To me, that says that the effect of the reserved-word 
> assignment is undefined.  It could be made to raise an exception.

It's like filing a bug report for UB in C.

--
stage: needs patch -> resolved
status: pending -> closed

___
Python tracker 

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



[issue27779] Sync-up docstrings in C version of the the decimal module

2021-11-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

One way to do is to dynamically update the docstrings on import.  Something 
like this:

for name in dir(_decimal.Decimal):
if name.startswith('_'):
continue
py_method = getattr(_decimal.Decimal, name)
py_doc = py_method.__doc__
if py_doc is None:
continue
c_method = getattr(_pydecimal.Decimal, name, None)
if c_method is None:
continue
c_doc = c_method.__doc__
if c_doc is None or len(c_doc) < len(py_doc):
c_method.__doc__ = py_doc

--

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2021-11-30 Thread Dong-hee Na


Dong-hee Na  added the comment:

Please update the documentation also.

see: 
https://docs.python.org/3.11/library/inspect.html?highlight=inspect#inspect.getmembers

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

___
Python tracker 

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



[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2021-11-30 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm closing this as "won't fix" for the negative indexing functionality. If 
someone wants to open an new documentation issue (and ideally provide a PR), 
that would be welcome.

--
resolution:  -> wont fix
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



[issue31700] one-argument version for Generator.typing

2021-11-30 Thread Zeth


Zeth  added the comment:

I don't get why this is closed. It is a bug. The Generator type annotation 
works differently than the others, it shouldn't.

Sebastian Rittau is correct here, the closer doesn't seem to have understood. 

As for using Iterator instead as the documentation suggests, that makes a 
mockery of the whole process. You might as well set everything to Any.

--
nosy: +zeth

___
Python tracker 

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



[issue45876] Improve accuracy of stdev functions in statistics

2021-11-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 0aa0bd056349f73de9577ccc38560c1d01864d51 by Raymond Hettinger in 
branch 'main':
bpo-45876:  Have stdev() also use decimal specific square root. (GH-29869)
https://github.com/python/cpython/commit/0aa0bd056349f73de9577ccc38560c1d01864d51


--

___
Python tracker 

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



[issue45943] kids10yrsap...@gmail.com

2021-11-30 Thread Qualyn Richard


Change by Qualyn Richard :


--
components: email
files: PSX_20210903_080553.jpg
nosy: barry, oktaine57, r.david.murray
priority: normal
severity: normal
status: open
title: kids10yrsap...@gmail.com
type: behavior
versions: Python 3.11
Added file: https://bugs.python.org/file50463/PSX_20210903_080553.jpg

___
Python tracker 

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



[issue11352] Update cgi module doc

2021-11-30 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue19941] python -m imports non-ASCII .py file without encoding declaration

2021-11-30 Thread STINNER Victor

STINNER Victor  added the comment:

I confirm: Python 3.10 works as expected.

Python 3.10 fails with the same SyntaxError using "python script.py" or "python 
-m script" if the script contains non-ASCII characters but is not encoded to 
UTF-8.

vstinner@apu$ python3 test.py
  File "/home/vstinner/test.py", line 1
print('�Hello world!')
 ^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xa1 in position 
0: invalid start byte

vstinner@apu$ python3 -m test
Traceback (most recent call last):
  (...)
  File "/home/vstinner/test.py", line 1
print('�Hello world!')
 ^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xa1 in position 
0: invalid start byte

--

___
Python tracker 

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



[issue11352] Update cgi module doc

2021-11-30 Thread Glenn Linderman


Glenn Linderman  added the comment:

First I would have to learn how GitHub works, and how PRs work.  And I haven't 
found time for that, as yet.

--

___
Python tracker 

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



[issue45876] Improve accuracy of stdev functions in statistics

2021-11-30 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +28095
pull_request: https://github.com/python/cpython/pull/29869

___
Python tracker 

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



[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-11-30 Thread STINNER Victor


STINNER Victor  added the comment:

Attached pep674_regex.py generated a regex to search for code incompatible with 
the PEP 674.

To download PyPI top 5000, you can use my script:
https://github.com/vstinner/misc/blob/main/cpython/download_pypi_top.py

To grep a regex in tarball and ZIP archives, you can use the rg command:

$ rg -zl REGEX DIRECTORY/*.{zip,gz,bz2,tgz}

Or you can try my script:
https://github.com/vstinner/misc/blob/main/cpython/search_pypi_top.py

--
Added file: https://bugs.python.org/file50462/pep674_regex.py

___
Python tracker 

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



[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-11-30 Thread STINNER Victor


STINNER Victor  added the comment:

In the PyPI top 5000 projects, I found 32 projects using "Py_SIZE(obj) =
new_size": 8 of them are written manually, 24 use Cython.

8 projects using "Py_SIZE(obj) = new_size":

* guppy3-3.1.2: src/sets/bitset.c and src/sets/nodeset.c
* mypy-0.910: list_resize() in mypyc/lib-rt/pythonsupport.h
* pickle5-0.0.12: pickle5/_pickle.c
* python-snappy-0.6.0: maybe_resize() in snappy/snappymodule.cc
* recordclass-0.16.3: lib/recordclass/_dataobject.c + code generated by Cython
* scipy-1.7.3: scipy/_lib/boost/boost/python/object/make_instance.hpp
* zodbpickle-2.2.0: src/zodbpickle/_pickle_33.c
* zstd-1.5.0.2: src/python-zstd.c

24 projects using "Py_SIZE(obj) = new_size" generated by an outdated Cython:

* Naked-0.1.31
* Shapely-1.8.0
* dedupe-hcluster-0.3.8
* fastdtw-0.3.4
* fuzzyset-0.0.19
* gluonnlp-0.10.0
* hdbscan-0.8.27
* jenkspy-0.2.0
* lightfm-1.16
* neobolt-1.7.17
* orderedset-2.0.3
* ptvsd-4.3.2
* py_spy-0.3.11
* pyemd-0.5.1
* pyhacrf-datamade-0.2.5
* pyjq-2.5.2
* pypcap-1.2.3
* python-crfsuite-0.9.7
* reedsolo-1.5.4
* tables-3.6.1
* thriftpy-0.3.9
* thriftrw-1.8.1
* tinycss-0.4
* triangle-20200424

--

___
Python tracker 

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



[issue45876] Improve accuracy of stdev functions in statistics

2021-11-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset a39f46afdead515e7ac3722464b5ee8d7b0b2c9b by Raymond Hettinger in 
branch 'main':
bpo-45876:  Correctly rounded stdev() and pstdev() for the Decimal case 
(GH-29828)
https://github.com/python/cpython/commit/a39f46afdead515e7ac3722464b5ee8d7b0b2c9b


--

___
Python tracker 

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



[issue19941] python -m imports non-ASCII .py file without encoding declaration

2021-11-30 Thread Eryk Sun


Eryk Sun  added the comment:

test.py is a UTF-8 file, which is the default source encoding in Python 3. It 
fails as expected if the test script is encoded differently, such as Latin-1, 
unless the source encoding is declared.

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



[issue45942] shutil.copytree can raise OSErrors not wrapped in shutil.Error

2021-11-30 Thread Daisy Choi


New submission from Daisy Choi :

shutil.copytree's docstring [1] and documentation [2] states that, "If 
exception(s) occur, an Error is raised with a list of reasons," but it can 
raise OSErrors at the top-level call. For example:

>>> import shutil
>>> shutil.copytree(nonexistent_dir, dst)
FileNotFoundError: [WinError 3] The system cannot find the path specified: '...'

>>> shutil.copytree(actually_a_file, dst)
NotADirectoryError: [WinError 267] The directory name is invalid: '...'

>>> shutil.copytree(src, dst_already_exists, dirs_exist_ok=False)
FileExistsError: [WinError 183] Cannot create a file when that file already 
exists: '...'

The errors above happen because shutil.copytree and shutil._copytree call 
os.scandir and os.makedir respectively without wrapping any exceptions inside 
shutil.Error. [3][4]


It seems like shutil.copytree(src, dst) only raises a shutil.Error if an 
OSError or shutil.Error was raised when copying over a file in src or during a 
recursive call to shutil.copytree for a subdirectory of src:

>>> shutil.copytree(dir_with_broken_symblink, dst)
shutil.Error: [('a\\symlink', 'b\\symlink', "[Errno 2] No such file or 
directory: 'asymlink'")]


Is this behavior intended? Should shutil.copytree be changed so that exceptions 
for the top level are wrapped inside shutil.Error, or should the documentation 
for shutil.copytree mention that it can raise exceptions that aren't 
shutil.Error? (Or is this just a non-issue?)


[1]: 
https://github.com/python/cpython/blob/b494f5935c92951e75597bfe1c8b1f3112fec270/Lib/shutil.py#L522
[2]: 
https://docs.python.org/3.10/library/shutil.html?highlight=shutil#shutil.copytree
[3]: 
https://github.com/python/cpython/blob/b494f5935c92951e75597bfe1c8b1f3112fec270/Lib/shutil.py#L554
[4]: 
https://github.com/python/cpython/blob/b494f5935c92951e75597bfe1c8b1f3112fec270/Lib/shutil.py#L457

--
components: Library (Lib)
messages: 407413
nosy: Floozutter
priority: normal
severity: normal
status: open
title: shutil.copytree can raise OSErrors not wrapped in shutil.Error
type: behavior
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



[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-11-30 Thread STINNER Victor


STINNER Victor  added the comment:

I found 4 projects using "Py_TYPE(obj) = new_type;" in the PyPI top 5000:

mypy-0.910:

* mypyc/lib-rt/misc_ops.c: Py_TYPE(template_) = &PyType_Type;
* mypyc/lib-rt/misc_ops.c: Py_TYPE(t) = metaclass;

recordclass-0.16.3:

* lib/recordclass/_dataobject.c: Py_TYPE(op) = type;
* lib/recordclass/_dataobject.c: Py_TYPE(op) = type;
* lib/recordclass/_litetuple.c: // Py_TYPE(ob) = &PyLiteTupleType_Type;

pysha3-1.0.2:

* Modules/_sha3/sha3module.c: Py_TYPE(type) = &PyType_Type;

datatable-1.0.0.tar.gz:

* src/core/python/namedtuple.cc: Py_TYPE(v) = type.v;
* src/core/python/tuple.cc: Py_TYPE(v_new) = v_type;

--

___
Python tracker 

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



[issue22942] Language Reference - optional comma

2021-11-30 Thread Irit Katriel


Change by Irit Katriel :


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



[issue33252] [doc] Clarify ResourceWarning documentation

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

It's too late for (b) but (a) still needs to be done.

--
keywords: +easy
nosy: +iritkatriel
title: Clarify ResourceWarning documentation -> [doc] Clarify ResourceWarning 
documentation
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5, Python 
3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-11-30 Thread STINNER Victor


STINNER Victor  added the comment:

In the PyPI top 5000, I found two projects using PyDescr_TYPE() and 
PyDescr_NAME() as l-value: M2Crypto and mecab-python3. In both cases, it was 
code generated by SWIG:

 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2

M2Crypto-0.38.0/src/SWIG/_m2crypto_wrap.c and 
mecab-python3-1.0.4/src/MeCab/MeCab_wrap.cpp contain the function:

SWIGINTERN PyGetSetDescrObject *
SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) {

  PyGetSetDescrObject *descr;
  descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0);
  assert(descr);
  Py_XINCREF(type);
  PyDescr_TYPE(descr) = type;
  PyDescr_NAME(descr) = PyString_InternFromString(getset->name);
  descr->d_getset = getset;
  if (PyDescr_NAME(descr) == NULL) {
Py_DECREF(descr);
descr = NULL;
  }
  return descr;
}

--

___
Python tracker 

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



[issue31042] Inconsistency in documentation of operator.index

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

My reading of the discussion is that we are not going to make any changes to 
the docs. Please correct me if I missed anything.

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

___
Python tracker 

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



[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-11-30 Thread STINNER Victor


Change by STINNER Victor :


--
title: [C API] Disallow using PyFloat_AS_DOUBLE() as l-value -> [C API] PEP 
674: Disallow using macros as l-value

___
Python tracker 

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



[issue16652] [doc] socket.getfqdn docs are not explicit enough about the algorithm.

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

There was a recent update nearby in issue40635 by Andrei, but I think it 
doesn't quite cover this issue.

--
nosy: +andrei.avk, iritkatriel
title: socket.getfqdn docs are not explicit enough about the algorithm. -> 
[doc] socket.getfqdn docs are not explicit enough about the algorithm.
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

It's failing in this assertion which was added in 
https://github.com/python/cpython/pull/28802 :

https://github.com/python/cpython/blob/8a45ca542a65ea27e7acaa44a4c833a27830e796/Objects/object.c#L1305

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue45340] Lazily create dictionaries for plain Python objects

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

I believe this may have caused the regression in Issue45941.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue30533] missing feature in inspect module: getmembers_static

2021-11-30 Thread Dino Viehland


Change by Dino Viehland :


--
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 3.9

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

It works for me on 3.10.

--
keywords: +3.11regression

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11, MacOS

2021-11-30 Thread Irit Katriel


Change by Irit Katriel :


--
title: help("modules") segfaults on 3.11 -> help("modules") segfaults on 3.11, 
MacOS

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

On the debugger: 

>>> help("modules")

Please wait a moment while I gather a list of all available modules...

/Users/iritkatriel/src/cpython/Lib/pkgutil.py:92: DeprecationWarning: The 
distutils package is deprecated and slated for removal in Python 3.12. Use 
setuptools or check PEP 632 for potential alternatives
  __import__(info.name)
/Users/iritkatriel/src/cpython/Lib/pkgutil.py:92: DeprecationWarning: lib2to3 
package is deprecated and may not be able to parse Python 3.10+
  __import__(info.name)
test_sqlite3: testing with version '2.6.0', sqlite_version '3.32.3'
/Users/iritkatriel/src/cpython/Lib/distutils/command/build_ext.py:13: 
DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig 
instead
  from distutils.sysconfig import customize_compiler, get_python_version
Process 88596 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS 
(code=1, address=0x0)
frame #0: 0x000100160046 
python.exe`_PyObject_GenericGetAttrWithDict(obj=0x000106acfa50, 
name=0x000100fe91c0, dict=0x, suppress=0) at 
object.c:1305:17
   1302 PyDictValues **values_ptr = _PyObject_ValuesPointer(obj);
   1303 if (values_ptr && *values_ptr) {
   1304 if (PyUnicode_CheckExact(name)) {
-> 1305 assert(*_PyObject_DictPointer(obj) == NULL);
   1306 res = _PyObject_GetInstanceAttribute(obj, *values_ptr, 
name);
   1307 if (res != NULL) {
   1308 goto done;
Target 0: (python.exe) stopped.
(lldb) p _PyObject_Dump(name)
object address  : 0x100fe91c0
object refcount : 165
object type : 0x10051aec0
object type name: str
object repr : 'string'
(lldb) p _PyObject_Dump(*_PyObject_DictPointer(obj))
error: Execution was interrupted, reason: Attempted to dereference an invalid 
pointer..
The process has been returned to the state before expression evaluation.
(lldb) p _PyObject_Dump(obj)
object address  : 0x106acfa50
object refcount : 7
object type : 0x105add590
object type name: _cffi_backend.FFI
object repr : <_cffi_backend.FFI object at 0x106acfa50>

--

___
Python tracker 

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



[issue45941] help("modules") segfaults on 3.11

2021-11-30 Thread Irit Katriel


New submission from Irit Katriel :

Python 3.11.0a2+ (heads/main:8a45ca542a, Nov 30 2021, 22:40:56) [Clang 13.0.0 
(clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> help("modules")

Please wait a moment while I gather a list of all available modules...

/Users/iritkatriel/src/cpython/Lib/pkgutil.py:92: DeprecationWarning: The 
distutils package is deprecated and slated for removal in Python 3.12. Use 
setuptools or check PEP 632 for potential alternatives
  __import__(info.name)
/Users/iritkatriel/src/cpython/Lib/pkgutil.py:92: DeprecationWarning: lib2to3 
package is deprecated and may not be able to parse Python 3.10+
  __import__(info.name)
test_sqlite3: testing with version '2.6.0', sqlite_version '3.32.3'
/Users/iritkatriel/src/cpython/Lib/distutils/command/build_ext.py:13: 
DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig 
instead
  from distutils.sysconfig import customize_compiler, get_python_version
zsh: segmentation fault  ./python.exe

--
components: Interpreter Core
messages: 407403
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: help("modules") segfaults on 3.11
type: crash
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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 8a45ca542a65ea27e7acaa44a4c833a27830e796 by Irit Katriel in 
branch 'main':
bpo-45711: Change exc_info related APIs to derive type and traceback from the 
exception instance (GH-29780)
https://github.com/python/cpython/commit/8a45ca542a65ea27e7acaa44a4c833a27830e796


--

___
Python tracker 

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



[issue45933] Illegal Instrution (Core Dumped)

2021-11-30 Thread Tom E


Tom E  added the comment:

Not yet... my configure flags are ./configure CFLAGS="-O3 -mtune=corei7-avx 
-march=corei7-avx" LDFLAGS="-L/usr/local/ssl/lib64" CPP=cpp CXX=g++ 
--with-openssl=/usr/local/ssl --enable-optimizations --enable-shared

--

___
Python tracker 

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



[issue25633] The documentation for urllib.request should mention http.client.HTTPException

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Issue22797 was resolved by being more specific about when a URLError is raised, 
rather than mentioning other exceptions as well. Do we want to do more than 
that, or can this be closed as well?

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



[issue6471] errno and strerror attributes incorrectly set on socket errors wrapped by urllib

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11:

>>> from urllib.request import urlopen
>>> try:
... urlopen('http://www.pythonfoobarbaz.org')
... except Exception as exc:
... err = exc
... print('err:', err)
... print('repr(err):', repr(err))
... print('err.errno:', err.errno)
... print('err.strerror:', err.strerror)
... print('err.reason:', err.reason)
... print('err.reason.errno:', err.reason.errno)
... print('err.reason.strerror:', err.reason.strerror)
... 
err: 
repr(err): URLError(gaierror(8, 'nodename nor servname provided, or not known'))
err.errno: None
err.strerror: None
err.reason: [Errno 8] nodename nor servname provided, or not known
err.reason.errno: 8
err.reason.strerror: nodename nor servname provided, or not known

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6, Python 2.7, Python 
3.1, Python 3.2

___
Python tracker 

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



[issue11352] Update cgi module doc

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Would you like to work on a GitHub PR with these changes?

--

___
Python tracker 

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



[issue11352] Update cgi module doc

2021-11-30 Thread Glenn Linderman


Glenn Linderman  added the comment:

Seems like another example of the CGI module not getting much support. While I 
haven't looked at all the details of the patches, it seems that several people 
have contributed enhancements or clarifications. and it would be a shame to 
discard them rather than merge the submissions... but it seems no one with 
authority wants to support CGI.

--
status: pending -> open

___
Python tracker 

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



[issue27779] Sync-up docstrings in C version of the the decimal module

2021-11-30 Thread Irit Katriel


Change by Irit Katriel :


--
assignee: skrah -> 
keywords: +easy -patch
type:  -> enhancement
versions: +Python 3.11 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue20468] [doc] resource module documentation is incorrect

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

The remaining text is now saying "Returns the number of bytes in a system 
page". This is still not accurate if it's sometimes number of kilobytes.

--
nosy: +iritkatriel
title: resource module documentation is incorrect -> [doc] resource module 
documentation is incorrect
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5, Python 3.6

___
Python tracker 

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



[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-30 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote PEP 674 "Disallow using macros as l-value" for this change: 
https://python.github.io/peps/pep-0674/

--

___
Python tracker 

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



[issue11352] Update cgi module doc

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Since there was no activity on this for 6-7 years and it's not describing a 
specific issue, I will close this in a couple of weeks unless someone asks me 
not to.

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



[issue30533] missing feature in inspect module: getmembers_static

2021-11-30 Thread Dino Viehland


Dino Viehland  added the comment:


New changeset af8c8caaf5e07c02202d736a31f6a2f7e27819b8 by Weipeng Hong in 
branch 'main':
bpo-30533:Add function inspect.getmembers_static that does not call properties 
or dynamic properties. (#20911)
https://github.com/python/cpython/commit/af8c8caaf5e07c02202d736a31f6a2f7e27819b8


--
nosy: +dino.viehland

___
Python tracker 

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



[issue24124] Two versions of instructions for installing Python modules

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

The legacy doc has this message in it now, so I think we can close this issue 
and trust Steve to deal with it along with the rest of distutils.


   The entire ``distutils`` package has been deprecated and will be
   removed in Python 3.12. This documentation is retained as a
   reference only, and will be removed with the package. See the
   :ref:`What's New ` entry for more information.

--
nosy: +iritkatriel, steve.dower
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue45940] add_multiarch_paths breaks cross compilation to Emscripten

2021-11-30 Thread Ethan Smith


Ethan Smith  added the comment:

Unfortunately, I am using latest master :/

I was able to reproduce this issue in your wasm docker container mounting 
CPython master into it, if you want to play with this.

--

___
Python tracker 

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



[issue45940] add_multiarch_paths breaks cross compilation to Emscripten

2021-11-30 Thread Christian Heimes


Christian Heimes  added the comment:

rm config.cache?

--

___
Python tracker 

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



[issue45940] add_multiarch_paths breaks cross compilation to Emscripten

2021-11-30 Thread Ethan Smith


Ethan Smith  added the comment:

Bah, it actually seems the real issue is that my configure is choosing the 
host_cpu as x86-64 for some reason. I'm still trying to figure out why though.

--

___
Python tracker 

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



[issue45940] add_multiarch_paths breaks cross compilation to Emscripten

2021-11-30 Thread Christian Heimes


Christian Heimes  added the comment:

Could you please try again with latest master? GH-29752 should have fixed the 
issue.

--
stage: patch review -> 

___
Python tracker 

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



[issue45940] add_multiarch_paths breaks cross compilation to Emscripten

2021-11-30 Thread Ethan Smith


Change by Ethan Smith :


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

___
Python tracker 

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



[issue45940] add_multiarch_paths breaks cross compilation to Emscripten

2021-11-30 Thread Ethan Smith


New submission from Ethan Smith :

When I cross compile on an Ubuntu system, the "PyBuildExt.add_multiarch_paths" 
method seems to add system includes, even when cross compiling for Emscripten.

Adding the system includes breaks Emscripten and causes several extensions to 
fail to build.

I have a patch which fixes this that I will be submitting shortly to Github.

--
components: Build
messages: 407387
nosy: christian.heimes, ethan smith
priority: normal
severity: normal
status: open
title: add_multiarch_paths breaks cross compilation to Emscripten
type: compile error
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



[issue19941] python -m imports non-ASCII .py file without encoding declaration

2021-11-30 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Interpreter Core

___
Python tracker 

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



[issue19941] python -m imports non-ASCII .py file without encoding declaration

2021-11-30 Thread Irit Katriel

Irit Katriel  added the comment:

On 3.11 both are working (on a Mac):

cpython-1 % python -m tt  
¡Hello world!
cpython-1 % ./python.exe -c 'import tt'
¡Hello world!

--
nosy: +iritkatriel

___
Python tracker 

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



[issue17186] no way to introspect registered atexit handlers

2021-11-30 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Library (Lib)
type:  -> enhancement
versions: +Python 3.11 -Python 3.4

___
Python tracker 

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



[issue28842] PyInstanceMethod_Type isn't hashable

2021-11-30 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Interpreter Core

___
Python tracker 

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



[issue28842] PyInstanceMethod_Type isn't hashable

2021-11-30 Thread Irit Katriel


Change by Irit Katriel :


--
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.3, Python 3.4, Python 3.5, 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



[issue24725] test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory"

2021-11-30 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The reproducer script and .c file I added earlier do not fail with "Cannot 
allocate memory" on macOS 12.0.1.

I haven't checked yet if this is enough to avoid test failures in the (now 
skipped) testFDPassEmpty.

--

___
Python tracker 

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



[issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools

2021-11-30 Thread Kumar Aditya


Kumar Aditya  added the comment:

Thanks Steve, installing v142 is indeed my current workaround but would be
great to support v143 as it is the latest version.

On Tue, Nov 30, 2021, 21:09 Steve Dower  wrote:

>
> Steve Dower  added the comment:
>
> An easy workaround for people encountering this is to set the
> PlatformToolset environment variable to v143 before building:
>
> $env:PlatformToolset = "v143"
>
> (or in CMD: set PlatformToolset=v143)
>
> Alternatively, you should be able to install the v142 toolset through VS
> 2022. For now, it's still the official toolset, though we'll definitely
> move to v143 before 3.11.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue45939] PyErr_SetObject documentation lacks mention of reference counting

2021-11-30 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The default behaviour of functions is to not steal references, in general only 
exceptions to this are documented. Likewise with return values: by default the 
result is a strong reference, and borrowed references are documented as such.

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools

2021-11-30 Thread Steve Dower


Steve Dower  added the comment:

An easy workaround for people encountering this is to set the PlatformToolset 
environment variable to v143 before building:

$env:PlatformToolset = "v143"

(or in CMD: set PlatformToolset=v143)

Alternatively, you should be able to install the v142 toolset through VS 2022. 
For now, it's still the official toolset, though we'll definitely move to v143 
before 3.11.

--

___
Python tracker 

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



[issue45939] PyErr_SetObject documentation lacks mention of reference counting

2021-11-30 Thread Eric Blake


New submission from Eric Blake :

While PyErr_SetString is obvious that you do not have to worry about the 
reference count of 'exception', the documentation for PyErr_SetObject is silent 
on whether it steals or adds a reference to 'value'.  This is particularly 
confusing, since other functions on the page (like PyErr_Restore) are explicit 
about stealing references.  Looking at non-canonical documentation, I found 
https://docstore.mik.ua/orelly/other/python/0596001886_pythonian-chp-24-sect-1.html
 which claims PyErr_SetObject steals a reference to 'value'.  But that is 
wrong; looking at the source code for _PyErr_SetString, it becomes obvious that 
once you use SetObject, the reference count will be increased, and the caller 
can release its own reference because nothing was stolen.

I noticed this lack of documentation when trying to debug a memory leak in 
nbdsh: 
https://listman.redhat.com/archives/libguestfs/2021-November/msg00280.html

--
assignee: docs@python
components: Documentation
messages: 407381
nosy: docs@python, eblake
priority: normal
severity: normal
status: open
title: PyErr_SetObject documentation lacks mention of reference counting

___
Python tracker 

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



[issue45917] Add math.exp2() function: 2^x

2021-11-30 Thread Mark Dickinson


Mark Dickinson  added the comment:

[Tim]

> on Windows, exp2(x) is way worse then pow(2, x)

Darn.

> I expect we should just live with it.

Agreed.

--

___
Python tracker 

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



[issue44637] Quoting issue on header Reply-To and other address headers

2021-11-30 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue45938] EmailMessage as_bytes

2021-11-30 Thread Marc Villain

New submission from Marc Villain :

I am parsing an email with a subject header where the encoding of a unicode 
character happens to be cut in half. When a second encoded unicode character is 
encountered, we get the following error:

> 'utf-8' codec can't encode characters in position 1-2: surrogates not allowed

This error can be reproduced using the following:
>>> from email.message import EmailMessage
>>> msg = EmailMessage()
>>> msg.add_header('subject', '=?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o_a=C3=B1o?=')
>>> print(str(msg)) # This will succeed
>>> print(msg.as_bytes())   # This will fail
>>> print(msg.as_string())  # This will fail

After a bit of investigations, it appears the library is at some poing trying 
to concatenate 'a\udcc3\udcb1o ' and 'cómo'. It then proceeds to try to call 
_ew.encode in email._header_value_parser._fold_as_ew on that. This obviously 
fails as '\udcc3\udcb1o' is not utf-8, whereas 'cómo' is.

More tests:
[OK] '=?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o_a=C3=B1o?='
 > b' subject: =?utf-8?q?a=C3=B1o_c=C3=B3mo?=\n\n'
[OK] '=?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o_cmo?='
 > b' subject: =?unknown-8bit?q?a=C3=B1o?= cmo\n\n'
[OK] '=?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o?= =?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o?='
 > b' subject: =?unknown-8bit?q?a=C3=B1oa=C3=B1o?=\n\n'
[KO] '=?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o_a=C3=B1o?='
 > 'utf-8' codec can't encode characters in position 1-2: surrogates not 
allowed

Not sure what is the best way to fix that.

--
components: Library (Lib)
messages: 407379
nosy: marc.villain
priority: normal
severity: normal
status: open
title: EmailMessage as_bytes
type: crash
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



[issue45732] Make python.org Windows and macOS installers use Tk 8.6.12

2021-11-30 Thread Ned Deily


Ned Deily  added the comment:

> It would be really great if Python 3.10.1 for macOS would come with Tcl/Tk 
> 8.6.12, as it is supposed to fix a nasty crash with Spanish keyboard.

Not to worry, the Tk for the macOS 3.10.1 will be updated. I need to do some 
more testing first. (BTW, I assume you are referring to this Tk issue: 
https://core.tcl-lang.org/tk/tktview/1626ed65b879bd76db99. The most recent 
3.11.0 alpha preview has a pre-release of 8.6.12 and I can confirm that the 
Cmd-` with the Spanish keyboard no longer crashes with it.)

--

___
Python tracker 

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



[issue44637] Quoting issue on header Reply-To and other address headers

2021-11-30 Thread R. David Murray


Change by R. David Murray :


--
nosy: +thehesiod
title: Quoting issue on header Reply-To -> Quoting issue on header Reply-To and 
other address headers

___
Python tracker 

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



[issue45932] EmailMessage incorrectly splits name and address header

2021-11-30 Thread R. David Murray


R. David Murray  added the comment:

This is a duplicate of #44637.

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



[issue44674] dataclasses should allow frozendict default value

2021-11-30 Thread Eric V. Smith


Change by Eric V. Smith :


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

___
Python tracker 

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



[issue43153] tempfile seems to treat a file as a directory when processing an exception in the onerror()

2021-11-30 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

My last comment was wrong, the issue I linked is unrelated.

I think the actual issue here is the code here:
https://github.com/python/cpython/blob/4b97d974ecca9cce532be55410fe851eb9fdcf21/Lib/tempfile.py#L826

If `path` is a file that causes a permission error, `rmtree` is called and 
causes a NotADirectory error.

This can be confusing when debugging and can lead to a bug if user's code tries 
to catch a PermissionError it expects but instead gets NotADirectory error.

A solution is probably to check if path is a file and error is PermissionError 
and if ignore_errors=False, re-raise it instead of calling rmtree(). If 
ignore_errors=True, return instead of calling rmtree().

I don't have windows so can't test the OP code with this approach.

Serhiy: adding you since you wrote `def onerror()` in tempfile module, do you 
think that is the cause of the issue and the right solution for it?

--
nosy: +kj, serhiy.storchaka

___
Python tracker 

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



[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4b97d974ecca9cce532be55410fe851eb9fdcf21 by Victor Stinner in 
branch 'main':
bpo-45476: Disallow using asdl_seq_GET() as l-value (GH-29866)
https://github.com/python/cpython/commit/4b97d974ecca9cce532be55410fe851eb9fdcf21


--

___
Python tracker 

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



[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-30 Thread STINNER Victor


STINNER Victor  added the comment:

I created this issue to disallow macros like PyFloat_AS_DOUBLE() and 
PyDict_GET_SIZE() as l-value. It seems like this change by itself is 
controversial.

I proposed one way to implement this change: convert macros to static inline 
functions. I didn't expect that this conversion would be also controversial. 
For now, I abandon the static inline approach, to focus on the implementation 
which keeps macros: modify macros to use _Py_RVALUE() => PR 28976.

Once the PR 28976 will be merged and the PEP 670 will be accepted, we can 
reconsider converting these macros to static inline functions, then it should 
be non controversial.

--

___
Python tracker 

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



[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-11-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 99a9b343316172f049a52b39a406f0c0c42c106f by Miss Islington (bot) 
in branch '3.9':
bpo-37658: Actually return result in race condition (GH-29202) (GH-29832)
https://github.com/python/cpython/commit/99a9b343316172f049a52b39a406f0c0c42c106f


--

___
Python tracker 

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



[issue41270] NamedTemporaryFile is not its own iterator.

2021-11-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Biopython uses next() without iter(), and there is no guarantee that it should 
work.

--
nosy: +brett.cannon, pitrou, serhiy.storchaka

___
Python tracker 

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



[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-30 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +28092
pull_request: https://github.com/python/cpython/pull/29866

___
Python tracker 

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



[issue44884] logging Formatter behavior when using msecs and braces : '{'

2021-11-30 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue41270] NamedTemporaryFile is not its own iterator.

2021-11-30 Thread Irit Katriel


Change by Irit Katriel :


--
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 
3.8, Python 3.9

___
Python tracker 

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



[issue26791] shutil.move fails to move symlink (Invalid cross-device link)

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Removing old versions.

--
nosy: +iritkatriel
versions: +Python 3.11 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 
3.8

___
Python tracker 

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



[issue45916] documentation link error

2021-11-30 Thread Tony Zhou


Tony Zhou  added the comment:

ok i see, I found the pdf. thank you for that anyway

--

___
Python tracker 

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



[issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

I'm pretty sure both behaviours are by design.  Can you explain why this is a 
problem?

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



[issue29964] [doc] %z directive has no effect on the output of time.strptime

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

See also Issue20281.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python, iritkatriel
title: %z directive has no effect on the output of time.strptime -> [doc] %z 
directive has no effect on the output of time.strptime
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.5

___
Python tracker 

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



[issue20281] [doc] time.strftime %z format specifier is the same as %Z

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

See also Issue29964.

--

___
Python tracker 

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



[issue13236] unittest needs more flush calls

2021-11-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I do not remember details, but I encountered this issue (maybe when run tests 
in subprocesses?).

--

___
Python tracker 

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



[issue13236] unittest needs more flush calls

2021-11-30 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue13236] unittest needs more flush calls

2021-11-30 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 7.0 -> 8.0
pull_requests: +28091
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29864

___
Python tracker 

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



[issue45607] Make it possible to enrich an exception's error message

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Issue28953 is another use case for this feature.

--

___
Python tracker 

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



[issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:

Thank you Judy and Vishal!

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



[issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 031e2bb3326be542b224bbe35e7829846ea422cd by Miss Islington (bot) 
in branch '3.9':
bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right 
(GH-29801) (GH-29863)
https://github.com/python/cpython/commit/031e2bb3326be542b224bbe35e7829846ea422cd


--

___
Python tracker 

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



[issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 39751420b363530ef46506f10691d7b91ffe9b44 by Miss Islington (bot) 
in branch '3.10':
bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right 
(GH-29801) (GH-29862)
https://github.com/python/cpython/commit/39751420b363530ef46506f10691d7b91ffe9b44


--

___
Python tracker 

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



[issue34820] binascii.c:1578:1: error: the control flow of function ‘binascii_crc32’ does not match its profile data (counter ‘arcs’)

2021-11-30 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks for the update.

I'm marking the issue as "wont fix" for 3.7 and 3.8.

--
nosy: +christian.heimes
resolution:  -> wont fix
stage: needs patch -> resolved
status: open -> closed
superseder:  -> "make clean" should remove PGO task data

___
Python tracker 

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



[issue45732] Make python.org Windows and macOS installers use Tk 8.6.12

2021-11-30 Thread Aivar Annamaa


Aivar Annamaa  added the comment:

Do I understand properly, that the macOS build hasn't been updated yet?

It would be really great if Python 3.10.1 for macOS would come with Tcl/Tk 
8.6.12, as it is supposed to fix a nasty crash with Spanish keyboard.

--

___
Python tracker 

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



[issue45933] Illegal Instrution (Core Dumped)

2021-11-30 Thread Christian Heimes


Christian Heimes  added the comment:

The issue sounds like a bug in your Linux distribution. I have been using GCC 
11.2 for a while without any problems. Have you filed a bug with Ubuntu already?

--
nosy: +christian.heimes

___
Python tracker 

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



[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c19c3a09618ac400538ee412f84be4c1196c7bab by Victor Stinner in 
branch 'main':
bpo-45476: Add _Py_RVALUE() macro (GH-29860)
https://github.com/python/cpython/commit/c19c3a09618ac400538ee412f84be4c1196c7bab


--

___
Python tracker 

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



[issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f

2021-11-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28090
pull_request: https://github.com/python/cpython/pull/29863

___
Python tracker 

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



[issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f

2021-11-30 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset f97ec09baf8431494fd2ef5133090c7b0afd0551 by Vishal Pandey in 
branch 'main':
bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right 
(GH-29801)
https://github.com/python/cpython/commit/f97ec09baf8431494fd2ef5133090c7b0afd0551


--
nosy: +iritkatriel

___
Python tracker 

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



[issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f

2021-11-30 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +28089
pull_request: https://github.com/python/cpython/pull/29862

___
Python tracker 

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



  1   2   >