[issue44029] PEP 624: Remove Py_UNICODE APIs

2021-05-07 Thread Inada Naoki


Change by Inada Naoki :


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



[issue10513] sqlite3.InterfaceError after commit

2021-05-07 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

I cannot reproduce this with Python 3.8, 3.9, nor 3.10 (macOS builds from 
python.org). Suggesting to close this.

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

___
Python tracker 

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



[issue44065] "configure: error: internal configure error for the platform triplet" on macOS with Clang supporting --print-multiarch:

2021-05-07 Thread Stephan Bergmann


Stephan Bergmann  added the comment:

"from the sources it looks like it would still be an issue with the latest 
cpython main branch", and if I check out current main branch and run 
`CC='/path-to-local-llvm-trunk/bin/clang -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk'
 ./configure` it indeed still fails with that "configure: error: internal 
configure error for the platform triplet, please file a bug report"

--

___
Python tracker 

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



[issue43949] binascii.Error raised in smtplib when initial_response_ok=False

2021-05-07 Thread junpengruan


junpengruan <632077...@qq.com> added the comment:

Hi Pandu, thanks for your reply!
I have read the RFC4954 you mentioned and agree that the server shouldn't react 
like this. Then I notice that this RFC's publication date is 2007 and the 
server I use is published in 2003, that's maybe the reson why I meet this 
problem, Maybe I should just evade this problem for my own program and close 
this bug?

--

___
Python tracker 

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



[issue44065] "configure: error: internal configure error for the platform triplet" on macOS with Clang supporting --print-multiarch:

2021-05-07 Thread Christian Heimes


Change by Christian Heimes :


--
components: +macOS
nosy: +lukasz.langa, ned.deily, pablogsal, ronaldoussoren
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

___
Python tracker 

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



[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan


New submission from Shreyan Avigyan :

I usually program in Python C API without defining Py_LIMITED_API. I thought 
about using the stable ABI today. To my surprise, there are lot of conflicts 
occurring if Py_LIMITED_API is defined. The whole list of errors are:-

1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(16,17): 
error C2037: left of 'tp_free' specifies undefined struct/union '_typeobject'
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(23,31): 
error C2037: left of 'tp_alloc' specifies undefined struct/union '_typeobject'
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(46,34): 
warning C4013: '_PyArg_ParseTupleAndKeywords_SizeT' undefined; assuming extern 
returning int
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(97,21): 
error C2079: 'ExampleType' uses undefined struct '_typeobject'
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(109,1): 
error C2078: too many initializers
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(99,3): 
error C2224: left of '.tp_name' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(100,3): 
error C2224: left of '.tp_doc' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(101,3): 
error C2224: left of '.tp_basicsize' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(102,3): 
error C2224: left of '.tp_itemsize' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(103,3): 
error C2224: left of '.tp_flags' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(104,3): 
error C2224: left of '.tp_new' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(105,3): 
error C2224: left of '.tp_init' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(106,3): 
error C2224: left of '.tp_dealloc' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(107,3): 
error C2224: left of '.tp_members' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension.h(108,3): 
error C2224: left of '.tp_methods' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(16,20): 
error C2037: left of 'tp_free' specifies undefined struct/union '_typeobject'
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(23,33): 
error C2037: left of 'tp_alloc' specifies undefined struct/union '_typeobject'
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(147,21): 
error C2079: 'CustomType' uses undefined struct '_typeobject'
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(160,1): 
error C2078: too many initializers
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(149,6): 
error C2224: left of '.tp_name' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(150,6): 
error C2224: left of '.tp_doc' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(151,6): 
error C2224: left of '.tp_basicsize' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(152,6): 
error C2224: left of '.tp_itemsize' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(153,6): 
error C2224: left of '.tp_flags' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(154,6): 
error C2224: left of '.tp_new' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(155,6): 
error C2224: left of '.tp_init' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(156,6): 
error C2224: left of '.tp_dealloc' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(157,6): 
error C2224: left of '.tp_members' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(158,6): 
error C2224: left of '.tp_methods' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\Extension2.h(159,6): 
error C2224: left of '.tp_getset' must have struct/union type
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\main.c(18,32): warning 
C4133: 'function': incompatible types - from 'int *' to 'PyTypeObject *'
1>C:\Users\shrey\source\repos\PyTypeExtension\Extension\main.c(19,28): warning 
C4133: 'function': incompatible types - from 'int *' to 'PyTypeObject *'

This is pretty awkward because these errors only occur in stable ABI. Am I 
doing something wrong here or is there a bug out there?

--
components: Build, C API, Windows
messages: 393173
nosy

[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Christian Heimes


Christian Heimes  added the comment:

Looks like you are doing something wrong. For example you seem to use internal, 
private bits like "_typeobject" instead of public APIs like PyTypeObject.

These kind of questions are more appropriate for mailing list or 
https://discuss.python.org/ . Please also post links to your source code.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue44061] Regression in pkgutil: iter_modules stopped taking Path argument in python 3.8.10 and 3.9.5

2021-05-07 Thread Miguel Brito


Change by Miguel Brito :


--
keywords: +patch
pull_requests: +24621
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25964

___
Python tracker 

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



[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Thanks for the quick response but I'm using PyTypeObject only. But in stable 
ABI it uses the name _typeobject to represent it. And I have a lot of files in 
my module therefore it's difficult to attach them.

--

___
Python tracker 

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



[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Christian Heimes


Christian Heimes  added the comment:

Is your code on Github, Gitlab, or BitBucket? Otherwise please attach 
Extension.h. What's your platform and exact Python version?

--

___
Python tracker 

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



[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

I've two header files, one main.c file and it's on my local machine. My 
platform is Windows, Python is 3.9.5 32bit and IDE is Visual Studio 2019.
I'm attaching those files.

--
Added file: https://bugs.python.org/file50022/main.c

___
Python tracker 

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



[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan


Change by Shreyan Avigyan :


Added file: https://bugs.python.org/file50023/Extension.h

___
Python tracker 

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



[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan


Change by Shreyan Avigyan :


Added file: https://bugs.python.org/file50024/Extension2.h

___
Python tracker 

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



[issue44067] Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT

2021-05-07 Thread AMRIT RAI


New submission from AMRIT RAI :

The current zipFile implementation supports the allowZip64,which can make large 
zip files.
There is a bug in the current implementation of close method ,where the extra 
field is overwritten .

To reproduce it :
1.Create a directory with more then 4 GB of data(spread over many files).
2.Make the zip of those files using the any rar achiever which adds NTFS 
metadata(mtime,atime and ctime) of files in the zip.
3.Apped a new file to the zip using the zip library .

When i open the zip again ,the files processed after the ZIP64_LIMIT is reached 
will have there extra fields overwritten.

I have attached the zip which contained the python used to add the new file, 
and the images of zip archive before adding new files and after.

--
components: Library (Lib)
files: zip_bug.zip
messages: 393178
nosy: shaanbhaya
priority: normal
severity: normal
status: open
title: Zipfile lib overwrites the extra field during closing when the archive 
size is more then ZIP64_LIMIT
type: behavior
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9
Added file: https://bugs.python.org/file50025/zip_bug.zip

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2021-05-07 Thread Peixing Xin


Change by Peixing Xin :


--
pull_requests: +24622
pull_request: https://github.com/python/cpython/pull/25965

___
Python tracker 

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



[issue44067] Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT

2021-05-07 Thread AMRIT RAI


AMRIT RAI  added the comment:

The issue stems from the following code inside the 
def _write_end_record(self): method ,where the extra fields are trimmed .

if zinfo.header_offset > ZIP64_LIMIT:
extra.append(zinfo.header_offset)
header_offset = 0x
else:
header_offset = zinfo.header_offset

extra_data = zinfo.extra
min_version = 0
if extra:
# Append a ZIP64 field to the extra's
extra_data = _strip_extra(extra_data, (1,))
extra_data = struct.pack(
'

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



[issue43806] asyncio.StreamReader hangs when reading from pipe and other process exits unexpectedly

2021-05-07 Thread Marko


Marko  added the comment:

@jaswdr Hm, this is was somewhat unexpected for me, since when reading directly 
from pipe, and EOF is sent.

Timeout was somewhat awkward in my case, since I don't know when other process 
will start sending, and how long it would take. On the other hand, I use 
asyncio loop, and can do this asynchronously, so I get notified when child 
process dies, by other means, and close the stream. So there are plenty of 
possible workarounds, but I'm not sure it is impossible to solve the problem on 
the library level yet. It would take more digging into implementation from my 
side, however.

--

___
Python tracker 

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



[issue43558] The dataclasses documentation should mention how to call super().__init__

2021-05-07 Thread Douwe Hoekstra


Change by Douwe Hoekstra :


--
keywords: +patch
pull_requests: +24623
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25967

___
Python tracker 

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



[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

This is a Visual Studio solution. Will I attach the whole zip containing the 
projects and files and the the solution file?

--

___
Python tracker 

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



[issue44047] [sqlite3] remove unused argument from _pysqlite_seterror()

2021-05-07 Thread Berker Peksag


Berker Peksag  added the comment:

Thank you!

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

___
Python tracker 

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



[issue12441] _GLOBAL_DEFAULT_TIMEOUT remains as an object() in HTTPConnection and the connection hangs

2021-05-07 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

The _GLOBAL_DEFAULT_TIMEOUT usage is an established pattern with socket module. 
https://github.com/python/cpython/blob/main/Lib/socket.py#L805

This is not a bug and we don't have a good reproducible step mentioned in the 
report.

--
resolution:  -> not a bug
stage: test needed -> 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



[issue30164] Testing FTP support in urllib shouldn't use Debian FTP server

2021-05-07 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

This has been fixed here - https://github.com/python/cpython/pull/2755/files

Python docs demonstrate the usage of ftplib using ftp.debian.org.
I think, it is perfectly reasonable and welcome thing to do so.

https://docs.python.org/3/library/ftplib.html

Closing this ticket as fixed.  I will add some minor improvement to the 
documentation usage though.

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



[issue30164] Testing FTP support in urllib shouldn't use Debian FTP server

2021-05-07 Thread Senthil Kumaran


Change by Senthil Kumaran :


--
pull_requests: +24624
pull_request: https://github.com/python/cpython/pull/25968

___
Python tracker 

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



[issue40297] test_socket.CANTest is broken at HEAD on master

2021-05-07 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 8a12f46dd8c780de84d78e6dd8350230e52e0c46 by Miss Islington (bot) 
in branch '3.8':
bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-19548) (#25957)
https://github.com/python/cpython/commit/8a12f46dd8c780de84d78e6dd8350230e52e0c46


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44056] Incorrect line number for syntax error.

2021-05-07 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue9725] urllib.request.FancyURLopener won't connect to pages requiring username and password

2021-05-07 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

urllib.request.FancyURLopener has been deprecated since 3.3

https://docs.python.org/3/library/urllib.request.html#urllib.request.FancyURLopener

This bug wont be fixed. The other higher level methods (urlopen) could used for 
basic authentication with username and password.

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



[issue30164] Testing FTP support in urllib shouldn't use Debian FTP server

2021-05-07 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +24625
pull_request: https://github.com/python/cpython/pull/25969

___
Python tracker 

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



[issue30164] Testing FTP support in urllib shouldn't use Debian FTP server

2021-05-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24626
pull_request: https://github.com/python/cpython/pull/25970

___
Python tracker 

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



[issue25872] multithreading traceback KeyError when modifying file

2021-05-07 Thread So Ukiyama


So Ukiyama  added the comment:

I apologize if this is rude, as I am not familiar with this method.
I created a following PR to add unit tests about this issue.

https://github.com/python/cpython/pull/25913

I would be happy to receive feedback on the PR.

--
components: +Interpreter Core -Library (Lib)
nosy: +uniocto

___
Python tracker 

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



[issue44068] Possible divide by zero problems

2021-05-07 Thread yiyuaner


New submission from yiyuaner :

In the file Objects/unicodeobject.c, we have the following code:

static PyObject*
resize_compact(PyObject *unicode, Py_ssize_t length) {
  ...
  char_size = PyUnicode_KIND(unicode);
  ...
  if (length > ((PY_SSIZE_T_MAX - struct_size) / char_size - 1)) {
PyErr_NoMemory();
return NULL;
  }
}

However, PyUnicode_KIND may return 0 if the variable unicode has kind 
PyUnicode_WCHAR_KIND, leading to a divide by zero problem.

The same pattern is also used without checking in function "static int
resize_inplace(PyObject *unicode, Py_ssize_t length)".

Here is the link to the code location: 
https://github.com/python/cpython/blob/main/Objects/unicodeobject.c#L1045

Should we add an explicit check on variable char_size before using it in 
division?

--
components: Unicode
messages: 393188
nosy: ezio.melotti, vstinner, yiyuaner
priority: normal
severity: normal
status: open
title: Possible divide by zero problems
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



[issue44068] Possible divide by zero problems

2021-05-07 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It cannot be 0 if PyUnicode_IS_READY() returns true.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue44069] pathlib.Path.glob's generator is not a real generator

2021-05-07 Thread Elijah Rippeth


New submission from Elijah Rippeth :

I have a directory with hundreds of thousands of text files. I wanted to 
explore one file, so I wrote the following code expecting it to happen 
basically instantaneously because of how generators work:

```python
from pathlib import Path

base_dir = Path("/path/to/lotta/files/")
files = base_dir.glob("*.txt")# return immediately
first_file = next(files)  # doesn't return immediately
```

to my surprise, this took a long time to finish since `next` on a generator 
should be O(1).

A colleague pointed me to the following code: 
https://github.com/python/cpython/blob/adcd2205565f91c6719f4141ab4e1da6d7086126/Lib/pathlib.py#L431

I assume calling this list is to "freeze" a potentially changing directory 
since `scandir` relies on `os.stat`, but this causes a huge penalty and makes 
the generator return-type a bit disingenuous. In any case, I think this is bug 
worthy in someo sense.

--
components: IO
messages: 393190
nosy: Elijah Rippeth
priority: normal
severity: normal
status: open
title: pathlib.Path.glob's generator is not a real generator
type: performance
versions: Python 3.6

___
Python tracker 

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



[issue41730] Show deprecation warnings for tkinter.tix

2021-05-07 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +24627
pull_request: https://github.com/python/cpython/pull/25971

___
Python tracker 

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



[issue41730] Show deprecation warnings for tkinter.tix

2021-05-07 Thread wyz23x2


wyz23x2  added the comment:

Merged!

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



[issue41730] Show deprecation warnings for tkinter.tix

2021-05-07 Thread wyz23x2


Change by wyz23x2 :


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



[issue41730] Show deprecation warnings for tkinter.tix

2021-05-07 Thread miss-islington


miss-islington  added the comment:


New changeset ec6a1ea1ee67a5e7c8ee5f5b1541bc1c6e17a373 by Miss Islington (bot) 
in branch '3.10':
bpo-41730: Show deprecation warnings for tkinter.tix (GH-22186)
https://github.com/python/cpython/commit/ec6a1ea1ee67a5e7c8ee5f5b1541bc1c6e17a373


--

___
Python tracker 

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



[issue16866] libainstall doesn't create $(BINDIR) directory

2021-05-07 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

This is still a problem behaviour as of May 2021.

./configure --prefix=/home/senthil/foobar
make libainstall

failed with 

/usr/bin/install: cannot create regular file 
'/home/senthil/foobar/bin/python3.11-config': No such file or directory
make: *** [Makefile:1715: libainstall] Error 1

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



[issue35590] logging.handlers.SysLogHandler with STREAM connects in constructor without timeout

2021-05-07 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +vinay.sajip
versions: +Python 3.11 -Python 2.7, 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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-07 Thread guangli dong


guangli dong  added the comment:

@Gregory P. Smith

yes, i agree that there are many other ways to make "urllib" or "httplib" such 
http client hang, because "timeout" is not global read timeout, this "timeout" 
has effects when every "read socket" operation.

why you think it will not result in memory exhaustion?

the "hlist" list will not be more and more larger? i use "top" command to 
observe, and find the "client.py" process's memory is more and more larger 
slowly.
```
httplib.py

while True:
...
line = self.fp.readline(_MAXLINE + 1)
...
hlist.append(line)
```


the last, would you mind remove "100 Continue" in this bug title? i think it 
will maybe make others misunderstand that this bug only occur when response 
status code is "100".

--

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

httplib.py is a Python 2 concept.  Python 2 is end of life.  bugs.python.org no 
longer tracks issues with its code.  I don't doubt that Python 2.7 has bugs.  
As a matter of policy, we don't care - 
https://www.python.org/doc/sunset-python-2/.  Python 3.6 as that is the oldest 
branch still open for security fixes.

The PRs associated with this issue fixed a codepath in Python 3 that only 
happened after a '100' response.  That codepath did not accumulate headers:

```
if status != CONTINUE:
break
# skip the header from the 100 response
while True:
skip = self.fp.readline(_MAXLINE + 1)
if len(skip) > _MAXLINE:
raise LineTooLong("header line")
skip = skip.strip()
if not skip:
break
```

CONTINUE = 100; meaning that loop only runs after receiving what appears to be 
a 100 continue response.  And it does not accumulate data.

There is no `hlist` in the original pre-fix Python 3.6+ code.  Nor any header 
accumulation caused by this the client.py talking to evil_server.py as 
described in this issues opening message.

--

___
Python tracker 

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



[issue44063] compiler: does not revert back the end_* locations

2021-05-07 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +24628
pull_request: https://github.com/python/cpython/pull/25972

___
Python tracker 

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



[issue16866] libainstall doesn't create $(BINDIR) directory

2021-05-07 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

issue25696 was related, and it fixed bininstall issue.

--

___
Python tracker 

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



[issue43568] Drop support for Mac OS X < 10.3 module linking

2021-05-07 Thread Joshua Root


Joshua Root  added the comment:

Thanks Ned. Would it be OK to backport just the distutils change to 3.9?

--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-07 Thread Ned Deily


Ned Deily  added the comment:

> Unfortunately you already have to deal with the existence of 3.9.5 having the 
> new behavior but not having a control.

I have been holding off on 3.7.x and 3.6.x security releases pending 
resolutions of this and other open security issues. But based on the most 
recent discussions, my take is that it would be a disservice to anyone still 
using 3.7 or 3.6 to release with the most recent "partial" fix (GH-25924 / 
GH-25924) if it going to cause breakage. So, rather than delay further, unless 
there is a new resolution or someone has a very persuasive argument against it, 
I am going to revert those last two PRs from 3.7 and 3.6 for the upcoming 
releases pending a less intrusive fix.

--

___
Python tracker 

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



[issue43656] StackSummary.format fails if str(value) fails

2021-05-07 Thread Irit Katriel


Irit Katriel  added the comment:

I think it's the other way around - the documentation usually states what 
exceptions a function can raise as part of its published API, not which 
exceptions it should not raise.

--

___
Python tracker 

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



[issue39228] traceback.FrameSummary does not handle exceptions from `repr()`

2021-05-07 Thread Irit Katriel


Irit Katriel  added the comment:

I think pdb is a different story because it's an interactive application rather 
than a library. pdb can decide that it prints an error to the screen and 
returns to the interactive prompt, if that is appropriate. The functions of the 
traceback module don't have application context telling them what they should 
do with an exception.

--

___
Python tracker 

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



[issue21381] Python 3.4+ interpreter built on/with OS X 10.7 deployment target segfaults on 10.8+

2021-05-07 Thread Ned Deily


Ned Deily  added the comment:

A number of changes have been made since the initial report in 3.4 that might 
affect this area including as of 3.9.1 finally supporting weaklinking, that is, 
building on a newer version of macOS to run on older systems. Plus we no 
actively support systems older than macOS 10.9. I am closing this issue as 
out-of-date. Please re-open if the recursion segfault is still an issue with 
current Python and macOS versions.

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



[issue43568] Drop support for Mac OS X < 10.3 module linking

2021-05-07 Thread Ned Deily


Ned Deily  added the comment:

> Would it be OK to backport just the distutils change to 3.9?

While this seems like a minor feature behavior change rather than a bug fix, it 
probably wouldn't cause any problems to make such a change.  I don't recall 
this issue coming up before as a problem for users - at least not in a very 
long time - but, if you think a backport is called for, feel free to submit a 
PR. Thanks!

--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-07 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

Hello All,

I think, the current striping of ASCII newline and tab is a _reasonable_ 
solution given it was a security issue. 

It also follows the guidelines of "WHATWG" (Specifically Point 3)

> 2. If input contains any ASCII tab or newline, validation error.
> 3. Remove all ASCII tab or newline from input.

And as per WHATWG, "A validation error does not mean that the parser 
terminates.  Termination of a parser is always stated explicitly, e.g., through 
a return statement."

I agree that terms used in spec vs representing it with library code may not be 
1:1, but we tried to stay close and followed the existing behavior of widely 
used clients.

This is a fix, per a security report, and per an evolv{ed,ing} standard 
recommendation. When dealing with security fixes, there could be simple or more 
complex migration involvements. 

My reading of the previous message was, even if we raised exception or gave as 
a parameter, it wont be any better for certain downstream users, as we let the 
security problem open, and have it only as opt-in fix.


With respect to control 

The comment in the review - 
https://github.com/python/cpython/pull/25595#pullrequestreview-647122723 was to 
make these characters available in module level parameters, so that if users 
prefer to override, they could patch it.

so a revert may not be necessary for the reason of lack of control.

In short, at this moment, I still feel that is reasonable fix at this moment 
for the problem report, and intention to move closer to whatwg spec.

--

___
Python tracker 

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



[issue44065] "configure: error: internal configure error for the platform triplet" on macOS with Clang supporting --print-multiarch:

2021-05-07 Thread Ned Deily


Ned Deily  added the comment:

We don't recommend nor do we test building Python for macOS with anything but 
the Apple-supplied compilers in either Xcode or the Command Line Tools and this 
hasn't been a problem with the clang versions in them so far but, if someone 
wants to provide a PR to avoid this, we can certainly look at applying it.

--

___
Python tracker 

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



[issue44030] Markup with_traceback code example

2021-05-07 Thread Irit Katriel


Change by Irit Katriel :


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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-07 Thread Ned Deily


Ned Deily  added the comment:

> My reading of the previous message was, even if we raised exception
> or gave as a parameter, it wont be any better for certain downstream
> users, as we let the security problem open, and have it only as opt-in fix.

Senthil, I am not sure which previous message you are referring to but, with 
regards to my comment about revert the recent fixes for 3.7 and 3.6 until the 
reported problems are resolved, I should add that, given the recent input from 
downstream users about the side effects, the only way we *should* proceed with 
the current changes is by including more information in a What's New entry and 
the NEWS blurb about that the implications to users are of these changes.

--

___
Python tracker 

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



[issue43124] [security] smtplib multiple CRLF injection

2021-05-07 Thread Ned Deily


Ned Deily  added the comment:

Still in "deferred blocker" status awaiting a PR from someone

--

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

There is no less intrusive fix as far as I can see.  I believe we're down to 
either stick with what we've done, or do nothing.  It doesn't have to be the 
same choice in all release branches, being more conservative with changes the 
older the stable branch is okay.  (ie: removing this from 3.6 and 3.7 seems 
fine even if more recent ones do otherwise)

Based on my testing, raising an exception is more intrusive to existing tests 
(which we can only ever hope is representative of code) than stripping.  At 
least as exposed by running the changes through many tens of thousands of 
unittest suites at work.

ie: if we raise an exception, pandas.read_json() starts failing because that 
winds up using urlsplit in hopes of extracting the scheme and comparing that to 
known values as their method of deciding if something should be treated as a 
URL to data rather than data.  Pandas would need to be fixed.

That urlsplit() API use pattern is repeated in various other pieces of code: 
urlsplit is not expected to raise an exception.  The caller then has a 
conditional or two testing some parts of the urlsplit result to make a guess as 
to if something should be considered a URL or not.  Doing code inspection, 
pandas included, this code pretty much always then goes on to pass the original 
url value off to some other library, be it urllib, or requests, or ...).

Consequences of that code inspection finding?  With our existing character 
stripping change, new data is then allowed to pass through these urlsplit uses 
and be considered a URL.  Which leads to some code sending the url with 
embedded \r\n\t chars on to other APIs - a concern expressed a couple of times 
above.

Even though urlsplit isn't itself a validation API, it gets used as an early 
step in peoples custom identification and validation attempts.  So *any* change 
we make to it at all in any way breaks someones expectations, even if they 
probably shouldn't have had those expectations and aren't doing wise validation.

Treat this analysis as a sign that we should provide an explicit url validator 
because almost everyone is doing it some form of wrong. (issue43883)

I did wonder if Mike's suggestion of removing the characters during processing, 
but leaving them in the final result in 
https://bugs.python.org/issue43882#msg393033 is feasible as remediation for 
this?  My gut feeling is that it isn't.  It doesn't solve the problem of 
preventing the bad data from going where it shouldn't.  Even if we happen to 
parse that example differently, the unwanted characters are still retained in 
other places they don't belong.  Fundamantelly: We require people to make a 
different series of API call and choices in the end user code to **explicitly 
not use unvalidated inputs**.  Our stdlib API surface can't satisfy that today 
and use of unvalidated data in wrong places is a broad software security 
antipattern theme.

--

___
Python tracker 

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



[issue43124] [security] smtplib multiple CRLF injection

2021-05-07 Thread Miguel Brito


Miguel Brito  added the comment:

If there's no one working on it I'd be happy to prepare a fix.

--
nosy: +miguendes

___
Python tracker 

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



[issue43124] [security] smtplib multiple CRLF injection

2021-05-07 Thread Ned Deily


Ned Deily  added the comment:

There is no sign of anyone currently working on it, so please feel free to dig 
in!

--

___
Python tracker 

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



[issue40297] test_socket.CANTest is broken at HEAD on master

2021-05-07 Thread Ned Deily


Ned Deily  added the comment:


New changeset 1beae7e523d2db4e3ce383b2032095ef956f21c4 by Zachary Ware in 
branch '3.7':
[3.7] bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-25960)
https://github.com/python/cpython/commit/1beae7e523d2db4e3ce383b2032095ef956f21c4


--
nosy: +ned.deily

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-07 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

Ned wrote:

> Senthil, I am not sure which previous message you are referring to but.

I meant, the messages from other developers who raised that change broke 
certain test cases.

Ned, but I got little concerned, if we planned to revert the change. 

> the only way we *should* proceed with the current changes is by including 
> more information in a What's New entry and the NEWS blurb about that the 
> implications to users are of these changes.

I agree with completely. I will include an additional blurb for this change for 
security fix versions.


Greg wrote:

> There is no less intrusive fix as far as I can see.  I believe we're down to 
> either stick with what we've done, or do nothing.

Exactly my feeling too.

> It doesn't have to be the same choice in all release branches, being more 
> conservative with changes the older the stable branch is okay.  (ie: removing 
> this from 3.6 and 3.7 seems fine even if more recent ones do otherwise)

I hadn't considered that. But it wont save much will be my opinion. The users 
will have to upgrade to supported versions anyway and it will break then. The 
problem is only pushed a little. 

So, keeping it consistent seems alright to me. It is a little additional for 
everyone, but we seem to be doing it.

--

___
Python tracker 

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



[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread James Saryerwinnie


New submission from James Saryerwinnie :

There was a change in behavior in Python 3.8.10 when using relative paths in 
sys.path.  It appears that the paths are now converted to absolute paths that 
are cached and can cause import errors in some cases.

Repro:

$ cat repro.sh
#!/bin/bash
python --version
mkdir -p /tmp/repro/{A,B}/testproject
echo "msg = 'from A'" > /tmp/repro/A/testproject/app.py
echo "msg = 'from B'" > /tmp/repro/B/testproject/app.py
python -c "
import sys, os, shutil
os.chdir('/tmp/repro/A')
sys.path.append('testproject')
import app
print(app)
print(app.msg)

os.chdir('/tmp/repro/B')
shutil.rmtree('/tmp/repro/A')
del sys.modules['app']
import app
print(app)
print(app.msg)
"
rm -rf /tmp/repro




On Python 3.8.9 I get:

$ ./repro.sh
Python 3.8.9

from A

from B

On Python 3.8.10 I get:

$ ./repro.sh
Python 3.8.10

from A
Traceback (most recent call last):
  File "", line 12, in 
ModuleNotFoundError: No module named 'app'


I haven't confirmed this (I can't work out the frozen bootstrap stuff), but 
this might be caused by https://bugs.python.org/issue43105, whose patch does 
seem to be converting paths to absolute paths.

--
components: Library (Lib)
messages: 393212
nosy: James.Saryerwinnie
priority: normal
severity: normal
status: open
title: Regression with relative paths in sys.path in python 3.8.10
type: behavior
versions: Python 3.10, Python 3.11, 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



[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +steve.dower

___
Python tracker 

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



[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
keywords: +3.10regression, 3.8regression, 3.9regression
priority: normal -> high

___
Python tracker 

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



[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

without inspecting the code: I wonder if this is related to the same change as 
https://bugs.python.org/issue44061 ?

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue35663] webbrowser.py firefox bug [python3, windows 10]

2021-05-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Others are reporting this works.  if that is not true on the most recent python 
3.9 release, please reopen with more detailed reproduction instructions.

--
nosy: +gregory.p.smith
resolution:  -> works for me
stage:  -> needs patch
status: open -> closed

___
Python tracker 

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



[issue44058] 'master' refs in 3.10 version of .azure-pipelines

2021-05-07 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> pablogsal
nosy: +pablogsal

___
Python tracker 

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



[issue43992] Unable to get external dependencies for CPython on Ubuntu Linux 20.04.1

2021-05-07 Thread Éric Araujo

Éric Araujo  added the comment:

apt build-dep (or aptitude build-dep) is a command used to get build-time 
dependencies for the system package, which are not always the same as the 
upstream in-development version of Python.

As the error message told you, you need deb-src lines in your sources.list to 
have this work.  An example is here, it may not be up-to-date (refers to ubuntu 
bionic and python3.6) but hopefully you can adapt it: 
https://devguide.python.org/setup/#build-dependencies

I think more explanations should come from ubuntu documentation or forums, not 
Python docs; Python can’t document every facility from every OS.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue43992] Unable to get external dependencies for CPython on Ubuntu Linux 20.04.1

2021-05-07 Thread Éric Araujo

Éric Araujo  added the comment:

Some results from a quick web search:
- https://wiki.debian.org/BuildingTutorial
- 
https://unix.stackexchange.com/questions/158395/apt-get-build-dep-is-unable-to-find-a-source-package
- https://www.linuxfordevices.com/tutorials/debian/build-packages-from-source

--

___
Python tracker 

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



[issue44045] canonicalize "upper-case" -> "uppercase"; "lower-case" -> "lowercase"

2021-05-07 Thread Éric Araujo

Éric Araujo  added the comment:

I don’t think that there is a problem to be fixed.
Separated «lower case» could be unfriendly, but the hyphen is there in the 
adjective forms so it seems that changing these instances would add churn for 
no benefit.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

You need to create your type objects dynamically when using the Limited API. 
See PEP 384 for how to do so:
https://www.python.org/dev/peps/pep-0384/#type-objects

Quoting from the PEP:
"The structure of type objects is not available to applications; declaration of 
"static" type objects is not possible anymore (for applications using this 
ABI). Instead, type objects get created dynamically."

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



[issue44023] "tarfile" library will lead to "write any content to any file on the host".

2021-05-07 Thread Éric Araujo

Éric Araujo  added the comment:

Can you contact the security team (info at https://www.python.org/dev/security/ 
) directly?

In general, tarfile (and other Python file functions!) can create files 
anywhere on the filesystem, provided that the process user has the right 
permissions.  But it seems that you’re talking about an unexpected behaviour 
leading to unwanted operations, so please send more details about the problem 
to the team.  Thank you for your report!

--
nosy: +eric.araujo

___
Python tracker 

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



[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread Steve Dower


Steve Dower  added the comment:

It's almost certainly due to that change, though I'd be interested to see a 
more realistic repro.

For the repro shown, you really ought to be clearing the importer cache as well 
when you remove a search path (as implied by chdir with a relative path on 
sys.path) and delete from sys.modules. The new abspath is only applied to the 
full path to the module, so the cache is still for the module, and not for the 
sys.path entry.

What's the actual scenario that this broke?

--

___
Python tracker 

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



[issue44063] compiler: does not revert back the end_* locations

2021-05-07 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:


New changeset 13de28f17af02563cb8c6d0f6da3c178a4241ff3 by Miss Islington (bot) 
in branch '3.10':
bpo-44063: set the missing end locations on the compiler (GH-25956) (#25972)
https://github.com/python/cpython/commit/13de28f17af02563cb8c6d0f6da3c178a4241ff3


--

___
Python tracker 

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



[issue44063] compiler: does not revert back the end_* locations

2021-05-07 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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



[issue44071] Syntax error in Python3 documentation

2021-05-07 Thread Sergey Maslyakov


New submission from Sergey Maslyakov :

https://docs.python.org/3/library/subprocess.html#subprocess.check_output

The code sample seems to have a misplaced closing round bracket. It should go 
after "stdout"

```
run(..., check=True, stdout=PIPE).stdout
```

--
assignee: docs@python
components: Documentation
messages: 393222
nosy: docs@python, evolvah
priority: normal
severity: normal
status: open
title: Syntax error in Python3 documentation
versions: Python 3.6

___
Python tracker 

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



[issue44071] Syntax error in Python3 documentation

2021-05-07 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

I think the docs are correct. For example:

>>> import subprocess
>>> subprocess.run("ls", check=True, stdout=subprocess.PIPE).stdout

>>> subprocess.check_output("ls")


--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue44071] Syntax error in Python3 documentation

2021-05-07 Thread Sergey Maslyakov


Sergey Maslyakov  added the comment:

Thank you, Dennis! I was wrong. Closing the ticket.

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



[issue44058] 'master' refs in 3.10 version of .azure-pipelines

2021-05-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Should these references to "master" be changed to "main"?

We could, but won't change anything IIUC as the string that triggers the build 
on main is the one placed in the files on the "main" branch. The important 
thing in the 3.10 branch is that it has 3.10 there.

Being said that I may be missing something so maybe the best thing is to change 
that :)

--

___
Python tracker 

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



[issue44058] 'master' refs in 3.10 version of .azure-pipelines

2021-05-07 Thread Skip Montanaro


Skip Montanaro  added the comment:

Perhaps I should point out that this doesn't matter to me. I just noticed the 
old name. I can't claim anything is broken that I need.

--

___
Python tracker 

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



[issue44045] canonicalize "upper-case" -> "uppercase"; "lower-case" -> "lowercase"

2021-05-07 Thread Jürgen Gmach

Jürgen Gmach  added the comment:

I did some more research.

It looks like US English tends to use `lowercase`, while British English tends 
to `lower case`, and as an alternative to `lowercase` you can also use 
`lower-case` when using it as an adjective.

See also https://en.wiktionary.org/wiki/lowercase

So, to wrap up:

- you could use lowercase and uppercase as a noun, as an adjective and as a verb
- you can use lower case and upper case only as a noun
- you can use lower-case and upper-case only as an adjective

If that is true - I am no native English speaker, and Éric does not like to 
convert them all to single words, it gets a bit tougher.

Some - to me - obvious wrong usages would be:

"All IMAP4rev1 commands are supported by methods of the same name (in 
lower-case)."
=> in lower case or in lowercase

"All POP3 commands are represented by methods of the same name, in lower-case; 
most return the response text sent by the server."
=> in lower case or in lowercase

"Wrapper around a file that converts output to upper-case."
=> to upper case or to uppercase

"Return a new UUID, in the format that MSI typically requires (i.e. in curly 
braces, and with all hexdigits in upper-case)."
=> in upper case or in uppercase

"Hostnames are compared lower case."
=> lower-case or lowercase

Éric, are you ok with my suggested changes or do you want me to close the issue?

--

___
Python tracker 

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



[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread James Saryerwinnie


James Saryerwinnie  added the comment:

> What's the actual scenario that this broke?

I only noticed this because a project that I work on 
(https://github.com/aws/chalice/) started failing CI for seemingly unrelated 
changes.  A specific test run is here: 
https://github.com/jamesls/chalice/runs/2529906754.  This didn't actually break 
the framework itself, just the tests for the framework.  Chalice imports your 
application to figure out what resources to deploy to AWS, so the functional 
tests need to setup/teardown misc. applications and re-import them fresh for 
each test.

Turns out the GitHub action I was using switched their Python 3.8 from 3.8.9 to 
3.8.10 so I started looking into why this failed.  My takeaway from this is to 
stop using relative imports in sys.path (I don't recall us having a specific 
reason to do this other than it worked).  I figured I'd file an issue as I'm 
not actually sure if this consequence was intentional (I only saw bpo-43105 
mentioned in the changelog), and was surprised this behavior changed in a patch 
release.

--

___
Python tracker 

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



[issue44045] canonicalize "upper-case" -> "uppercase"; "lower-case" -> "lowercase"

2021-05-07 Thread Eric V. Smith


Eric V. Smith  added the comment:

That's exactly the kind of manual check I had in mind. After all "anal 
retentive doesn't have a hyphen unless it's used as a compound adjective".

I think we should go with "lowercase" when a noun, and "lower-case" as an 
adjective.

--

___
Python tracker 

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



[issue44070] Regression with relative paths in sys.path in python 3.8.10

2021-05-07 Thread Andy Fiddaman


Andy Fiddaman  added the comment:

I've just found this while investigating a regression with my project following 
update to 3.9.5. It took me some time to discover that the new test failures 
were due to __file__ now being fully qualified when it wasn't before.

As far as I can tell so far it is just breaking the tests, not the software 
(https://github.com/omniosorg/pkg5) but this doesn't feel like a change that 
should be made in a minor release.

--
nosy: +omnios

___
Python tracker 

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



[issue44026] IDLE: print "Did you mean?" for AttributeError and NameError

2021-05-07 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +24629
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25973

___
Python tracker 

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



[issue44070] __file__ is now fully qualified in 3.8 and 3.9

2021-05-07 Thread Steve Dower


Steve Dower  added the comment:

Yeah, you're probably right. That effect was not noticed when implementing it.

We should update the fix in 3.9 and 3.8 to limit it to .pyd's on Windows to 
protect against the security risks, but leave other import types loaded with 
relative paths.

I think it's fine to leave the resolution in 3.10, as it's closer to the 
intended behaviour.

I also don't think that fixing this justifies an extra maintenance release of 
3.8, which is now in security-fix only mode, but I'll leave that decision to 
the RM.

--
keywords:  -3.10regression
nosy: +lukasz.langa
title: Regression with relative paths in sys.path in python 3.8.10 -> __file__ 
is now fully qualified in 3.8 and 3.9
versions:  -Python 3.10, Python 3.11

___
Python tracker 

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



[issue42725] PEP 563: Should the behavior change for yield/yield from's

2021-05-07 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +24630
pull_request: https://github.com/python/cpython/pull/25974

___
Python tracker 

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



[issue44026] IDLE: print "Did you mean?" for AttributeError and NameError

2021-05-07 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +24631
pull_request: https://github.com/python/cpython/pull/25975

___
Python tracker 

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



[issue44026] IDLE: print "Did you mean?" for AttributeError and NameError

2021-05-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 5a5237c6d08ed97458b0903d6836624168df0b51 by Miss Islington (bot) 
in branch '3.10':
bpo-44026: Idle - display interpreter's 'did you mean' hints (GH-25912)
https://github.com/python/cpython/commit/5a5237c6d08ed97458b0903d6836624168df0b51


--

___
Python tracker 

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



[issue44026] IDLE: print "Did you mean?" for AttributeError and NameError

2021-05-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Merged to 3.11.0a0 first, bot forget to post it.

Dennis, thank you for the analysis and then the suggestion as to how to access 
the not directly accessible.  It would likely have been awhile before I 
stumbled from 'cannot' to 'can with workaround'.  Feel free to add ideas on 
other IDLE issues.

Thanks EP for making the fix work even with chained exceptions *and* for 
providing tests.  I redid half the lines, but core test logic was correct and 
remains.  In .0b1+ repository (and future .0b2 release) IDLE:

>>> try: abc
... except NameError: f"{complex.reel(1+1j)} errors occurred!"
... 
Traceback (most recent call last):
  File "", line 1, in 
try: abc
NameError: name 'abc' is not defined. Did you mean: 'abs'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 2, in 
except NameError: f"{complex.reel(1+1j)} errors occurred!"
AttributeError: type object 'complex' has no attribute 'reel'. Did you mean: 
'real'?

And thank you Pablo for making exception messages more helpful.

--
stage: patch review -> 

___
Python tracker 

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



[issue44026] IDLE: print "Did you mean?" for AttributeError and NameError

2021-05-07 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue44023] "tarfile" library will lead to "write any content to any file on the host".

2021-05-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

TL;DR - A tar file being extracted doesn't check to see if it is overwriting an 
existing file, which could be a symlink to elsewhere leading to elsewhere's 
contents being clobbered assuming the elsewhere file exists.

doing an unlink before opening the destination file (ignoring either success or 
FileNotFound) during extract would avoid this _specific_ case.

But tarfile is already documented with a warning about untrusted inputs being 
able to do bad things:

https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall

fixing this one serialized case doesn't do anything about other cases or race 
conditions we won't claim protection against, so I'm not sure this issue is 
serious from a stdlib perspective.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue16866] libainstall doesn't create $(BINDIR) directory

2021-05-07 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

Looks like the BINDIR dependency was added here - 
https://github.com/python/cpython/commit/49fd7fa4431da299196d74087df4a04f99f9c46f#diff-1f0a8db227d22005511b0d90f5339b97db345917b863954b3b3ccb9ec308767cR833
 but we didn't add the directory creation dependency then.

A simple fix of add BINDIR as dependency seems _OK_ to me. At least it wont 
break the libainstall standalone target.

--

___
Python tracker 

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



[issue16866] libainstall doesn't create $(BINDIR) directory

2021-05-07 Thread Senthil Kumaran


Change by Senthil Kumaran :


--
pull_requests: +24632
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25980

___
Python tracker 

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



[issue44022] urllib http client possible infinite loop on a 100 Continue response

2021-05-07 Thread guangli dong


guangli dong  added the comment:

i am intersting in "stdlib security", do you has any recommended info about 
this topic?

what i know is "https://python-security.readthedocs.io"; and "cve list".

--

___
Python tracker 

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



[issue37903] IDLE Shell sidebar.

2021-05-07 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Rather than request a specific solution, I'll state what new problems need to 
be solved.

For teaching purposes in live demos, it is essential to have a clear visual 
distinction between the inputs and outputs:

>>> beatles = ['john', 'paul', 'ringo', 'george']
>>> [name.capitalize() for name in beatles]
['John', 'Paul', 'Ringo', 'George']
>>> [name for name in beatles if 'n' in name]
['john', 'ringo']

This doesn't work nearly as well:

beatles = ['john', 'paul', 'ringo', 'george']
[name.capitalize() for name in beatles]
['John', 'Paul', 'Ringo', 'George']
[name for name in beatles if 'n' in name]
['john', 'ringo']

With the sidebar, the ps1 prompt helps a little, but gray separator bar 
visually runs the input and output text together and even causes consecutive 
inputs to visually be merged.  The strongest separator, the unindent, has been 
lost.

>>>|beatles = ['john', 'paul', 'ringo', 'george']
   |[name.capitalize() for name in beatles]
>>>|['John', 'Paul', 'Ringo', 'George']
   |[name for name in beatles if 'n' in name]
>>>|['john', 'ringo']

I believe that if you consult a trained graphic designer (i.e. one who can name 
the 7 elements of graphic design and describe how they are used), they will 
confirm that the new display is problematic.  To make data groups (inputs and 
outputs) visually distinct, we can change alignment, change vertical spacing, 
remove strong vertical lines, change color, etc.).  But if you align the text 
and run a vertical line separating it from the PS1 prompt, then the distinction 
is blurred.  At least this is what I was taught in graphic design courses.  

Almost the entire purpose of graphic design in an IDE is to help the eye either 
group together like pieces of information or to help the eye create 
distinctions between dissimilar things.  We give elements the same color if 
they are related and different colors if unrelated.  We bring like information 
together by placing it close together or by giving it the same alignment.  We 
push things apart and disconnect them by drawing a separator line (in the case 
at hand, the ps1 prompts are clipped-off in a separate window from the text 
they were intended to annotate).

If we have to keep the sidebar, some vertical separation would help (as it does 
in ipython):

>>>|beatles = ['john', 'paul', 'ringo', 'george']
   |[name.capitalize() for name in beatles]
   | 
>>>|['John', 'Paul', 'Ringo', 'George']
   |[name for name in beatles if 'n' in name]
   |
>>>|['john', 'ringo']
   |

This added spacing would help separate consecutive statements but would cost 
eating up valuable vertical space and would not help with visually 
distinguishing the input from the output.

You could take out the vertical line and get an improvement:

>>> beatles = ['john', 'paul', 'ringo', 'george']
[name.capitalize() for name in beatles]
   
>>> ['John', 'Paul', 'Ringo', 'George']
[name for name in beatles if 'n' in name]
   
>>> ['john', 'ringo']

This is better, but could be improved by unindenting to distinguish the inputs 
and outputs, which just about takes us back to where we started from (not just 
in IDLE, but what you see in books, presentations, and blog posts):
   
>>> beatles = ['john', 'paul', 'ringo', 'george']

>>> [name.capitalize() for name in beatles]
['John', 'Paul', 'Ringo', 'George']

>>> [name for name in beatles if 'n' in name]
['john', 'ringo']

Another desirable feature is the ability to cut and paste snippets into 
docstrings.  This is essential not just for doctest, but even for untested 
examples in docstrings.
Those examples, need to be recognizable to humans as interactive sessions with 
outputs clearly distinguished from inputs.  When I tried out the new sidebar in 
prep for a class, it was impossible to include the ps1 prompts in a cut and 
paste selection.  They had to be manually typed back in.  

Lastly, for live demos in presentations, it is desirable to have a clear 
screen, free of distracting artifacts.  The sidebar is such an artifact -- you 
would never see such a thing in a book or slide presentation.  Also, for live 
demos, large fonts are necessary which means that screen space is at a premium 
and the loss of horizontal space matters.

--

___
Python tracker 

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



[issue44028] Request for locals().update() to work, it is

2021-05-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

When quoting, please include the source, preferably a direct link.

In Python 1 and 2, there were two function local namespace *implementations* -- 
array index by number or dictionary indexed by name.  The implementation, and 
hence the lookup mode, was fixed at compile time.  In Python 3, the one 
*implementation*, and its lookup mode, are fixed.  The slower implementation 
was dropped because it was not thought worth the bother.  

When you invoke the save function while playing a game, I am imagine that the 
save function does not have access to and does not same the locals of whatever 
function was executing at the time you hit the save key.  Rather a game and 
player states are serialized, and likely not in one line of code.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue16866] libainstall doesn't create $(BINDIR) directory

2021-05-07 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +24633
pull_request: https://github.com/python/cpython/pull/25982

___
Python tracker 

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



[issue16866] libainstall doesn't create $(BINDIR) directory

2021-05-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24634
pull_request: https://github.com/python/cpython/pull/25981

___
Python tracker 

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



[issue16866] libainstall doesn't create $(BINDIR) directory

2021-05-07 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

Fixed in 3.11 here - 
https://github.com/python/cpython/commit/80d250d68cf3bb511fd862169c681b28028499c2

--

___
Python tracker 

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