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

2021-04-28 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks, this is great work!  Especially when living within the constraints of C 
and the existing code.

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



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

2021-04-28 Thread Ma Lin


Ma Lin  added the comment:

Thanks for reviewing this big patch.
Your review makes the code better.

--

___
Python tracker 

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



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

2021-04-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Is it ok to skip tests if it is too hard to write them.

Tests should be decorated with @cpython_only because other Python 
implementations can have working constructors for these types. It is an 
implementation detail that these types are implemented in C and instances are 
not properly initialized by default.

--

___
Python tracker 

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



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

2021-04-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Thanks, Serhiy.

--

___
Python tracker 

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



[issue43776] Popen with shell=True yield mangled repr output

2021-04-28 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
keywords: +3.9regression

___
Python tracker 

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



[issue43776] Popen with shell=True yield mangled repr output

2021-04-28 Thread miss-islington


miss-islington  added the comment:


New changeset db0c5b786df961785ae8c803f5572ae0c8dadcc7 by M. Kocher in branch 
'master':
bpo-43776: Remove list call from args in Popen repr (GH-25338)
https://github.com/python/cpython/commit/db0c5b786df961785ae8c803f5572ae0c8dadcc7


--
nosy: +miss-islington

___
Python tracker 

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



[issue43954] Possible missing word on unittest doc

2021-04-28 Thread Inada Naoki


Inada Naoki  added the comment:

I propose to remove the namespace package support entirely.

* No user (since it has been broken from Python 3.7)
* Hard to maintain (we haven't noted it)
* Hard to explain (need to specify the top directory. don't search recursively. 
See bpo-23882)

--

___
Python tracker 

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



[issue43964] ctypes CDLL search path issue on MacOS

2021-04-28 Thread Victor Lazzarini


New submission from Victor Lazzarini :

With Python 3.9.4 ctypes.CDLL does not appear to find framework libraries 
installed in /Library/Frameworks.

--- With Python 3.6.5:

victor@MacBook-Pro ~ % python3 
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 03:03:55) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> ctypes.CDLL('CUDA.framework/CUDA')

>>> 

--- With Python 3.9.4

victor@MacBook-Pro ~ % python3.9
Python 3.9.4 (v3.9.4:1f2e3088f3, Apr  4 2021, 12:32:44) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> ctypes.CDLL('CUDA.framework/CUDA')
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py",
 line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(CUDA.framework/CUDA, 6): image not found
>>> 

This happens with all frameworks I have installed in /Library/Frameworks.
The full path seems to work OK:

>>> ctypes.CDLL('/Library/Frameworks/CUDA.framework/CUDA')

>>> 

but that's suboptimal as in MacOS you might have frameworks installed elsewhere.

--
components: macOS
messages: 392173
nosy: Victor.Lazzarini, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: ctypes CDLL search path issue on MacOS
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



[issue43965] dataclasses.replace breaks when __init__ is overrriden in subclass

2021-04-28 Thread Sebastian Speitel


New submission from Sebastian Speitel :

from dataclasses import dataclass, replace

@dataclass()
class A:
a: int

class B(A):
def __init__(self):
super().__init__(a=1)

obj1 = B()
obj2 = replace(obj1, a=2)

  File "/usr/lib/python3.9/dataclasses.py", line 1284, in replace
return obj.__class__(**changes)
TypeError: __init__() got an unexpected keyword argument 'a'


When a class extends a dataclass and overrides `__init__`, `replace` still 
accepts it as a dataclass according to the PEP but fails at constructing, since 
the `__init__`-signature doesn't match anymore.

--
components: Library (Lib)
messages: 392174
nosy: SebastianSpeitel
priority: normal
severity: normal
status: open
title: dataclasses.replace breaks when __init__ is overrriden in subclass
type: behavior
versions: 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



[issue43965] dataclasses.replace breaks when __init__ is overrriden in subclass

2021-04-28 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm open to suggestions on how this could be fixed, but I don't see how it's 
possible. I guess the best thing to do would be to fail if __init__() isn't the 
one that was generated by @dataclass. But that might be too pessimistic: the 
user could have provided a __init__() that does work with replace(), and such a 
change would start breaking that code.

--
assignee:  -> eric.smith
nosy: +eric.smith
versions: +Python 3.10 -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



[issue43965] dataclasses.replace breaks when __init__ is overrriden in subclass

2021-04-28 Thread Sebastian Speitel


Sebastian Speitel  added the comment:

One solution I thought of was to return not an object of the same instance, but 
one of the same dataclass, which would allow the implementation to traverse the 
class hierachy of the object and create an instance of the first 
dataclass-class (or class with same __init__ signature) it finds with the 
changes applied.

This would at least allow using replace instead of it just failing in more 
cases.

But according to the PEP
> Creates a new object of the same type of [the] instance
the returned object has to have the same type.

--

___
Python tracker 

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



[issue42238] Deprecate suspicious.py?

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

At least, I would suggest to remove it from the release process.

If some people working on the documentation want to keep the tool, maybe it can 
be an optional CI job? IMO the problem is that currently, it's part of a single 
"Documentation" job. I don't recall if it's mandatory or not. Also, we need 
maybe more explanation in the CI job result how to mark false positives.

--

___
Python tracker 

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



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Inada-san for documenting the change in codecs.register() doc!

--

___
Python tracker 

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



[issue37892] IDLE Shell: isolate user code input

2021-04-28 Thread E. Paine


E. Paine  added the comment:

Personally, I find the change quite weird and will take some getting used to. I 
hope people read the help at the top of the shell, but if not I can imagine 
numerous bug reports about the change. I have not used any shell that has the 
prompt above where you type, so while I think this should be an option for the 
user, I propose the sidebar is the default for familiarity (instead of the 
other way around).

--
nosy: +epaine
versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8

___
Python tracker 

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



[issue43965] dataclasses.replace breaks when __init__ is overrriden in subclass

2021-04-28 Thread Sebastian Speitel


Sebastian Speitel  added the comment:

Or maybe a cls argument which defaults to obj.__class__?

--

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 21b02b5f4018474620676be04310f7d230a464ea by Irit Katriel in 
branch 'master':
bpo-43960: test_pdb resets breakpoints (GH-25673)
https://github.com/python/cpython/commit/21b02b5f4018474620676be04310f7d230a464ea


--

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24372
pull_request: https://github.com/python/cpython/pull/25682

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Shreyan Avigyan: please try an up to date version of the master branch, I fixed 
the Pdb issue with commit a09766deab5aff549f40f27080895e148af922ed.

--

___
Python tracker 

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



[issue43962] test_interpreters: when TestInterpreterAttrs.test_id_type() is run alone, it fails with an assertion error

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Creating an _interpreters.InterpreterID object calls newinterpid() which calls 
_PyInterpreterState_IDIncref(interp).

_PyInterpreterState_IDIncref(interp) does nothing if interp->id_mutex is NULL.

Calling _interpreters.get_current() calls interp_get_current() which calls 
_PyInterpreterState_IDInitref().

_PyInterpreterState_IDInitref() creates the id_mutex and initializes 
id_refcount to 0.

Later, when the _interpreters.InterpreterID object is deallocated, 
interpid_dealloc() calls _PyInterpreterState_IDDecref(). Since id_mutex was 
created in the meanwhile, _PyInterpreterState_IDDecref() now decrements 
id_refcnt.

... It doesn't work: _PyInterpreterState_IDIncref() should always increase the 
reference count.

--

___
Python tracker 

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



[issue43962] test_interpreters: when TestInterpreterAttrs.test_id_type() is run alone, it fails with an assertion error

2021-04-28 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue37892] IDLE Shell: isolate user code input

2021-04-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I had a similar reaction, "weird", when I tried the isolated prompt a year or 
whatever ago.  I don't remember if I also changed the indent for that.  But 
when testing this patch, with space indents, a longer time, most of the weird 
feeling dissipated and I realized that I might possibly prefer this, at least 
sometimes.

Another reason I proposed the isolated prompt as the *current* default is that 
some (many?) people like to save the shell as a record of their session.  With 
prompts in the sidebar, saving the shell *currently* results in a text record 
with no prompts. (And, of course, no highlighting.)  I can read it, but I 
expect that most people would prefer isolated prompts to no prompts

I discussed the need for shell saving options both above and in msg392163, 
posted to #37904 a few hours ago.  I do not currently expect anything before 
next Monday.  If a followup PR, zipping the sidebar with text when saving, were 
prepared before then, I would be more favorable to making sidebar the current 
default.

I plan to ask for more opinions on idle-dev and python-list later today.

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



[issue43961] [Windows] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-28 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue43961] [Windows] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote PR 25684 to fix this issue.

> What does os.rename do on Linux? Does it just overwrite existing files by 
> default?

os.rename() calls rename():
https://man7.org/linux/man-pages/man2/rename.2.html

   rename() renames a file, moving it between directories if
   required.  Any other hard links to the file (as created using
   link(2)) are unaffected.  Open file descriptors for oldpath are
   also unaffected.

   If newpath already exists, it will be atomically replaced, so
   that there is no point at which another process attempting to
   access newpath will find it missing.  However, there will
   probably be a window in which both oldpath and newpath refer to
   the file being renamed.

On Windows, os.rename() is implemented with MoveFileExW(src, dst, 0).

Maybe the test should use os.replace() instead of os.rename()? On Windows, 
os.replace() is implemented with with MoveFileExW(src, dst, 
MOVEFILE_REPLACE_EXISTING).

HandlerWithNamerAndRotator.rotator() of test_logging calls os.rename() when the 
file already exists:

if os.path.exists(source):
os.rename(source, dest + ".rotated")

And the test fails with "Cannot create a file when that file already exists"... 
well yes, we just tested that it exists.

--

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Irit: the automated backported failed, test_pdb fails with:

   NameError: name 'reset_Breakpoint' is not defined

Do you want to try to backport manually the change to Python 3.9 (and then I 
can automate the backport to 3.8).

test_pdb on Python 3.8 and 3.9 are also affected by this issue.

--

___
Python tracker 

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



[issue43962] test_interpreters: when TestInterpreterAttrs.test_id_type() is run alone, it fails with an assertion error

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 32c5a174445ec93747240cd8472012276ed27acf by Victor Stinner in 
branch 'master':
bpo-43962: Fix _PyInterpreterState_IDIncref() (GH-25683)
https://github.com/python/cpython/commit/32c5a174445ec93747240cd8472012276ed27acf


--

___
Python tracker 

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



[issue43962] test_interpreters: when TestInterpreterAttrs.test_id_type() is run alone, it fails with an assertion error

2021-04-28 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +24375
pull_request: https://github.com/python/cpython/pull/25685

___
Python tracker 

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



[issue43962] test_interpreters: when TestInterpreterAttrs.test_id_type() is run alone, it fails with an assertion error

2021-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +24376
pull_request: https://github.com/python/cpython/pull/25686

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread Irit Katriel


Irit Katriel  added the comment:

We didn't backport PR21989 because it was changing the way breakpoints hare 
maintained, so reset_Breakpoint is not there before 3.10. I can add that to the 
test file manually.

--

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Same errors. 

(Recompilation was done 1 or 2 hours ago against the then updated master 
branch. It may not include the latest commit)

--

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

FYI test_signal is no longer modifying sys.gettrace thanks to your fix. But 
test_threading still does. Do you have a fix for that?

--

___
Python tracker 

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



[issue20692] Tutorial and FAQ: how to call a method on an int

2021-04-28 Thread Amir


Amir  added the comment:

Hi everyone!

I'm going to work on it. I have a plan to submit my pull request in the 
upcoming weeks. 

Thanks.

--
components:  -Interpreter Core
nosy: +Amir.Rastkhadiv20
versions: +Python 3.9 -Python 3.10

___
Python tracker 

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



[issue43966] F String bugs with numpy.float32

2021-04-28 Thread GPH


New submission from GPH :

When using F String with numpy.float32 variable, the output is wrong!

Example code:

```python
import numpy as np

floatNumber = 0.00123
print(f"num:{floatNumber}")

npFloatNumber = np.float32(0.00123)
print(f"num:{npFloatNumber}")
```

The output is:

```
num:0.00123
num:0.00123052601099
```

As we can see, the value of np.float32 is wrong!

--
messages: 392192
nosy: PingHGao
priority: normal
severity: normal
status: open
title: F String bugs with numpy.float32
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue43966] F String bugs with numpy.float32

2021-04-28 Thread Mark Dickinson


Mark Dickinson  added the comment:

See https://github.com/numpy/numpy/issues/10645. I'll close here (this tracker 
is for core Python, and NumPy isn't part of core Python).

--
nosy: +mark.dickinson
resolution:  -> third party
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



[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-28 Thread Stefan Behnel


Change by Stefan Behnel :


--
nosy: +scoder
nosy_count: 3.0 -> 4.0
pull_requests: +24377
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25687

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

I ran the test again and test_signal still modifies sys.gettrace()

--

___
Python tracker 

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



[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-28 Thread Stefan Behnel


Stefan Behnel  added the comment:

I just remembered that it's usually helpful to return the previous state, so 
that callers know whether they need to re-enable or disable the GC when they're 
done. I'll add that.

Also, returning an "int" may allow us to add a "-1" error code at some point, 
if it turns out to become necessary.

--

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

All the test failures are side effects of other tests because when they are ran 
individually they do not trigger errors. Running sequentially causes the error.

--

___
Python tracker 

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



[issue43961] [Windows] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-28 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue43962] test_interpreters: when TestInterpreterAttrs.test_id_type() is run alone, it fails with an assertion error

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 77db337f1e69213e62ba79a797540cc4ac23492e by Victor Stinner in 
branch '3.8':
bpo-43962: Fix _PyInterpreterState_IDIncref() (GH-25683) (GH-25686)
https://github.com/python/cpython/commit/77db337f1e69213e62ba79a797540cc4ac23492e


--

___
Python tracker 

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



[issue43961] [Windows] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset fe52eb62191e640e720d184a9a1a04e965b8a062 by Victor Stinner in 
branch 'master':
bpo-43961: Fix test_logging.test_namer_rotator_inheritance() (GH-25684)
https://github.com/python/cpython/commit/fe52eb62191e640e720d184a9a1a04e965b8a062


--

___
Python tracker 

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



[issue43967] Valgrind memcheck on Py_Initialize

2021-04-28 Thread Simon Aldrich


New submission from Simon Aldrich :

Running a Valgrind memcheck of Py_Initialize still produces issues even when 
using the suggested suppressions file. Am I doing something wrong or is this 
expected?

I've attached a simple reproducer which can be run as follows:

1. Extract tarball
2. cmake
3. make memcheck (runs valgrind with suppressions)

Gives output similar to:

[100%] Built target valgrind-libpython
==2901== Memcheck, a memory error detector
==2901== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2901== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==2901== Command: ./valgrind-libpython
==2901== 
==2901== Conditional jump or move depends on uninitialised value(s)
==2901==at 0x5729DB7: __wcsnlen_avx2 (strlen-avx2.S:264)
==2901==by 0x5657CA1: wcsrtombs (wcsrtombs.c:104)
==2901==by 0x55DDC40: wcstombs (wcstombs.c:34)
==2901==by 0x4FB7EB9: _Py_EncodeLocaleRaw (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FB99F7: ??? (in /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FBB8B2: _PyPathConfig_Calculate (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FDAC8D: _PyConfig_InitPathConfig (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FE4F6E: PyConfig_Read (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FE687A: ??? (in /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FE79A1: Py_InitializeFromConfig (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FE7A5B: Py_InitializeEx (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x108758: main (in 
/home/simon/temp/valgrind-libpython/build/valgrind-libpython)
==2901== 
==2901== Conditional jump or move depends on uninitialised value(s)
==2901==at 0x55C14E8: internal_utf8_loop (loop.c:298)
==2901==by 0x55C14E8: __gconv_transform_internal_utf8 (skeleton.c:609)
==2901==by 0x5657CD4: wcsrtombs (wcsrtombs.c:110)
==2901==by 0x55DDC40: wcstombs (wcstombs.c:34)
==2901==by 0x4FB7EB9: _Py_EncodeLocaleRaw (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FB99F7: ??? (in /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FBB8B2: _PyPathConfig_Calculate (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FDAC8D: _PyConfig_InitPathConfig (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FE4F6E: PyConfig_Read (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FE687A: ??? (in /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FE79A1: Py_InitializeFromConfig (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x4FE7A5B: Py_InitializeEx (in 
/usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==2901==by 0x108758: main (in 
/home/simon/temp/valgrind-libpython/build/valgrind-libpython)...

--
components: C API, Library (Lib)
files: valgrind-libpython.tar.gz
messages: 392199
nosy: simonaldrich
priority: normal
severity: normal
status: open
title: Valgrind memcheck on Py_Initialize
type: security
versions: Python 3.8
Added file: https://bugs.python.org/file49996/valgrind-libpython.tar.gz

___
Python tracker 

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



[issue43959] Improve documentation of PyContextVar C-API

2021-04-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24379
pull_request: https://github.com/python/cpython/pull/25689

___
Python tracker 

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



[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

I suggest applying the following safe options for the installers: 

# SQLITE_DEFAULT_MEMSTATUS
Memory status is currently not available in the sqlite3 API, so there's no need 
for SQLite to keep track of this. If we add such an API (not likely, IMO), we 
can just remove this compile time option. See also bpo-35056.

# SQLITE_OMIT_DEPRECATED
No deprecated API functions are used by the sqlite3 module.

# SQLITE_OMIT_AUTOINIT
The sqlite3 module explicitly initialises SQLite; we can safely apply this 
option.


I'll update the PR's.

Berker, do you have any opinion about this?

--

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

> We didn't backport PR21989 because it was changing the way breakpoints hare 
> maintained, so reset_Breakpoint is not there before 3.10. I can add that to 
> the test file manually.

Ah yes, it sounds reasonable to me to add reset_Breakpoint() to test_pdb with 
the bdb clearBreakpoints() code from master.

--

___
Python tracker 

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



[issue43959] Improve documentation of PyContextVar C-API

2021-04-28 Thread miss-islington


miss-islington  added the comment:


New changeset 4c49be766897968e509c41397e0e624c25b1675d by scoder in branch 
'master':
bpo-43959: clarify the documentation of the PyContextVar C-API (GH-25671)
https://github.com/python/cpython/commit/4c49be766897968e509c41397e0e624c25b1675d


--
nosy: +miss-islington

___
Python tracker 

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



[issue43959] Improve documentation of PyContextVar C-API

2021-04-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24380
pull_request: https://github.com/python/cpython/pull/25690

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +24381
pull_request: https://github.com/python/cpython/pull/25691

___
Python tracker 

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



[issue11975] Fix referencing of built-in types (list, int, ...)

2021-04-28 Thread Kieran Siek

Kieran Siek  added the comment:

7 years later I'd like to bring up essentially point #2 in this issue, which is 
the fact that additional list methods are :noindex: resulting in it being 
unlinked in the documentation.


Current state of affairs:

1. Common Sequence methods are documented at 
https://docs.python.org/3/library/stdtypes.html#common-sequence-operations, 
MutableSequence methods at 
https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types.

2. Tuple methods do not have method directives and are just referred to the 
common sequence methods in the documentation text itself.

3. List methods have method directives with :noindex: at 
https://docs.python.org/3/tutorial/datastructures.html#more-on-lists

4. list.sort() has duplicate documentation at 
https://docs.python.org/3/library/stdtypes.html#list.sort, and the entry for 
list.sort() under 3) does not even link to the duplicate

It is pretty inconsistent and frankly confusing.

> I would be fine with adding mostly empty method directives to make links 
> work, without duplicating the info in the existing “common sequence 
> operations” table and footnotes.

Eric mentions this, but then the situation would either be:

1. Tuple methods link to common sequence methods, list methods link to the More 
on Lists version of the Data Structures tutorial

or

2. Tuple methods and list methods both link to common sequence methods, and ??? 
to the More on Lists version

which is still inconsistent.

Another solution would be to move list method documentation to under the list 
class (where the duplicate list.sort() is), but in this case the tutorial would 
be affected as well.

I don't see a clear solution here, but I think it's very worth rethinking.

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



[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

As noted in 
https://github.com/python/cpython/pull/25414#issuecomment-828501078, 
SQLITE_OMIT_DEPRECATED also leaves out PRAGMA's, which can break applications. 
I'll update the PR's to leave it out.

--

___
Python tracker 

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



[issue43725] Create a release branch ABI stability regression test

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

I cannot merge my PR 25685 because the mandatory ABI CI job fails:
---
abidiff "libpython3.9.so" ./Doc/data/python3.9.abi --drop-private-types 
--no-architecture --no-added-syms
Functions changes summary: 0 Removed, 1 Changed, 0 Added function
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

1 function with some indirect sub-type change:

  [C]'function int _PyInterpreterState_IDIncref(PyInterpreterState*)' at 
pystate.c:497:1 has some indirect sub-type changes:
return type changed:
  type name changed from 'int' to 'void'
  type size changed from 32 to 0 (in bits)
---

It is correct that my PR changes an internal C API on purpose.


Pablo suggests me to regenerate the ABI file but I don't know how to do that.


In Python 3.9, the GitHub Action uses:
---
  check_abi:
name: 'Check if the ABI has changed'
runs-on: ubuntu-20.04
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
steps:
  - uses: actions/checkout@v2
  - uses: actions/setup-python@v2
  - name: Install Dependencies
run: |
sudo ./.github/workflows/posix-deps-apt.sh
sudo apt-get install -yq abigail-tools
  - name: Build CPython
env:
  CFLAGS: -g3 -O0
run: |
  # Build Python with the libpython dynamic library
  ./configure --enable-shared
  make -j4
  - name: Check for changes in the ABI
run: make check-abidump
---

I'm using Fedora 33 with "gcc (GCC) 11.0.1 20210324 (Red Hat 11.0.1-0)".

On Fedora, I used:
---
$ sudo dnf install -y libabigail
$ ./configure --enable-shared CFLAGS="-g3 -O0" && make -j10
$ make regen-abidump
$ git diff --stat
 Doc/data/python3.9.abi | 28478 
+---
 1 file changed, 18306 insertions(+), 10172 deletions(-)
---

There are tons of changes!

Also, "make check-abidump" lists many changes:
---
abidiff "libpython3.9.so" ./Doc/data/python3.9.abi --drop-private-types 
--no-architecture --no-added-syms
Functions changes summary: 0 Removed, 13 Changed (171 filtered out), 0 Added 
functions
Variables changes summary: 0 Removed, 6 Changed (2 filtered out), 0 Added 
variables

13 functions with some indirect sub-type change:
(...)
  [C] 'function PyStatus _PyInterpreterState_Enable(_PyRuntimeState*)' at 
pystate.c:171:1 has some indirect sub-type changes:

  [C] 'function int _Py_DecodeLocaleEx(const char*, wchar_t**, size_t*, const 
char**, int, _Py_error_handler)' at fileutils.c:574:1 has some indirect 
sub-type changes:
parameter 6 of type 'typedef _Py_error_handler' has sub-type changes:

  [C] 'const unsigned char _Py_ctype_tolower[256]' was changed to 'const 
unsigned char[256] const _Py_ctype_tolower' at pyctype.h:26:1:
type of variable changed:
  entity changed from 'const unsigned char[256]' to 'const unsigned 
char[256] const'
(...)
---

--

___
Python tracker 

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



[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-28 Thread Berker Peksag


Berker Peksag  added the comment:

As long as we don't introduce behavior changes between SQLite versions in 
mainstream Linux distributions and macOS/Windows (i.e. an application should 
continue working in Linux, macOS, Windows), it sounds good to me.

Maybe it's worth checking what compile options Debian (and others) are using 
when packaging SQLite.

--

___
Python tracker 

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



[issue43725] Create a release branch ABI stability regression test

2021-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

As I mentioned here:

https://bugs.python.org/msg390213

the dump needs to be generated in a docker container using the same compiler 
version that is used in the CI

--

___
Python tracker 

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



[issue43725] Create a release branch ABI stability regression test

2021-04-28 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

You are using Fedora, which is not the same docker container and likely the 
same compiler version that is used to check the dump

--

___
Python tracker 

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



[issue43659] AIX: test_curses crashes buildbot

2021-04-28 Thread Michael Felt

Michael Felt  added the comment:

Dome some 'dumb' testing - and I hope this helps understand why it is failing:

With the the last two func() calls commented out, the function passes:

def test_output_string(self):
stdscr = self.stdscr
encoding = stdscr.encoding
# addstr()/insstr()
for func in [stdscr.addstr, stdscr.insstr]:
with self.subTest(func.__qualname__):
stdscr.move(0, 0)
func('abcd')
func(b'abcd')
s = 'à▒^▒ç▒^▒'
try:
func(s)
except UnicodeEncodeError:
self.assertRaises(UnicodeEncodeError, s.encode, encoding)
func('abcd', curses.A_BOLD)
# func(1, 2, 'abcd')
# func(2, 3, 'abcd', curses.A_BOLD)

--

___
Python tracker 

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



[issue43959] Improve documentation of PyContextVar C-API

2021-04-28 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset fdb11897d7c8f9e6bdf96fcef802f784ef90f726 by Miss Islington (bot) 
in branch '3.9':
bpo-43959: clarify the documentation of the PyContextVar C-API (GH-25671) 
(GH-25689)
https://github.com/python/cpython/commit/fdb11897d7c8f9e6bdf96fcef802f784ef90f726


--

___
Python tracker 

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



[issue43959] Improve documentation of PyContextVar C-API

2021-04-28 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset ff7266efd0ef6b42dad30c9c0d210f843cc44f39 by Miss Islington (bot) 
in branch '3.8':
bpo-43959: clarify the documentation of the PyContextVar C-API (GH-25671) 
(GH-25690)
https://github.com/python/cpython/commit/ff7266efd0ef6b42dad30c9c0d210f843cc44f39


--

___
Python tracker 

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



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Right now, running "make regen-limited-abi" adds again functions which were 
removed from Doc/data/stable_abi.dat:
https://github.com/python/cpython/pull/25687#issuecomment-828520575

diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat
index cdc7160250..6fe61743d6 100644
--- a/Doc/data/stable_abi.dat
+++ b/Doc/data/stable_abi.dat
@@ -351,11 +351,17 @@ PyMapping_Length
 PyMapping_SetItemString
 PyMapping_Size
 PyMapping_Values
+PyMarshal_ReadObjectFromString
+PyMarshal_WriteLongToFile
+PyMarshal_WriteObjectToFile
+PyMarshal_WriteObjectToString
 PyMem_Calloc
 PyMem_Free
 PyMem_Malloc
 PyMem_Realloc
 PyMemberDescr_Type
+PyMember_GetOne
+PyMember_SetOne
 PyMemoryView_FromMemory
 PyMemoryView_FromObject
 PyMemoryView_GetContiguous


I guess that you should not be added until this issue is solved.

--

___
Python tracker 

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



[issue43954] Possible missing word on unittest doc

2021-04-28 Thread Julien Palard


Julien Palard  added the comment:

> I propose to remove the namespace package support entirely.

I'm no unittest expert, but I have nothing against removing it.

I totally agree to at least remove it from the doc while it does not work.

--

___
Python tracker 

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



[issue43959] Improve documentation of PyContextVar C-API

2021-04-28 Thread Stefan Behnel


Change by Stefan Behnel :


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



[issue11975] Fix referencing of built-in types (list, int, ...)

2021-04-28 Thread Éric Araujo

Éric Araujo  added the comment:

I don’t think consistency should be the main goal, but usefulness.

--
versions:  -Python 2.7, Python 3.11, 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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

I ran "python -m test" on an up to date master branch (commit 
fe52eb62191e640e720d184a9a1a04e965b8a062), there is a single remaining issue. 
test_distutils failed because the deprecation warning was already emited: issue 
fixed by PR 25675. The other issues are gone.

Shreyan Avigyan: "Same errors."

IMO it's a mistake on your side. You ran an outdated version or you didn't 
rebuild Python cleanly.

"FYI test_signal is no longer modifying sys.gettrace thanks to your fix. But 
test_threading still does. (...) I ran the test again and test_signal still 
modifies sys.gettrace()"

It's not my case on my machine, again it sounds like an issue on your side.

--

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

> Another issue with the tests is that it has become terribly slow. It's taking 
> about 45 minutes to complete 1 run of the test suite. A few days ago, it took 
> only 10 - 15 minutes.

It took 49 minutes on my Windows 10 VM. Are you sure that you ran the test 
suite sequentially when it was slower?

I advice you run using -j0 option to run tests in parallel: it's much faster, 
and it's also more reliable.

== Tests result: FAILURE ==

384 tests OK.

1 test failed:
test_distutils

41 tests skipped:
test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_epoll
test_fcntl test_fork1 test_gdb test_grp test_ioctl test_kqueue
test_multiprocessing_fork test_multiprocessing_forkserver test_nis
test_openpty test_ossaudiodev test_pipes test_poll test_posix
test_pty test_pwd test_readline test_resource test_smtpnet
test_socketserver test_spwd test_syslog test_threadsignals
test_timeout test_tix test_tk test_ttk_guionly test_urllib2net
test_urllibnet test_wait3 test_wait4 test_winsound test_xmlrpc_net
test_xxlimited test_xxtestfuzz test_zipfile64

Total duration: 49 min 12 sec
Tests result: FAILURE

--

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2dc6b1789ec86dc80ea290fe33edd61140e47f6f by Irit Katriel in 
branch '3.9':
bpo-43960: test_pdb resets breakpoints to make tests deterministic (GH-25691)
https://github.com/python/cpython/commit/2dc6b1789ec86dc80ea290fe33edd61140e47f6f


--

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24382
pull_request: https://github.com/python/cpython/pull/25692

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread Steve Dower


Steve Dower  added the comment:


New changeset c1a9535989cc7323099725503519a17f79d083f5 by Steve Dower in branch 
'master':
bpo-43955: Handle the case where the distutils warning has already been 
triggered (GH-25675)
https://github.com/python/cpython/commit/c1a9535989cc7323099725503519a17f79d083f5


--

___
Python tracker 

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



[issue43955] Windows: Running the Python test suite sequentially is interrupted by (Pdb) prompt

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks everyone for fixing these issues and thanks Shreyan for the bug report.

The main initial is now fixed, so I close the issue.

Let's continue the discussions in remaining open issues:

* bpo-37387: test_compileall fails randomly on Windows when tests are run in 
parallel
* bpo-43960: test_pdb fails when only some tests are run
* bpo-43961 [Windows] test_logging.test_namer_rotator_inheritance() logs a 
logging error

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +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



[issue43961] [Windows] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 629ef0fb9cad6ac340d3be884af7b47fb393ae99 by Miss Islington (bot) 
in branch '3.9':
bpo-43961: Fix test_logging.test_namer_rotator_inheritance() (GH-25684) 
(GH-25688)
https://github.com/python/cpython/commit/629ef0fb9cad6ac340d3be884af7b47fb393ae99


--

___
Python tracker 

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



[issue43961] [Windows] test_logging.test_namer_rotator_inheritance() logs a logging error

2021-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue11975] Fix referencing of built-in types (list, int, ...)

2021-04-28 Thread Kieran Siek


Kieran Siek  added the comment:

I don't disagree, just having linkable directives for lists and tuples would 
already make the documentation a lot more useful.

--

___
Python tracker 

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



[issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py

2021-04-28 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 859577c24981d6b36960d309f99f7fc810fe75c2 by Ken Jin in branch 
'master':
bpo-41559: Change PEP 612 implementation to pure Python (#25449)
https://github.com/python/cpython/commit/859577c24981d6b36960d309f99f7fc810fe75c2


--

___
Python tracker 

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



[issue11975] Fix referencing of built-in types (list, int, ...)

2021-04-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I don't see a clear solution here, but I think 
> it's very worth rethinking.

If you come up with a clear improvement for adding link targets, please open it 
in a separate tracker issue.  The other proposals in this thread have all been 
mostly voted down.

--
nosy: +rhettinger
resolution:  -> rejected
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



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-28 Thread Petr Viktorin


Petr Viktorin  added the comment:

I hope the PR fixes that. I plan to merge tomorrow if there ar no objections to 
it.

On April 28, 2021 5:15:19 PM GMT+02:00, STINNER Victor  
wrote:
>
>STINNER Victor  added the comment:
>
>Right now, running "make regen-limited-abi" adds again functions which
>were removed from Doc/data/stable_abi.dat:
>https://github.com/python/cpython/pull/25687#issuecomment-828520575
>
>diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat
>index cdc7160250..6fe61743d6 100644
>--- a/Doc/data/stable_abi.dat
>+++ b/Doc/data/stable_abi.dat
>@@ -351,11 +351,17 @@ PyMapping_Length
> PyMapping_SetItemString
> PyMapping_Size
> PyMapping_Values
>+PyMarshal_ReadObjectFromString
>+PyMarshal_WriteLongToFile
>+PyMarshal_WriteObjectToFile
>+PyMarshal_WriteObjectToString
> PyMem_Calloc
> PyMem_Free
> PyMem_Malloc
> PyMem_Realloc
> PyMemberDescr_Type
>+PyMember_GetOne
>+PyMember_SetOne
> PyMemoryView_FromMemory
> PyMemoryView_FromObject
> PyMemoryView_GetContiguous
>
>
>I guess that you should not be added until this issue is solved.
>
>--
>
>___
>Python tracker 
>
>___

--

___
Python tracker 

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



[issue43954] Possible missing word on unittest doc

2021-04-28 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +larry

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b52cc7c5f1a6c5b48d51cd718719a766c37d6e38 by Miss Islington (bot) 
in branch '3.8':
bpo-43960: test_pdb resets breakpoints to make tests deterministic (GH-25691) 
(GH-25692)
https://github.com/python/cpython/commit/b52cc7c5f1a6c5b48d51cd718719a766c37d6e38


--

___
Python tracker 

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



[issue43960] test_pdb fails when only some tests are run

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the fix Irit!

--

___
Python tracker 

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



[issue37387] test_compileall fails randomly on Windows when tests are run in parallel

2021-04-28 Thread Guido van Rossum

Guido van Rossum  added the comment:

Well, in the normal course of running multiple Python programs on the same 
machine, pyc files may be rewritten, and this should not cause crashes. So 
perhaps there’s a real bug here?

--
nosy: +Guido.van.Rossum

___
Python tracker 

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



[issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py

2021-04-28 Thread Ken Jin


Ken Jin  added the comment:

The last of the patches have landed. Guido, thank you so much for helping me 
through this 5 month long process. Please enjoy your vacation!

PS: I need to send in a bugfix for typing.py later to ignore ``ParamSpec`` in 
the ``__parameters__`` of invalid locations like ``typing.List`` (this just 
ensures consistency with the builtin ``list``). That can be done as a bugfix 
patch after the 3.10 beta freeze (as it isn't a new feature at all). I'll open 
a new issue after beta 1 for that when you're back. Thanks!

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



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

2021-04-28 Thread Steve Dower


Steve Dower  added the comment:


New changeset baecfbd849dbf42360d3a84af6cc13160838f24d by Barney Gale in branch 
'master':
bpo-43757: Make pathlib use os.path.realpath() to resolve symlinks in a path 
(GH-25264)
https://github.com/python/cpython/commit/baecfbd849dbf42360d3a84af6cc13160838f24d


--

___
Python tracker 

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



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

2021-04-28 Thread Steve Dower


Change by Steve Dower :


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



[issue43847] [Windows] ntpath.realpath() of bytes root directory may raise TypeError in some cases

2021-04-28 Thread Steve Dower


Change by Steve Dower :


--
keywords: +easy

___
Python tracker 

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



[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3cc481b9de43c234889c8010e7da3af7c0f42319 by scoder in branch 
'master':
bpo-28254: Add a C-API for controlling the GC state (GH-25687)
https://github.com/python/cpython/commit/3cc481b9de43c234889c8010e7da3af7c0f42319


--
nosy: +vstinner

___
Python tracker 

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



[issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py

2021-04-28 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks for your major contribution, Ken! Agreed, that bugfix can come later.

--

___
Python tracker 

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



[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-28 Thread Stefan Behnel


Change by Stefan Behnel :


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



[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-28 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +24383
pull_request: https://github.com/python/cpython/pull/25693

___
Python tracker 

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



[issue43472] [security][subinterpreters] Add auditing hooks to subinterpreter module

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0252ce35712f4a12e824fb8b40a867ec3460443e by Miss Islington (bot) 
in branch '3.9':
bpo-43472: Ensure PyInterpreterState_New audit events are raised when called 
through _xxsubinterpreters module (GH-25506) (GH-25508)
https://github.com/python/cpython/commit/0252ce35712f4a12e824fb8b40a867ec3460443e


--
nosy: +vstinner

___
Python tracker 

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



[issue43349] [doc] incorrect tuning(7) manpage link

2021-04-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24384
pull_request: https://github.com/python/cpython/pull/25694

___
Python tracker 

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



[issue43295] datetime.strptime emits IndexError on parsing 'z' as %z

2021-04-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24385
pull_request: https://github.com/python/cpython/pull/25695

___
Python tracker 

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



[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Here's a list of the SQLite recommended compile-time options (only):

- macOS (v11.2.3) (SQLite v3.32.3) defines SQLITE_DEFAULT_WAL_SYNCHRONOUS=1
- Homebrew (SQLite v3.35.4) does not define any of the recommended compile-time 
options
- Debian Buster (SQLite v3.27.2) defines SQLITE_LIKE_DOESNT_MATCH_BLOBS
- Ubuntu 20.04 (SQLite v3.31.1) defines SQLITE_LIKE_DOESNT_MATCH_BLOBS

AFAICS, adding SQLITE_DEFAULT_MEMSTATUS=0 and SQLITE_OMIT_AUTOINIT is safe, as 
it only affects the C API that we use, and nothing else.

--

___
Python tracker 

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



[issue43968] os.path.realpath() unexpected breaking change: resolves subst'd paths to real paths

2021-04-28 Thread sfmc


New submission from sfmc :

For example if I mount directory
  C:\example\dir
to
  Z:\
the
  os.path.realpath('Z:\\')
returns the real directory.

Use following commands in Windows to reproduce the issue:

  md C:\example\dir
  subst Z: C:\example\dir
  python.exe -c "import os; print(os.path.realpath('Z:\\'))"

Python 3.8 outputs:
  C:\example\dir
Python 3.7 outputs:
  Z:\

This is unexpected behavior change and it breaks our scripts in many places, 
because we use mounts in Windows ("subst" command) and Linux ("mount" command).

We had to add our own implementation for realpath to our scripts, but it also 
affects other tools, such as Python debugger (breakpoints stopped working) and 
IDEs (such as PyCharm).

It can be argued whether the behavior to resolve mounts is good.

But this change breaks the ability to work with Python scripts in mounts.
I hope it can be fixed in Python 3.8.10.


I propose to fix it in Python 3.8.10 by adding to function
os.path.realpath(path)
a new parameter (named for example "resolve_mounts"), like that:
os.path.realpath(path, *, resolve_mounts=False)

And if resolve_mounts==False, then the function should not resolve mounts in 
Windows ("subst" command) and Linux ("mount" command).


Let me know if you wish to get a Pull Request with the proposed fix. I can try 
to implement it.

--
components: Library (Lib)
messages: 392234
nosy: sfmc
priority: normal
severity: normal
status: open
title: os.path.realpath() unexpected breaking change: resolves subst'd paths to 
real paths
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue43851] Optimise SQLite builds on macOS and Windows

2021-04-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Oh, well, SQLITE_DEFAULT_MEMSTATUS=0 does in fact affect PRAGMA 
soft_heap_limit. Looks like I'm left with only SQLITE_OMIT_AUTOINIT, then :)

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-28 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Was EVPtype_spec in _hashopenssl.c converted to heap type?

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

See msg391933, Shreyan. I think Christian will take care of his types :)

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3b52c8d66b25415f09478ab43f93d59a3547dc13 by Erlend Egeberg 
Aasland in branch 'master':
bpo-43908: Add Py_TPFLAGS_IMMUTABLETYPE flag (GH-25520)
https://github.com/python/cpython/commit/3b52c8d66b25415f09478ab43f93d59a3547dc13


--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +24386
pull_request: https://github.com/python/cpython/pull/25696

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +24387
pull_request: https://github.com/python/cpython/pull/25697

___
Python tracker 

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



[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 103d5e420dd90489933ad9da8bb1d6008773384d by Victor Stinner in 
branch 'master':
bpo-28254: _posixsubprocess uses PyGC_Enable/PyGC_Disable (GH-25693)
https://github.com/python/cpython/commit/103d5e420dd90489933ad9da8bb1d6008773384d


--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-28 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Is it necessary to add tests just for testing type immutability? We don't have 
immutability tests for static types then why heap types?

--

___
Python tracker 

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



[issue24475] The docs never define what a pool "task" is

2021-04-28 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Library (Lib)
versions: +Python 3.10, Python 3.11, Python 3.8, 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



  1   2   >