[issue44835] What does "Python for Windows will still be Python for DOS" mean?

2021-08-04 Thread Tim Peters


Tim Peters  added the comment:

The CPython Windows installer has a "thank you" box at the end:

"""
Special Windows thanks to Mark Hammond, without whose years of freely shared 
Windows expertise, Python for Windows would still be Python for DOS.
"""

There was no support for Windows in Python's earliest releases, and Mark 
Hammond did heroic work adding Windows support.

--
nosy: +tim.peters

___
Python tracker 

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



[issue44835] What does "Python for Windows will still be Python for DOS" mean?

2021-08-04 Thread Eric V. Smith


New submission from Eric V. Smith :

Since this is not a bug in Python, this is not the appropriate place to ask. I 
suggest you try the python-list mailing list 
https://mail.python.org/mailman/listinfo/python-list

And I don't know what it means. I've never heard of that saying before.

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: performance -> 

___
Python tracker 

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



[issue44833] VideoCapture is not installing

2021-08-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

I don't know, and this isn't the right place to ask (since this is not a bug in 
Python). I suggest you ask on a VideoCapture specific forum.

--

___
Python tracker 

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



[issue44835] What does "Python for Windows will still be Python for DOS" mean?

2021-08-04 Thread chen-y0y0


Change by chen-y0y0 :


--
components: Installation, Windows
nosy: paul.moore, prasechen, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: What does "Python for Windows will still be Python for DOS" mean?
type: performance
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue44820] subprocess hungs when processing value from mariadb

2021-08-04 Thread jb

jb  added the comment:

Great, thanks!

чт, 5 авг. 2021 г. в 09:57, jb :
>
>
> jb  added the comment:
>
> Privet, spasibo za otklik. Poprobuyu yeshche raz provesti
> issledovaniye. Yesli budet problema, napishu, na discuss.python.org
> ili stackoverflow.com. S uvazheniyem, Bolatbek.
> volume_up
> 165 / 5000
> keyboard
>
> Translation results
>
> Hi, thanks for your feedback. I'll try to do my research again. If
> there is a problem, I will write to discuss.python.org or
> stackoverflow.com.
> Best regards, Bolatbek.
>
> ср, 4 авг. 2021 г. в 21:02, Mark Dickinson :
> >
> >
> > Mark Dickinson  added the comment:
> >
> > Hi @jb. This tracker is for reporting bugs in the core Python language. 
> > While it's possible that what you're experiencing is due to a bug in core 
> > Python, on the information given it's likely that the problem is either in 
> > your own code, or in whatever database driver code you're using. In either 
> > case, I'm afraid this tracker is not the appropriate place to seek help.
> >
> > For general debugging help, you could try any of the various dedicated 
> > Python groups and mailing lists (for example, discuss.python.org), or 
> > something like Stack Overflow. Be prepared to give details of exactly what 
> > you did, what you expected to happen, and what actually happened, along 
> > with code that will help others reproduce your issue.
> >
> > I'm going to close here - currently, there's nothing useful that the Python 
> > core team can do with this report. The issue can be re-opened with more 
> > information after further investigation, if that investigation produces 
> > reasonable grounds to suspect a core Python bug.
> >
> > --
> > nosy: +mark.dickinson
> > resolution:  -> not a bug
> > stage:  -> resolved
> > status: open -> closed
> >
> > ___
> > Python tracker 
> > 
> > ___
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue44762] getpass.getpass on Windows fallback detection is incomplete

2021-08-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: getpass.getpass on Windows fallback detection is bad -> getpass.getpass 
on Windows fallback detection is incomplete

___
Python tracker 

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



[issue44762] getpass.getpass on Windows fallback detection is bad

2021-08-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The rationale for the __stdin__ and stdin check is this:  When python starts, 
both are usually set an io.TextIOWrapper wrapping a system console. (At least 
on Windows, both may instead be None instead.)  __stdin__ should never be 
altered.  Getpass.getpass knows how to turn off echo on a system terminal.  So 
if stdin is not None and is not __stdin__, stdin is very likely not a system 
terminal, and if so, getpass does not know to turn off echo, if indeed this is 
possible.

As far as I know, the tk and hence tkinter text widget do not come with a 
option to not display key presses that are stored in the widget.  An 
application would have to intercept keypresses and store them elsewhere.
But this is quite different issue.

This issue is not about echo, but about interactivity.  Testing that with 
isatty is *NOT* a substitute for testing whether an interactive device is the 
system terminal or not.  (IDLE's stdio connected to Shell passes isatty.)  Any 
new test would have to added without deleting the current test.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue44820] subprocess hungs when processing value from mariadb

2021-08-04 Thread jb

jb  added the comment:

Privet, spasibo za otklik. Poprobuyu yeshche raz provesti
issledovaniye. Yesli budet problema, napishu, na discuss.python.org
ili stackoverflow.com. S uvazheniyem, Bolatbek.
volume_up
165 / 5000
keyboard

Translation results

Hi, thanks for your feedback. I'll try to do my research again. If
there is a problem, I will write to discuss.python.org or
stackoverflow.com.
Best regards, Bolatbek.

ср, 4 авг. 2021 г. в 21:02, Mark Dickinson :
>
>
> Mark Dickinson  added the comment:
>
> Hi @jb. This tracker is for reporting bugs in the core Python language. While 
> it's possible that what you're experiencing is due to a bug in core Python, 
> on the information given it's likely that the problem is either in your own 
> code, or in whatever database driver code you're using. In either case, I'm 
> afraid this tracker is not the appropriate place to seek help.
>
> For general debugging help, you could try any of the various dedicated Python 
> groups and mailing lists (for example, discuss.python.org), or something like 
> Stack Overflow. Be prepared to give details of exactly what you did, what you 
> expected to happen, and what actually happened, along with code that will 
> help others reproduce your issue.
>
> I'm going to close here - currently, there's nothing useful that the Python 
> core team can do with this report. The issue can be re-opened with more 
> information after further investigation, if that investigation produces 
> reasonable grounds to suspect a core Python bug.
>
> --
> nosy: +mark.dickinson
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue44833] VideoCapture is not installing

2021-08-04 Thread ENG19EC0098_Swathi.M

ENG19EC0098_Swathi.M  added the comment:

Thanks for your response so which latest version of python is compatible
for both VideoCapture and OpenCv?

Also the error was:
ERROR: Could not find a vsion that satisfies the requirement VideoCapture
(from versions: none)
ERROR: No matching distribution found for VideoCapture

On Thu, 5 Aug, 2021, 1:01 am Eric V. Smith,  wrote:

>
> Eric V. Smith  added the comment:
>
> Please do no post screen captures. Copy and paste the text into the bug
> report.
>
> It looks like VideoCapture has not released a 3.9 compatible wheel file on
> PyPI. You should follow up with that project directly, as it is not part of
> python’s standard library.
>
> --
> nosy: +eric.smith
> resolution:  -> third party
> stage:  -> resolved
> status: open -> closed
> type: resource usage -> behavior
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue41706] docs: operator dunder (`__add__`, et al.) invocations described incorrectly

2021-08-04 Thread Brett Cannon


Change by Brett Cannon :


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



[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-08-04 Thread Ned Deily


Ned Deily  added the comment:

> Regarding the "explicit weak linking" when building on MacOS Big Sur and 
> later; wouldn't this mean that a Big Sur build wouldn't work on Catalina?

No, if it is done correctly.  I think you are trying to solve the wrong problem 
here.  As Ronald noted earlier, we now fully support building Python on a newer 
version of macOS to run correctly on that version and on older versions (for 
current python.org-provided macOS binary installers, we support one build that 
runs on macOS 10.9 through 11 Big Sur). The key to this is weak-linking with 
the help of Apple-provided availability macros and by properly setting the 
MACOSX_DEPLOYMENT_TARGET variable when running ./configure to the oldest 
desired supported macOS release.

Because this area is neither well-understood nor well-documented, let me try to 
get it written down here at the risk of covering some familiar ground.

To support more than one version of macOS when building Python, there are 
basically two approaches: either build on the oldest targeted system and trust 
that Apple will continue to provide compatibility when running older binaries 
on new systems; or, build on the newest targeted system and dynamically test at 
runtime whether specific newer OS features are available and gracefully handle 
cases where they are not available (which we call "weak-linking" here for 
short).

Prior to Python 3.9.1, we did not support the latter approach, i.e. 
weak-linking for many APIs / features added in recent macOS releases.  So our 
practice and recommendation was to always build on the oldest macOS release to 
be supported.  That's the approach we took for many years, for example, with 
the macOS 64-bit Intel installer variant for 10.9+ systems.  Because Apple has 
had a very good track record of providing compatibility on newer systems (at 
least for the mostly C-based APIs CPython uses), that approached worked 
reasonably well. The main drawback was that certain new features added to 
Python, primarily in the os module, were not available when using the 
python.org installer binaries on newer (post-10.9) systems. That was not ideal 
but, for the most part, the missing features weren't commonly used yet and this 
was essentially only an issue if you were using the python.org-supplied 
binaries; you could always use or build a Python targeted for the system in use.

However, things changed with macOS 11 Big Sur and the removal of system library 
files which broke ctype's find_library() when searching for system files, the 
subject of this issue. There were a number of other changes needed in CPython 
to fully support Big Sur, as documented in Issue41100 and others. As part of 
that work, Ronald and Lawrence D'Anna bit the bullet and went through the 
interpreter and the standard library to finally properly support weak-linking 
for multiple macOS versions. That means, as of 3.9.1 with the introduction of 
Big Sur support, it is finally possible to build on newer systems but still 
work properly on older ones. For 3.9.1, we introduced a new python.org 
installer variant, the "universal2" variant, that provides Intel and Apple 
Silicon fat binaries that should work on all Macs that can run macOS 10.9 
through at least 11 with newer features conditionally tested at runtime.

So our recommendation has changed as of 3.9.1 to now use the second approach 
above (which previously could cause Python segfaults when running on older 
systems) and to deprecate and phase out the use of the first approach (which 
still works as before - i.e. missing some features - with the notable exception 
of find_library() with system libraries on Big Sur).  Note that the 
find_library() issue is only one reason for that change in recommendation.

How does this work? Here's a quick demo using current head of Python 3.10 
(although you should see similar results with Python 3.9.x as of 3.9.1), the 
latest versions of macOS 11, 10.15, and 10.9.  We'll build on 11 in all cases, 
then deploy and run test_ctypes and test_posix on 11, 10.15, and 10.9.


1. Default case, no MACOSX_DEPLOYMENT_TARGET specified.  If the deployment 
target is not specified, configure normally uses the operating system version 
the build is running on, so in this case, 11 Big Sur.

$ sw_vers
ProductName:macOS
ProductVersion: 11.5.1
BuildVersion:   20G80
$ ./configure --prefix=/tmp/py && make -j3 && make install
[...]
checking which MACOSX_DEPLOYMENT_TARGET to use... 11.5
[...]

# run on 11, works as expected
$ /tmp/py/bin/python3.10
Python 3.10.0rc1+ (heads/3.10:536e35ae6a, Aug  4 2021, 16:46:59) [Clang 12.0.5 
(clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ^D
$ /tmp/py/bin/python3.10 -m test test_ctypes
0:00:00 load avg: 1.86 Run tests sequentially
0:00:00 load avg: 1.86 [1/1] test_ctypes

== Tests result: SUCCESS ==

1 test OK.

Total duration: 762 ms
Tests 

[issue43468] functools.cached_property incorrectly locks the entire descriptor on class instead of per-instance locking

2021-08-04 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue44818] '\t' (tab) support

2021-08-04 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

I'm guessing this has to do with mixing spaces and tabs when indenting code. 
This can be fixed in your text editor.

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



[issue44818] '\t' (tab) support

2021-08-04 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

On Wed, Aug 04, 2021 at 03:25:06PM +, Pooia wrote:
> unexcpeted indent

What about an unexpected indent?

Please explain what you think the bug is in full sentences, showing some 
example code we can run.

--

___
Python tracker 

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



[issue44817] os.path.realpath fails with WinError 161

2021-08-04 Thread Eryk Sun


Eryk Sun  added the comment:

ERROR_NETWORK_ACCESS_DENIED (65) should probably be added to the ignore list. I 
don't know whether it occurs in practice, but we have it mapped to EACCES in 
PC/errmap.h. The common access error is ERROR_ACCESS_DENIED (5), even on a UNC 
share with restricted access.

Add ERROR_DEV_NOT_EXIST (55) only if you have a case that fails with this error 
code. It's from the NT status code STATUS_DEVICE_DOES_NOT_EXIST. This might 
occur when trying to automount a device that's pending removal (see the 
implementation in ReactOS IopMountVolume [1]), but I can't create this 
condition. I think a device object would need to be practically stuck in the 
pending removal state for this to be a practical problem.

ERROR_LOCK_VIOLATION (33) isn't relevant. It's an I/O access error for a locked 
range of a file. realpath() doesn't read or write file data.

For the others, I'd wait for an issue to be reported. 

---

[1] 
https://github.com/reactos/reactos/blob/master/ntoskrnl/io/iomgr/volume.c#L457

--

___
Python tracker 

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



Tracing in a Flask application

2021-08-04 Thread Javi D R
Hi

I would like to do some tracing in a flask. I have been able to trace
request in plain python requests using sys.settrace(), but this doesnt work
with Flask.

Moreover, what i want to trace is in a flask application, when an endpoint
is called, what was the request, which parts of the code was executed (i
think i can still do it with settrace) and what is the response sent by the
application

Can you help me to understand which services i can use to do this?

Thanks
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue44617] Undesired Behavior on `match` using Singleton object

2021-08-04 Thread Brandt Bucher


Brandt Bucher  added the comment:

Yep, everything is working as intended here. Thanks, Dennis, for taking the 
time to explain why.

Pablo, if you're still unsure of why your examples behave the way they do, I 
strongly recommend reading through the official tutorial (PEP 636). It goes 
through the behavior of each of the different patterns in a very 
straightforward, easy-to-digest way.

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



[issue44801] Type expression is coerced to a list of parameter arguments in substitution of ParamSpec

2021-08-04 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue41706] docs: operator dunder (`__add__`, et al.) invocations described incorrectly

2021-08-04 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 80f33f266b4ad5925a3e58ea3a54ae139a6b6f0e by William Chargin in 
branch 'main':
bpo-41706: Fix special method invocation docs to mention using type() (GH-22084)
https://github.com/python/cpython/commit/80f33f266b4ad5925a3e58ea3a54ae139a6b6f0e


--
nosy: +brett.cannon

___
Python tracker 

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



[issue44772] Regression in memory use of instances due to dictionary ordering

2021-08-04 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue44801] Type expression is coerced to a list of parameter arguments in substitution of ParamSpec

2021-08-04 Thread miss-islington


miss-islington  added the comment:


New changeset 536e35ae6a2555a01f4b51a68ad71dbf7923536d by Miss Islington (bot) 
in branch '3.10':
bpo-44801: Check arguments in substitution of ParamSpec in Callable (GH-27585)
https://github.com/python/cpython/commit/536e35ae6a2555a01f4b51a68ad71dbf7923536d


--

___
Python tracker 

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



[issue44828] Using tkinter.filedialog crashes on macOS 12 Monterey beta 4 with tk8.6.11 from python.org installers

2021-08-04 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report. I verified that the crash also occurs on an Intel Mac VM 
with Monterey beta 4 using the current python.org universal2 installers for 
3.9.6 and 3.10.0rc1; they both have a private copy of Tk 8.6.11; so the problem 
does not appear to be Apple Silicon (M1) related. For what it's worth, the 
legacy python.org 3.9.6 Intel-only installer, which uses a copy of Tk 8.6.8, 
does not crash the Monterey beta 4. And no such failures are observed using any 
of those installers on the current Big Sur 11.5.1 release.

--
title: Using tkinter.filedialog crashes on macOS Python 3.9.6 -> Using 
tkinter.filedialog crashes on macOS 12 Monterey beta 4 with tk8.6.11 from 
python.org installers
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



[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks all for your effort on improving this! ✨  ✨

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7dad0337518a0d599caf8f803a5bf45db67cbe9b by Miss Islington (bot) 
in branch '3.9':
bpo-42958: Improve description of shallow= in filecmp.cmp docs (GH-27166) 
(GH-27608)
https://github.com/python/cpython/commit/7dad0337518a0d599caf8f803a5bf45db67cbe9b


--

___
Python tracker 

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



[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-08-04 Thread miss-islington


miss-islington  added the comment:


New changeset c2593b4d06712cefcdeae93b32f88faa4772bc3a by Miss Islington (bot) 
in branch '3.10':
bpo-42958: Improve description of shallow= in filecmp.cmp docs (GH-27166)
https://github.com/python/cpython/commit/c2593b4d06712cefcdeae93b32f88faa4772bc3a


--

___
Python tracker 

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



[issue43066] Zipfile with leading slashes

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for the report, Garrison. And Andrei for the patch! ✨  ✨

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



[issue43066] Zipfile with leading slashes

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 1a2c0ecfa2ef8542baee951f12b60afd165be9cf by Miss Islington (bot) 
in branch '3.9':
[doc] bpo-43066: zipfile - add note on leading slash in the filename arg 
(GH-26899) (GH-27606)
https://github.com/python/cpython/commit/1a2c0ecfa2ef8542baee951f12b60afd165be9cf


--

___
Python tracker 

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



[issue43066] Zipfile with leading slashes

2021-08-04 Thread miss-islington


miss-islington  added the comment:


New changeset 98f6a72ff621c2033e8f2c38df410e9bfa2b772a by Miss Islington (bot) 
in branch '3.10':
[doc] bpo-43066: zipfile - add note on leading slash in the filename arg 
(GH-26899)
https://github.com/python/cpython/commit/98f6a72ff621c2033e8f2c38df410e9bfa2b772a


--

___
Python tracker 

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



[issue44524] __name__ attribute in typing module

2021-08-04 Thread Bas van Beek


Bas van Beek  added the comment:

This PRs herein have created a situation wherein the `__name__`/`__qualname__` 
attributes of certain typing objects can be `None`.
Is this behavior intentional?


```
>>> from typing import Union

>>> print(Union[int, float].__name__)
None
```

--
nosy: +BvB93

___
Python tracker 

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



[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-08-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26103
pull_request: https://github.com/python/cpython/pull/27608

___
Python tracker 

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



[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset a8dc4893d2b28827e82447326ea47759c161a722 by andrei kulakov in 
branch 'main':
bpo-42958: Improve description of shallow= in filecmp.cmp docs (GH-27166)
https://github.com/python/cpython/commit/a8dc4893d2b28827e82447326ea47759c161a722


--
message_count: 10.0 -> 11.0
nosy: +lukasz.langa, miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +26102
pull_request: https://github.com/python/cpython/pull/27607

___
Python tracker 

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



Re: SQLALchemy: update with in clause from kwargs

2021-08-04 Thread Larry Martell
On Tue, Aug 3, 2021 at 7:26 PM dn via Python-list
 wrote:
>
> On 04/08/2021 13.08, Larry Martell wrote:
> > I am trying to write a function that takes kwargs as a param and
> > generates an update statement where the rows to be updated are
> > specified in an in clause.
> >
> > Something like this:
> >
> > def update_by_in(self, **kwargs):
> > filter_group = []
> > for col in kwargs['query_params']:
> > # obviously this line does not work as col is a string,
> > but this is the intent
> > filter_group.append(col.in_(tuple(kwargs['query_params'][col])))
> >
> > 
> > self._session.query(self.model_class).filter(*filter_group).update(kwargs['values'])
> >
> > self.update_by_in(
> > **{'query_params': {'companyCode': ['A', 'B', 'C']},
> > 'values': {'portfolioName': 'test'}}
> >  )
> >
> > Is there a way to do this? I think I need to use setattr in building
> > up the filter_group list, but I'm not quite sure how to do it.
>
>
> When feeling bamboozled by a problem, particularly when using
> sophisticated tools such as SQLAlchemy, the trick is often to simplify
> the problem.
>
> Step 1 (using the sample data provided)
> Write the query on paper - and as constant-values.
>
> Step 2
> Compare the two input dicts with that requirement.
>
> Step 3
> Work-out the transformation(s) required...
>
>
> One complexity is that the parameter to update_by_in() is formed by
> joining two dicts. However, the function later tries to treat them in
> distinct fashions. Why the join/why not two parameters?
>
> companyCode = ['A', 'B', 'C']
> values = {'portfolioName': 'test'}
>
> leading to:
>
> self.update_by_in( companyCode, values )
>
> and:
>
> def update_by_in(self, company_code, portfolio_type ):
> 
>
>
> As to the core of the question-asked, I'm a little confused (which may
> be my fuzzy head). Do you want the update(s) - portrayed as a list -
> like this:
>
> [('A', 'test'), ('B', 'test'), ('C', 'test')]
>
> like this:
>
> [('A', 'portfolioName'), ('B', None), ('C', None)]
>
> or only:
>
> [('A', 'portfolioName')]
>
>
> You will find a friend in the itertools (PSL) library:
>
> import itertools as it
>
> list( it.product( companyCode, values.values() ) )
> [('A', 'test'), ('B', 'test'), ('C', 'test')]
>
> list( it.zip_longest( companyCode, values.values() ) )
> [('A', 'test'), ('B', None), ('C', None)]
>
> list( zip( companyCode, values ) )
> [('A', 'portfolioName')]
>
>
> Now, have we simplified things to the point of being able to more-easily
> code the update and filter?

I appreciate the reply, but it does not address my issue, which was
how to get at the column object. Turned out that was simple enough:

for col in kwargs['query_params']:
attr = getattr(self.model_class, col)
filter_group.append(attr.in_(tuple(kwargs['query_params'][col])))

Unfortunately that is causing something to change the query_params, as
filter group ends up like:

print(type(filter_group[0]))



print(filter_group[0])

dbo."Portfolio"."companyCode" IN (:companyCode_1, :companyCode_2,
:companyCode_3)

Which then fails with:

sqlalchemy.orm.evaluator.UnevaluatableError: Cannot evaluate
clauselist with operator 

This has now become more of a sqlalchemy question than a python one.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43066] Zipfile with leading slashes

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7c5dab4340032eb15d3797d8b601ef11649bbab3 by andrei kulakov in 
branch 'main':
[doc] bpo-43066: zipfile - add note on leading slash in the filename arg 
(GH-26899)
https://github.com/python/cpython/commit/7c5dab4340032eb15d3797d8b601ef11649bbab3


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue43066] Zipfile with leading slashes

2021-08-04 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue43066] Zipfile with leading slashes

2021-08-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26101
pull_request: https://github.com/python/cpython/pull/27606

___
Python tracker 

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



[issue44833] VideoCapture is not installing

2021-08-04 Thread Eric V. Smith

Eric V. Smith  added the comment:

Please do no post screen captures. Copy and paste the text into the bug report. 

It looks like VideoCapture has not released a 3.9 compatible wheel file on 
PyPI. You should follow up with that project directly, as it is not part of 
python’s standard library.

--
nosy: +eric.smith
resolution:  -> third party
stage:  -> resolved
status: open -> closed
type: resource usage -> behavior

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Sebastian Berg


Sebastian Berg  added the comment:

Thanks for looking into it!

`cpow` is indeed complicated.  We had some discussion in NumPy about `0**y` 
branch cuts (I did yet not finish it, because thinking about the branch cuts is 
tricky).

It is almost reassuring that the C standard also hedges out :).  Although, it 
means that there is no reliance on math libraries if we want to treat the 
special cases more carefully :(.

--

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

> brave or foolhardy enough to try to figure out what all of the special case 
> results *should* be for complex pow

Addendum: even the C standards give up at this point. For everything else the 
special cases are spelled out in detail, but for cpow, from §G.6.4.1 of C17 (in 
Annex G), we have:

> The cpow functions raise floating-point exceptions if appropriate for the 
> calculation of the parts of the result, and may also raise spurious 
> floating-point exceptions.

And that's it. (Well, not quite: there's a footnote, which says:

> This allows cpow(z, c) to be implemented as cexp(cclog(z)) without precluding 
> implementations that treat special cases more carefully.

)

--

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Mark Dickinson


Change by Mark Dickinson :


--
assignee: twouters -> mark.dickinson
status: closed -> open

___
Python tracker 

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



[issue44564] DeprecationWarning in test_enum over formatting

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Brandon! ✨  ✨

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



[issue33277] Deprecate __loader__, __package__, __file__, and __cached__ on modules

2021-08-04 Thread Brett Cannon

Brett Cannon  added the comment:

> Maybe this can be revisited now.

I've started the work already (albeit rather slowly ). Importlib has been 
updated to prefer __spec__.parent of __package__ and warns when the values are 
not equal. Next step will be to raise an ImportWarning when __package__ is 
defined but __spec__.parent is not (then DeprecationWarning after that).

For __loader__ I got Python 3.10 to fall back on to __spec__.loader. Next step 
is https://bugs.python.org/issue42132 to update C code to set __spec__ where 
appropriate. From there the check for equivalence can go in (which then leads 
to the warnings).

I have not started with __cached__ yet, so next step is making sure all uses 
fall back on __spec__.

So, to be clear, the steps I have been following are:

1. Make sure all code falls back on __spec__ when appropriate (one release)
2. Raise an ImportWarning when values differ (one release)
3. Make __spec__ take precedence over old attribute (one release)
4. Raise an ImportWarning when having to fall back to older attribute (two 
releases)
5. Raise a DeprecationWarning when falling back on older attribute (two 
releases)
6. Clean up code

--

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Mark Dickinson


Mark Dickinson  added the comment:

> a double-check that the behaviour change is desirable

I'm not sure I'm brave or foolhardy enough to try to figure out what all of the 
special case results *should* be for complex pow. The special cases seem 
reasonably clear cut for everything else in the cmath module, but for pow it's 
pretty much going to be a nightmare. I'm not sure there's much Python can do 
here in the way of guarantees, other than "not obviously horribly wrong". (And 
while I have reasonable confidence we can achieve the "not obviously horribly 
wrong" goal for everything else, I still have doubts for pow.)

--

___
Python tracker 

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



[issue44564] DeprecationWarning in test_enum over formatting

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset f99c015638b46e46ae3ee3f27b96a514007cdaef by Brandon Schabell in 
branch 'main':
bpo-44564 Move formatted assertion under deprecation warning context (GH-27090)
https://github.com/python/cpython/commit/f99c015638b46e46ae3ee3f27b96a514007cdaef


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-04 Thread E. Paine


E. Paine  added the comment:

Thanks for reporting issue and for including the backtrace. I presume you used 
the Universal 2 installer, given that you are running an M1 mac? 

Kevin, do you have access to the macOS 12 beta to help test whether this is a 
Tkinter or Tk bug? (I assume the latter, as it is likely Apple have changed the 
API again)

--
components: +macOS
nosy: +epaine, ned.deily, ronaldoussoren, serhiy.storchaka, wordtech

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Mark Dickinson


Mark Dickinson  added the comment:

Thanks, @seberg. I'll take a look and see if we can restore the old behaviour, 
at least for Python 3.9 and 3.10. I'm not convinced that the new behaviour is 
objectively wrong, but I agree that the *change* in behaviour is problematic.

I do find it a little odd that we're special-casing integer exponents for 
complex numbers when no such special-casing exists for floats. It's not purely 
for optimization (despite what the code might say). And all the messing around 
with trying to figure out exactly _which_ doubles can safely be cast to long 
(which was the original cause of this issue) seems like a symptom of a deeper 
problem, which is that it doesn't make a whole lot of sense to be 
distinguishing in the first place. But if we're going to change the behaviour, 
we should only be doing that in 3.11.

OTOH, there *is* real value in z**2 being fast and accurate; we definitely want 
to keep that. (Perhaps the math and cmath modules should grow a `square` 
function.)

--

___
Python tracker 

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



[issue41354] filecmp.cmp documentation does not match actual code

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:

Closed in favor of BPO-42958. Thanks for your report, Christof!

--
nosy: +lukasz.langa
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed
superseder:  -> filecmp.cmp(shallow=True) isn't actually shallow when only 
mtime differs

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Sebastian Berg


Sebastian Berg  added the comment:

(Sorry for the spam.  I think we can/should just hard-code the expected values 
in the NumPy test-suite.  So this is not actually an issue for NumPy and 
probably just warrants a double-check that the behaviour change is desirable.)

--

___
Python tracker 

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



[issue44817] os.path.realpath fails with WinError 161

2021-08-04 Thread Michael Förderer

Michael Förderer  added the comment:

Updated with ERROR_BAD_NETPATH (53).
What about following errors:
- ERROR_LOCK_VIOLATION (33)
- ERROR_DEV_NOT_EXIST (52)
- ERROR_BAD_NET_RESP (58)
- ERROR_UNEXP_NET_ERR (59)
- ERROR_NETNAME_DELETED (64)
- ERROR_NETWORK_ACCESS_DENIED (65)
- ERROR_BAD_DEV_TYPE (66)

--

___
Python tracker 

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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Sebastian Berg


Sebastian Berg  added the comment:

Hmm, sorry, I overshot/misread :(.

The thing that the NumPy test-suite trips over is that:

c_powi(inf+0j, 3)

seems to not raise, but:

_Py_c_pow(inf+0j, 3.+0j)

(or nan+0.j rather then inf+0j)

does seem to raise (returning `nan+nanj` in both cases).  If this is the `inf` 
code path, raising an error may actually be fix and the integer code path 
should maybe also do it.

--

___
Python tracker 

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



[issue44301] Is there a way to provide destructor for module written using C API?

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for your report, Azat! ✨  ✨

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44301] Is there a way to provide destructor for module written using C API?

2021-08-04 Thread Łukasz Langa

Change by Łukasz Langa :


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



[issue44698] Undefined behaviour in Objects/complexobject.c's complex_pow

2021-08-04 Thread Sebastian Berg


Sebastian Berg  added the comment:

The fix broke NumPy (see also https://github.com/numpy/numpy/pull/19612)

It seems incorrect.  After all, it doesn't matter much whether the float can be 
converted to an integer correctly (or even if it returns an undefined value), 
so long `int_value == float_value` remains sensible.

The old cast cast integers to complex when they were out of range (which is 
fine), the new code raises an error instead.

--
nosy: +seberg

___
Python tracker 

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



[issue44760] Turtle Documentation - Contents Hyperlink conflict

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Harry! ✨  ✨

--
nosy: +lukasz.langa
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue33277] Deprecate __loader__, __package__, __file__, and __cached__ on modules

2021-08-04 Thread Irit Katriel


Irit Katriel  added the comment:

> We didn't make it stronger since we can't get rid of any of these attributes 
> until Python 2.7 compatibility is no longer a concern.

Maybe this can be revisited now.

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

___
Python tracker 

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



[issue44801] Type expression is coerced to a list of parameter arguments in substitution of ParamSpec

2021-08-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +26099
pull_request: https://github.com/python/cpython/pull/27598

___
Python tracker 

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



[issue44801] Type expression is coerced to a list of parameter arguments in substitution of ParamSpec

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 3875a6954741065b136650db67ac533bc70a3eac by Serhiy Storchaka in 
branch 'main':
bpo-44801: Check arguments in substitution of ParamSpec in Callable (GH-27585)
https://github.com/python/cpython/commit/3875a6954741065b136650db67ac533bc70a3eac


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44834] contextvars.Context.run w/ coroutines gives inconsistent behavior

2021-08-04 Thread Adrian Garcia Badaracco


Change by Adrian Garcia Badaracco :


--
nosy: +yselivanov

___
Python tracker 

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



[issue42815] new thread doesn't copy context of the parent thread

2021-08-04 Thread Adrian Garcia Badaracco


Change by Adrian Garcia Badaracco :


--
nosy: +adriangb

___
Python tracker 

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



[issue44829] zoneinfo.ZoneInfo does not check for Windows device names

2021-08-04 Thread Eryk Sun


Change by Eryk Sun :


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

___
Python tracker 

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



[issue44834] contextvars.Context.run w/ coroutines gives inconsistent behavior

2021-08-04 Thread Adrian Garcia Badaracco


New submission from Adrian Garcia Badaracco :

I recently tried to use `contextvars.Context.run` w/ coroutines, expecting the 
same behavior as with regular functions, but it seems that 
`contextvars.Context.run` does not work w/ coroutines.

I'm sorry if this is something obvious to do with how coroutines work under the 
hood, if so I'd appreciate some help in understanding why this is the expected 
behavior.

```python
import asyncio
import contextvars


ctxvar = contextvars.ContextVar("ctxvar", default="spam")


def func():
assert ctxvar.get() == "spam"

async def coro():
func()


async def main():
ctx = contextvars.copy_context()
ctxvar.set("ham")
ctx.run(func)  # works
await ctx.run(coro)  # breaks

asyncio.run(main())
```

Thanks!

--
components: Library (Lib)
messages: 398924
nosy: adriangb
priority: normal
severity: normal
status: open
title: contextvars.Context.run w/ coroutines gives inconsistent behavior
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue44301] Is there a way to provide destructor for module written using C API?

2021-08-04 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44301] Is there a way to provide destructor for module written using C API?

2021-08-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26098
pull_request: https://github.com/python/cpython/pull/27597

___
Python tracker 

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



[issue44833] VideoCapture is not installing

2021-08-04 Thread ENG19EC0098_Swathi.M


New submission from ENG19EC0098_Swathi.M :

The python version is failing to install the VideoCapture of opencv despite 
many trials. 
Would request you to kindly go through this at the earliest

--
components: Installation
files: Screenshot 2021-08-04 232419.jpg
messages: 398923
nosy: eng19ec0098.swathim
priority: normal
severity: normal
status: open
title: VideoCapture is not installing
type: resource usage
versions: Python 3.9
Added file: https://bugs.python.org/file50202/Screenshot 2021-08-04 232419.jpg

___
Python tracker 

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



[issue44831] Inconsistency between datetime.now() and datetime.fromtimestamp(time.time(), None)

2021-08-04 Thread Miksus


Miksus  added the comment:

I accidentially posted Python 3.6 link to the declaration of 
datetime.datetime.now() but this has been unchanged: 
https://github.com/python/cpython/blob/3d2b4c6f18d7e644e5850d2af74ac5dc530eb24c/Lib/datetime.py#L1696

The actual piece of code as of now:
...
import time as _time
...
@classmethod
def now(cls, tz=None):
"Construct a datetime from time.time() and optional time zone info."
t = _time.time()
return cls.fromtimestamp(t, tz)

--

___
Python tracker 

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



[issue44803] change tracemalloc.BaseFilter to an abstract class

2021-08-04 Thread Łukasz Langa

Łukasz Langa  added the comment:

Many standard libraries, including new ones like asyncio, use `raise 
NotImplementedError` to denote methods that need re-implementation in 
subclasses. Some of those base classes even literally *called* Abstract and yet 
don't inherit from ABC (nor use ABCMeta). Do you intend to change all those as 
well?

While I agree it would be cleaner to have them defined as abstract, at the 
moment I'm not sure it's worth the churn.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44832] Compiler detection is not strict enough

2021-08-04 Thread Ben Boeckel


New submission from Ben Boeckel :

Generally, the `configure.ac` script tries to detect compilers based on the 
path to the compiler. This is mostly fine, but trips up when using `mpicc` as 
the compiler. Even if the underlying compiler is `gcc`, this gets detected as 
`icc` in various situations.

The best solution is to do some compiler introspection like CMake does to 
determine what the compiler actually is, but I'm not familiar with the patterns 
used or available tools in autotools for such things.

--
components: Build
messages: 398920
nosy: mathstuf
priority: normal
severity: normal
status: open
title: Compiler detection is not strict enough
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue44831] Inconsistency between datetime.now() and datetime.fromtimestamp(time.time(), None)

2021-08-04 Thread Miksus


New submission from Miksus :

I am trying to measure time twice and the second measurement gives a time that 
is 1 microsecond before the first measurement about half of the time.

My experiment in short:
---
import time, datetime
start = time.time()
end = datetime.datetime.now()

start = datetime.datetime.fromtimestamp(start, None)
assert end >= start # fails about half the time.
---


The problem is somewhat interesting. This does not fail:
---
import time, datetime
start = time.time()
end = time.time()

start = datetime.datetime.fromtimestamp(start, None)
end = datetime.datetime.fromtimestamp(end, None)
assert end >= start
---

And neither does this:
---
import datetime
start = datetime.datetime.now()
end = datetime.datetime.now()
assert end >= start
---

And it seems datetime.datetime.now() works the same way as to how I handled the 
"start" time in my first experiment: 
https://github.com/python/cpython/blob/3.6/Lib/datetime.py#L1514
and therefore the issue seems to be under the hood.

I have tested this on two Windows 10 machines (Python 3.6 & 3.8) in which cases 
this occurred. This did not happen on Raspberry Pi OS using Python 3.7.

In short:
- The time module imported in datetime.datetime.now() seems to measure time 
slightly differently than the time module imported by a Python user.
- This seems to be Windows specific.

My actual application has some code in between the measurements suffering from 
the same problem thus this is not an issue affecting only toy examples.

--
components: Library (Lib), Windows
messages: 398919
nosy: Miksus, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Inconsistency between datetime.now() and 
datetime.fromtimestamp(time.time(), None)
versions: Python 3.6, Python 3.8

___
Python tracker 

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



[issue44760] Turtle Documentation - Contents Hyperlink conflict

2021-08-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26096
pull_request: https://github.com/python/cpython/pull/27595

___
Python tracker 

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



[issue44760] Turtle Documentation - Contents Hyperlink conflict

2021-08-04 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44829] zoneinfo.ZoneInfo does not check for Windows device names

2021-08-04 Thread Paul Ganssle


Paul Ganssle  added the comment:

Sorry you didn't receive a response to your security@ email, I guess my 
response just went to the PSRT, not to you as well. I believe we determined 
that this was an issue in importlib.resources generally, not specific to 
zoneinfo.

I think `importlib.resources.open_binary` should check if a resource is a file 
with `os.isfile` before opening it. That will solve the issue in zoneinfo and 
other similar situations.

--

___
Python tracker 

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



[issue44818] '\t' (tab) support

2021-08-04 Thread Eric V. Smith

Eric V. Smith  added the comment:

Please show us an example that demonstrates your problem. Show us the code you 
tried, what you expected to happen, and what actually happened. Otherwise we 
can’t help you.

--
nosy: +eric.smith

___
Python tracker 

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



[issue44819] assertSequenceEqual does not use _getAssertEqualityFunc

2021-08-04 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
superseder:  -> addTypeEqualityFunc is not used in assertListEqual

___
Python tracker 

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



[issue44829] zoneinfo.ZoneInfo does not check for Windows device names

2021-08-04 Thread Eryk Sun


Eryk Sun  added the comment:

In zoneinfo._tzpath, _validate_tzfile_path() depends on os.path.normpath(). I 
think the Windows implementation of normpath() in the ntpath module should be 
extended to normalize reserved names in the final path component in the same 
manner as WinAPI GetFullPathNameW(). 

Alternatively, an isreserved() function could be added to os.path. This would 
allow _validate_tzfile_path() to raise a more informative exception for a 
reserved name.

Reserved names:

GetFullPathNameW() strips trailing spaces and dots from the final path 
component. This applies to all path types. For example:

>>> nt._getfullpathname('?\\UNC/server/share/spam. . .')
'?\\UNC\\server\\share\\spam'

GetFullPathNameW() reserves DOS device names in the final component of a 
relative path or drive path -- but not in a UNC path or device path. The 
following case-insensitive names are reserved:

* NUL
* CON
* CONIN$
* CONOUT$
* AUX
* PRN
* COM<1-9>
* LPT<1-9>

A reserved device name begins with one of the above base names plus an optional 
suffix. The suffix is zero or more spaces followed optionally by a "." or ":" 
and zero or more characters. The normalized result is a ".\\" device path 
for the base device name. For example: 

>>> nt._getfullpathname('C:/Temp/con . spam')
'.\\con'
>>> nt._getfullpathname('C:/Temp/con : spam')
'.\\con'

--
components: +Windows
nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue44829] zoneinfo.ZoneInfo does not check for Windows device names

2021-08-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +belopolsky, p-ganssle

___
Python tracker 

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



[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2021-08-04 Thread Hasan


Hasan  added the comment:

If nobody works, i would like to solve this

--
nosy: +AliyevH

___
Python tracker 

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



[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-04 Thread Mark Dickinson


Mark Dickinson  added the comment:

A bit more Googling found this:

https://support.mozilla.org/en-US/kb/contributors-guide-writing-good-bug

--

___
Python tracker 

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



[issue44830] Broken Mozilla devguide link in "Dealing with Bugs" doc section

2021-08-04 Thread Mark Dickinson


New submission from Mark Dickinson :

The "Bug Report Writing Guidelines" link in the "Dealing with Bugs" doc section 
(https://docs.python.org/3/bugs.html) looks broken.

The linked URL is 
https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines, but 
that gives me a "Page not found" error. I tried to find equivalent content 
elsewhere on developer.mozilla.org, but either it's not there or my search-fu 
is failing me.

--
assignee: docs@python
components: Documentation
messages: 398913
nosy: docs@python, mark.dickinson
priority: normal
severity: normal
status: open
title: Broken Mozilla devguide link in "Dealing with Bugs" doc section
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue41946] Add concrete examples to os.path documentation

2021-08-04 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Some examples were added since this issue was created, but more can be added. 
Stargirl: feel free to open a PR, I can review it.

--
nosy: +andrei.avk

___
Python tracker 

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



[issue44819] assertSequenceEqual does not use _getAssertEqualityFunc

2021-08-04 Thread Brian


Brian  added the comment:

I've attached an example of what I want. It contains a class, a function to be 
tested, and a test class which tests the function.

What TestCase.addTypeEqualityFunc feels like it offers is a chance to compare 
objects however I feel like is needed for each test. Sometimes all I want is to 
compare the properties of the objects, and maybe not even all of the 
properties! When I have a list of these objects and I've added an equality 
function for the object, I was expecting the test class to use my equality 
function when comparing objects in the list.

--
Added file: https://bugs.python.org/file50201/example.py

___
Python tracker 

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



[issue41117] [easy C] GC: Use local variable 'op' when invoking 'traverse' in 'subtract_refs'

2021-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks William, I made the change that you suggested. Next time, please create 
a PR directly ;-)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 3.10

___
Python tracker 

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



[issue41117] [easy C] GC: Use local variable 'op' when invoking 'traverse' in 'subtract_refs'

2021-08-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c34fa2bb06ea44045af8493dfa414addb2b7ce66 by Victor Stinner in 
branch 'main':
bpo-41117: Cleanup subtract_refs() (GH-27593)
https://github.com/python/cpython/commit/c34fa2bb06ea44045af8493dfa414addb2b7ce66


--

___
Python tracker 

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



[issue44683] Can't subscript objects with the string "1" using str.format()

2021-08-04 Thread Eric V. Smith


Change by Eric V. Smith :


--
components: +Interpreter Core -Unicode

___
Python tracker 

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



[issue44821] Instance dictionaries should be created eagerly

2021-08-04 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset cee67fa66129b5d1db5c8aa3884338f82f0da3de by Mark Shannon in 
branch 'main':
bpo-44821: Eagerly assign __dict__ for new objects. (GH-27589)
https://github.com/python/cpython/commit/cee67fa66129b5d1db5c8aa3884338f82f0da3de


--

___
Python tracker 

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



[issue44661] Update property_descr_set to use vectorcall if possible.

2021-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

> Mean +- std dev: [property_base] 140 ns +- 5 ns -> [property_vectorcall] 125 
> ns +- 2 ns: 1.12x faster

Ah! That's better. If it was only 1.01x faster, I would say that it's not worth 
it. But 1.12x is worth it. Thanks for this optimization.

--

___
Python tracker 

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



[issue44683] Can't subscript objects with the string "1" using str.format()

2021-08-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue41117] [easy C] GC: Use local variable 'op' when invoking 'traverse' in 'subtract_refs'

2021-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

I created PR 27593.

--

___
Python tracker 

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



[issue41117] [easy C] GC: Use local variable 'op' when invoking 'traverse' in 'subtract_refs'

2021-08-04 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner
nosy_count: 1.0 -> 2.0
pull_requests: +26094
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27593

___
Python tracker 

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



[issue31426] [3.5] crash in gen_traverse(): gi_frame.ob_type=NULL, called by subtract_refs() during a GC collection

2021-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

This bug report mentions Python 3.5 and 3.6 which no longer accept bugfixes. 
Since nobody reported issues on Python 3.9 and newer (which still accept 
bugfixes), I close the issue as out of date.

Victor Zhestkov:
> It seems I have the same segfault, but with 3.6.13 python shipped with 
> SLE15SP2. It's salt-api process under intensive usage. I'm able to reproduce 
> it, but can't isolate due to the service complexity. In some cases it takes 
> about 5 minutes to be crashed, but in others it could run with no crash for 
> about an hour or more (I keep the workload on this service with a kind of 
> stress test).

See my notes to debug crashes happening during GC collections:
https://pythondev.readthedocs.io/debug_tools.html#debug-crash-in-garbage-collection-visit-decref

You can try to use a way smaller GC threshold: call gc.set_threshold(5) at the 
very beginning of your application.

I strongly advice you to use a debug mode of Python, since it includes way more 
debug modes.

I also strongly advice you to upgrade Python. I added many debug checks for 
object consistency in the GC in recent Python releases (3.8, 3.9, 3.10) and 
when a bug arises, Python dumps way more information about the faulty Python 
object.

Good luck for debug it. But please don't comment this closed issue. Python 3.6 
is no longer supported.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue44818] '\t' (tab) support

2021-08-04 Thread Pooia


Pooia  added the comment:

unexcpeted indent

On Tue, Aug 3, 2021 at 7:59 PM Serhiy Storchaka 
wrote:

>
> Change by Serhiy Storchaka :
>
>
> --
> status: open -> pending
>
> ___
> Python tracker 
> 
> ___
>

--
status: pending -> open

___
Python tracker 

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



[issue44760] Turtle Documentation - Contents Hyperlink conflict

2021-08-04 Thread Harry


Change by Harry :


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

___
Python tracker 

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



[issue44820] subprocess hungs when processing value from mariadb

2021-08-04 Thread Mark Dickinson


Mark Dickinson  added the comment:

Hi @jb. This tracker is for reporting bugs in the core Python language. While 
it's possible that what you're experiencing is due to a bug in core Python, on 
the information given it's likely that the problem is either in your own code, 
or in whatever database driver code you're using. In either case, I'm afraid 
this tracker is not the appropriate place to seek help.

For general debugging help, you could try any of the various dedicated Python 
groups and mailing lists (for example, discuss.python.org), or something like 
Stack Overflow. Be prepared to give details of exactly what you did, what you 
expected to happen, and what actually happened, along with code that will help 
others reproduce your issue.

I'm going to close here - currently, there's nothing useful that the Python 
core team can do with this report. The issue can be re-opened with more 
information after further investigation, if that investigation produces 
reasonable grounds to suspect a core Python bug.

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



[issue44611] CPython uses deprecated randomness API

2021-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for this change, I like the fact that hCryptProv variable could be 
removed!

--

___
Python tracker 

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



[issue44611] CPython uses deprecated randomness API

2021-08-04 Thread STINNER Victor


STINNER Victor  added the comment:

Would it be possible to document in os.urandom() documentation that the 
BCryptGenRandom() function is used on Windows with the "system-preferred random 
number generator algorithm"? (I don't think that we should mention the 
BCRYPT_USE_SYSTEM_PREFERRED_RNG constant.)

--
nosy: +vstinner

___
Python tracker 

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



[issue44829] zoneinfo.ZoneInfo does not check for Windows device names

2021-08-04 Thread apple502j


New submission from apple502j :

Note: this issue was submitted to security@ due to its potential as a DoS 
vector on 2021-05-08, but I have not received a response (excluding the 
automated email). It is over 88 days since the report, so I am now reporting 
this publicly.

Issue: zoneinfo.ZoneInfo does not check for Windows device names on Windows. 
For example, a timezone "NUL" do not raise ZoneInfoNotFoundError; instead, it 
raises ValueError ("Invalid TZif file: magic not found").

If the timezone passed is "CON", then the program would read the content from 
stdin, and parse it as tzdata file.

This can be abused for a DoS attack for programs that call ZoneInfo with 
untrusted timezone; for example, since reading CON is a blocking operation in 
the asyncio world, a web server that calls ZoneInfo with untrusted timezone 
input would stop its job and no future connections will succeed.

Note that this bug only occurs on Windows for obvious reasons.

Repro case:
>>> from zoneinfo import ZoneInfo
>>> ZoneInfo("CON")

This is related to bpo-41530 where timezone __init__.py does not raise 
ZoneInfoNotFoundError.

And finally, this happens with other file-based operations (and they are 
probably intentional); however, zoneinfo is designed to be secure by default, 
for example by disallowing path traversals. The interactions with Windows 
device names are not documented at all in the references. It's a common 
practice to let the users choose their preferred timezone in web applications, 
and such programs are expected to call ZoneInfo constructor with externally 
provided string. Timezone calculation should never cause a web server to stop 
to read stdin.

--
components: Library (Lib)
messages: 398900
nosy: apple502j
priority: normal
severity: normal
status: open
title: zoneinfo.ZoneInfo does not check for Windows device names
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue44760] Turtle Documentation - Contents Hyperlink conflict

2021-08-04 Thread Harry


Harry  added the comment:

The conflict comes from the fact that the documentation is written from the 
perspective of the procedure-oriented interface

"All methods of TurtleScreen/Screen also exist as functions, i.e. as part of 
the procedure-oriented interface"

The conflict in the documentation comes from the fact that there is a conflict 
in the code as-well. The way the conflict is resolved in the code is that:

"This TurtleScreen method is available as a global function only under the name 
clearscreen. The global function clear is a different one derived from the 
Turtle method clear."

I propose that we noindex the TurtleScreen.clear() method, and index the 
Turtle.clear() method instead which more accurately reflects the behaviour of 
the turtle module itself. A link to the TurtleScreen.clear() method will still 
be available through its alias TurtleScreen.clearscreen().

--
nosy: +Harry-Lees

___
Python tracker 

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



[issue44827] Incomplete 3.10.0rc1 release info

2021-08-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yeah, there is CDN in front and it has to get invalidated when we update it

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



[issue44827] Incomplete 3.10.0rc1 release info

2021-08-04 Thread PEW's Corner


PEW's Corner  added the comment:

It was probably a caching issue, because another device was just now still 
displaying the page without files until I forced a refresh.

--

___
Python tracker 

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



[issue42524] [doc] pdb access to return value

2021-08-04 Thread Irit Katriel


Irit Katriel  added the comment:

Yes, exactly - to update the doc so that the next person who needs it will 
easily find a way to do it (which was not available to you when you created 
this issue).

The test should assert that what the doc says, so that if someone breaks 
documented functionality we will immediately know.

Your point about accessing __return__ directly from the prompt is interesting - 
sure, if that works just document that and make sure the test fails if we make 
a change that breaks it.

--

___
Python tracker 

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



[issue44050] [subinterpreters] _PyImport_FixupExtensionObject() regression in Python 3.9

2021-08-04 Thread Trygve Aaberge


Trygve Aaberge  added the comment:

@jack__d: If you're just getting "no data" once and nothing else, the test 
isn't working correctly. You should get "no data" twice when it works correctly 
and the issue is fixed, or "unknown error" and some other info if the issue is 
present. I'm not sure why it doesn't work for you though.

I tried it with Python 3.9.6 now, and I'm still seeing the issue, with the same 
output as in my original post (apart from a newline between "no data" and 
"unknown error", and a different line number and id numbers).

--

___
Python tracker 

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



[issue42524] [doc] pdb access to return value

2021-08-04 Thread Romuald Brunet


Romuald Brunet  added the comment:

I'm not sure I follow.

You wish to "simply" update the doc? (and not update the retval to allow 
storing it into a varible. I'm OK with that)


But if we choose this, I'm not sure what needs changing in the doctests :-?


Another interrogation: is the use locals() really necessary? I can see that I 
can simply use `__return__` to access the return object.
Is there a reason to access it via locals() inside pdb?

--

___
Python tracker 

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



  1   2   >