[issue40479] Port _hashlib to OpenSSL 3.0.0

2022-02-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29356
pull_request: https://github.com/python/cpython/pull/31184

___
Python tracker 

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



[issue40479] Port _hashlib to OpenSSL 3.0.0

2022-02-06 Thread miss-islington


miss-islington  added the comment:


New changeset 59e004af63742361b67d1e1ae70229ff0db1059d by Zackery Spytz in 
branch 'main':
bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)
https://github.com/python/cpython/commit/59e004af63742361b67d1e1ae70229ff0db1059d


--

___
Python tracker 

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



[issue40479] Port _hashlib to OpenSSL 3.0.0

2022-02-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29355
pull_request: https://github.com/python/cpython/pull/31183

___
Python tracker 

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



[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na


Change by Dong-hee Na :


--
resolution: wont fix -> 
status: closed -> open

___
Python tracker 

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



[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na


Change by Dong-hee Na :


--
stage: resolved -> patch review

___
Python tracker 

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



[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na


Dong-hee Na  added the comment:

With v3 benchmark

Mean +- std dev: [base] 1.32 us +- 0.02 us -> [opt] 1.18 us +- 0.02 us: 1.13x 
faster

--

___
Python tracker 

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



[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na


Change by Dong-hee Na :


Added file: https://bugs.python.org/file50610/bench_callback_v3.py

___
Python tracker 

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



[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread hydroflask


hydroflask  added the comment:

Vanilla bench_callback_v2.py, not compiled with mypyc:

$ env/bin/python bench_callback_v2.py
1.114047016017139
$ env2/bin/python bench_callback_v2.py
0.9644024870358407

~13% reduction in runtime. Nice job!

--

___
Python tracker 

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



[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na


Dong-hee Na  added the comment:

@hydroflask

Would you like to run your benchmark with my latest PR?

--

___
Python tracker 

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



[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na


Dong-hee Na  added the comment:

@vstinner

I got a similar result from hydroflask's benchmark.
I think that is worth reopening this issue WDYT?

--
nosy: +erlendaasland, vstinner

___
Python tracker 

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



[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread hydroflask


hydroflask  added the comment:

Okay I put together a benchmark that better exemplifies my use case and results 
are in favor of adding patch.

When bench_callback_v2.py is not compiled with mypyc I see a ~10% reduction in 
runtime:

$ unpatched-env/bin/python bench_callback_v2.py
1.1262263769749552
$ patched-env/bin/python bench_callback_v2.py
1.0174838998354971

When bench_callback_v2.py is compiled with mypyc, I am getting ~6% reduction in 
runtime:

$ unpatched-env/bin/python -c "import bench_callback_v2"
1.0056699379347265
$ patched-env/bin/python -c "import bench_callback_v2"
0.9415687420405447

bench_callback_v2.py is attached.

--
Added file: https://bugs.python.org/file50609/bench_callback_v2.py

___
Python tracker 

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



[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-06 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
pull_requests: +29354
pull_request: https://github.com/python/cpython/pull/31182

___
Python tracker 

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



[issue46672] NameError in asyncio.gather when passing a invalid type as an arg with multiple awaitables

2022-02-06 Thread arl


New submission from arl :

It is possible to cause a NameError in asyncio.gather if the second presumed 
coroutine fails the internal type check.


Sample code:

import asyncio
async def main():
coros = (asyncio.sleep(1), {1: 1})
await asyncio.gather(*coros)
asyncio.run(main())



Exception in callback gather.._done_callback(>) at /usr/local/lib/python3.10/asyncio/tasks.py:714
handle: ._done_callback(>) 
at /usr/local/lib/python3.10/asyncio/tasks.py:714>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in 
run_until_complete
return future.result()
  File "", line 4, in main
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 775, in gather
if arg not in arg_to_fut:
TypeError: unhashable type: 'dict'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 718, in _done_callback
if outer.done():
NameError: free variable 'outer' referenced before assignment in enclosing scope
Traceback (most recent call last):
  File "", line 5, in 
  File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in 
run_until_complete
return future.result()
  File "", line 4, in main
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 775, in gather
if arg not in arg_to_fut:
TypeError: unhashable type: 'dict'

--
components: asyncio
messages: 412709
nosy: asvetlov, onerandomusername, yselivanov
priority: normal
severity: normal
status: open
title: NameError in asyncio.gather when passing a invalid type as an arg with 
multiple awaitables
versions: Python 3.10

___
Python tracker 

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



[issue46666] IDLE Add indent guide

2022-02-06 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

'│' is a bit taller that ascii bar '|'; hex(ord('│')) = '0x2502'.   It is a bit 
heavy.  In this Windows Firefox box it is slightly lighter than | but in IDLE 
with Source Code Pro, it is slightly darder.  Worse is being centered instead 
of on one edge.

We would have to check it with multiple fixed-ascii-pitch fonts on multiple 
systems before using any non-ascii char.  Does it always have the exact width 
of ascii ' ' or easier to check, ascii '|', so that is does not change the 
indent?   This is easily tested in the Settings dialog Font tab sample box.  
Paste the following
│││
|||
It passes with all but one of the Windows mono fonts I tried.

I may ask a tk/tkinter question on SO about other possible options.  Testing 
this one in code:

if a:  # Put 1st bar on 4th space.
if b:
   │if c:
   │   │pass
if d:
   │pass

if a: # Put 1st bar on 5th space.
if b:
│   if c:
│   │   pass
if d:
│   pass

if a: # Put 1st bar on 1st space.
│   if b:
│   │   if c:
│   │   │   pass
│   if d:
│   │   pass

The 2nd option looks best to me.  The 3rd would be easier to program, as 
default tab indent would always be '│   '.  In any case, copied code would not 
be runnable code.  I would add this on the Option menu between Code Context and 
Line Numbers.

I believe only updating the markers on demand would be much easier to program 
than dynamically updating them with each keystroke (checking key and whether 
whitespace in indent area).

Before merging a PR (writen by someone else), someone other than me, such as 
Raymond, must test it in real use both for correctness, usefulness, and 
aesthetics.  (I anticipate that I would fail it on the latter two.)

--

___
Python tracker 

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



[issue46666] IDLE Add indent guide

2022-02-06 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

If this were possible, it would be really nice to have.

FWIW, the rich¹ project was able to pull this off in regular text terminal 
window:

$ python3.10 -m pip install rich
$ python3.10 -m rich.pretty
{
│   'foo': [1, 'Hello World!', 100.123, 323.232, 432324.0, {(1, 2, 3, 4), 5, 6, 
7, 8}, ...],
│   'bar': frozenset({1, 2, 3}),
│   'defaultdict': defaultdict(, {'crumble': ['apple', 'rhubarb', 
'butter', 'sugar', 'flour']}),
│   'counter': Counter({'apple': 1, 'orange': 1, 'pear': 1, 'kumquat': 2, 
'duriandurianduriandu'+580: 1}),
│   'atomic': (False, True, None),
│   'Broken': 
}


¹ https://rich.readthedocs.io/en/stable/index.html

--
nosy: +rhettinger

___
Python tracker 

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



[issue46666] IDLE Add indent guide

2022-02-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I loaded a .py file into N++ and see them.  Under 3 x, there are clearly 
separate minidots.  Under 10x, the dots are hardly visible.  They are not 
characters in the text (cannot be copied) but a special manipulation of the 
column of pixels 'between' spaces.  This must be a built-in feature of to the 
text widget.  I suspect it involves special subpixel manipulation, perhaps 
requiring information from the monitor.  AFAIK, Tk widgets do not have this 
feature.  Unless there is a unicode char consisting of light dots on the very 
edge, we cannot even simulate this.

--

___
Python tracker 

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



[issue45955] Calling read() on HTTPError may cause KeyError in tempfile

2022-02-06 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue43882] [security] CVE-2022-0391: urllib.parse should sanitize urls containing ASCII newline and tabs.

2022-02-06 Thread Mike Lissner


Mike Lissner  added the comment:

Looks like that CVE isn't public yet.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0391

Any chance I can get access (I originally reported this vuln.). My email is 
m...@free.law, if it's possible and my email is needed.

Thanks!

--

___
Python tracker 

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



[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

2022-02-06 Thread Guido van Rossum


Guido van Rossum  added the comment:

Super subtle stuff. Tonight I do not have time to really dive into this, but I 
think Serhiy is on to something. KJ or Jelle, do you have the guts to dive in 
here?

--

___
Python tracker 

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



[issue46589] Improve documentation for typing._GenericAlias

2022-02-06 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset a335d98f19b7fa66159d12932cc9a05eb2d8395f by Matthew Rahtz in 
branch 'main':
bpo-46589: Improve documentation for typing._GenericAlias (GH-31026)
https://github.com/python/cpython/commit/a335d98f19b7fa66159d12932cc9a05eb2d8395f


--

___
Python tracker 

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



[issue46666] IDLE Add indent guide

2022-02-06 Thread primexx


primexx  added the comment:

> Please just select the current development version.  Others can be marked if 
> and when backported

oh sorry about  that!

> Please explain exactly what you want

these dotted lines in the attached screenshot

> What you see in the editor is what is saved (including when running), so any 
> non-code additions have to be removed first.

yes, this would be a pure visual element in the editor, not modifying the 
actual code

> IDLE's code context feature (Options menu) could be considered an indent 
> guide.  In some ways, it is better.

it is very useful indeed, but not quite the same as a persistent visual 
indicator imho

thanks!

--
Added file: https://bugs.python.org/file50608/npp-indent-guide.png

___
Python tracker 

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



[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-06 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 067c03bf40d13393209f0138fa9c4d5980c4ff8a by Nikita Sobolev in 
branch 'main':
bpo-46611: add coverage to instance and class checks in `typing.py` (GH-31078)
https://github.com/python/cpython/commit/067c03bf40d13393209f0138fa9c4d5980c4ff8a


--

___
Python tracker 

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



[issue46665] IDLE Windows shortcuts by default

2022-02-06 Thread primexx


primexx  added the comment:

> I wish it were otherwise, but configuration defaults cannot be changed as 
> some people would not like it and it would badly interact with custom 
> configurations.

that is a good point. perhaps just adding alternate keysets. this is clearly 
not a high priority issue since it can be changed manually.

> Do you have any documentation for you claims?

for redo: 
https://support.microsoft.com/en-us/windows/keyboard-shortcuts-in-windows-dcc61a57-8ff0-cffe-9796-cb9706c75eec

shift + tab does a lot of different things depending on context (e.g. the link 
above, and there are 3 documented behaviour in word alone 
https://support.microsoft.com/en-us/office/keyboard-shortcuts-in-word-95ef89dd-7142-4b50-afb2-f762f663ceb2).
 however, i just tried and it does de-indent in word 365 with just a simple 
text selection (i.e. plain paragraph, not inside tables, etc.). also tried the 
same thing in google docs and it also de-indents text selection. i think you 
could be correct that  this is not actually windows specific, it does seem to 
be fairly common behaviour in the context of text editors anyway.

> Ctrl+y is *not* recognized in Notepad.

yeah notepad is all sorts of messed up. it does not have the usual ctrl+z 
behaviour either.

--

___
Python tracker 

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



[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na


Dong-hee Na  added the comment:

@hydroflask

I am one of the big fans of applying vectorcall :)

> The benchmark you did is not reflective of my use-case. I have a codebase 
> that I have completely converted into a C extension using mypyc.

Can you provide me a minimal benchmarkable script(if you need to include mypyc 
it's okay) to persuade other core dev?

--

___
Python tracker 

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



[issue46671] "ValueError: min() arg is an empty sequence" is wrong (builtins.min/max)

2022-02-06 Thread Nnarol


Change by Nnarol :


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

___
Python tracker 

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



[issue46666] IDLE Add indent guide

2022-02-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

[Please just select the current development version.  Others can be marked if 
and when backported.  3.8 and before only get security fixes.  Same for 3.9 
after about next May 31.]

Please explain exactly what you want and rewrite something like the following.
if a:
if b:
if c:
pass
if d:
pass

IDLE's code context feature (Options menu) could be considered an indent guide. 
 In some ways, it is better.


What you see in the editor is what is saved (including when running), so any 
non-code additions have to be removed first.

--
stage:  -> test needed
title: IDLE indent guide -> IDLE Add indent guide
type:  -> enhancement
versions:  -Python 3.10, 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



[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b556f53785cb9ad8cc088ad8c10efee91fe3da58 by Victor Stinner in 
branch 'main':
bpo-46670: Test if a macro is defined, not its value (GH-31178)
https://github.com/python/cpython/commit/b556f53785cb9ad8cc088ad8c10efee91fe3da58


--

___
Python tracker 

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



[issue46671] "ValueError: min() arg is an empty sequence" is wrong (builtins.min/max)

2022-02-06 Thread Nnarol


Change by Nnarol :


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

___
Python tracker 

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



[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29351
pull_request: https://github.com/python/cpython/pull/31180

___
Python tracker 

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



[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 097f74a5a37e2a8a26d529cede456ede7011b66f by Victor Stinner in 
branch 'main':
bpo-46670: Define all macros for stringlib (GH-31176)
https://github.com/python/cpython/commit/097f74a5a37e2a8a26d529cede456ede7011b66f


--

___
Python tracker 

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



[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 16f96a4cf9ab1e91e6e8e18232378bc4b42bb796 by Victor Stinner in 
branch 'main':
bpo-46670: Remove unused get_frame_state() function (GH-31177)
https://github.com/python/cpython/commit/16f96a4cf9ab1e91e6e8e18232378bc4b42bb796


--

___
Python tracker 

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



[issue46671] "ValueError: min() arg is an empty sequence" is wrong (builtins.min/max)

2022-02-06 Thread Nnarol


New submission from Nnarol :

Incorrect error message by min_max(): "ValueError: min() arg is an empty 
sequence" when using the form

min(iterable, *[, default=obj, key=func]) -> value

and "iterable" is empty, like so:

min([])

or:

min(set())

"Sequence" is referred to, even though the function accepts any iterable. E.g. 
if a different type of collection, such as a set was provided by the user, 
"sequence" is still printed.

I propose to rephrase the error to "iterable argument is empty", to reflect 
actual behavior and be in line with the function's documented interface.

"arg" also does not name either any specific variable in C code or a parameter 
in user-facing documentation. Such an abbreviation is not used by the 
function's other error messages either, which simply write "argument" or 
"arguments" in free text, as appropriate in the given context.

Unlike for the error "max expected at least 1 argument, got 0", the above 
scenario's test does not include matching of the error string. This is probably 
the reason this was not noticed before. It would be nice to make the test more 
specific.

The issue seems trivial, but I am not familiar with the CPython project's 
policy on whether to treat messages of errors, printed on stderr as an 
interface, in which case, the change would be backwards-incompatible.
Definitely a decision to be made.

--
components: Library (Lib)
messages: 412694
nosy: Nnarol
priority: normal
severity: normal
status: open
title: "ValueError: min() arg is an empty sequence" is wrong (builtins.min/max)
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue46665] IDLE Windows shortcuts by default

2022-02-06 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I wish it were otherwise, but configuration defaults cannot be changed as some 
people would not like it and it would badly interact with custom 
configurations.  We can add new themes and keysets, but that should be very 
rare.  We can consider adding bindings, though clashes with customizations are 
possible.

Do you have any documentation for you claims?  My impression is that Microsoft 
occasionally makes UI changes, so that 'Microsoft Standard' is a bit of a joke. 
 Maybe keys are an exception.

Ctrl+y is *not* recognized in Notepad.  ctrl+shift+z acts the same as ctrl_z.  
Notepad++ recognizes both and lists both for Dedent in its
Scintilla mapper.  If it is not in use in the Windows keyset, adding it could 
be considered.

Before the first character on a line, in the absence of a selection, tab and 
backspace indent and dedent.  When there is a selection, tab and ctrl-] indent 
the selections and ctrl-[ dedents.  Shift-tab acts the same as tab.  I believe 
that tk, at least on Windows, does not recognize shift-tab as different from 
tab.  I know that this is true for some named keys, such as Enter.  (This stuff 
needs to be documented.)  Shift-tab works as you (and I) want in Notepad++, so 
this is not a Windows issue.

--
stage:  -> needs patch
type:  -> enhancement
versions:  -Python 3.10, 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



[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread hydroflask


hydroflask  added the comment:

@corona10

Thank you for looking into it.

The benchmark you did is not reflective of my use-case. I have a codebase that 
I have completely converted into a C extension using mypyc. So the ctypes 
callback does not call into interpreted Python code but actually another 
C-extension. I have annotated types aggressively to avoid invoking malloc(). In 
this use-case the extra overhead from the tuple allocation would be significant.

Additionally your benchmark may not be as micro as intended. You call some math 
in the callback function which may have made the savings from avoiding the 
tuple allocation seem more like noise.

Since you already did the work I still think it's worth putting it in since 
PyObject_Vectorcall is an established API and it would have been used anyway if 
this were written from scratch.

--

___
Python tracker 

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



[issue46668] encodings: the "mbcs" alias doesn't work

2022-02-06 Thread Eryk Sun


Eryk Sun  added the comment:

> The Python 3.6 and 3.7 "codecs.register(_alias_mbcs)" doesn't work 
> because "search_function()" is tested before and it works for "cpXXX" 
> encodings.

Isn't the 3.6-3.10 ordering of search_function() and _alias_mbcs() correct as a 
fallback? In this case, Python doesn't support a cross-platform encoding for 
the code page. That's why the old implementation of test_mbcs_alias() mocked 
_winapi.GetACP() to return 123 and then checked that looking up 'cp123' 
returned the "mbcs" codec.

I'd actually prefer to extend this by implementing _winapi.GetOEMCP() and using 
"oem" as a fallback for that case.

--
nosy: +eryksun

___
Python tracker 

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



[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29350
pull_request: https://github.com/python/cpython/pull/31179

___
Python tracker 

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



[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29349
pull_request: https://github.com/python/cpython/pull/31178

___
Python tracker 

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



[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29348
pull_request: https://github.com/python/cpython/pull/31177

___
Python tracker 

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



[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor


New submission from STINNER Victor :

Building Python with "gcc -Wundef" emits many warnings about usage of undefined 
macros. If a macro is not defined, it is equal to 0.

The problem is that a macro can be undefined because of a missing #include, or 
because of a typo in its name, or because "#ifdef MACRO" should be used instead 
of "#if MACRO". It can hide bugs.

I plan to fix these warnings.

--
components: Build
messages: 412690
nosy: vstinner
priority: normal
severity: normal
status: open
title: Build Python with -Wundef: don't use undefined macros
versions: Python 3.11

___
Python tracker 

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



[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na


Dong-hee Na  added the comment:

@hydroflask

It does not show impressive performance enhancement, so I decided not to change 
it
See PR 31138

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



[issue43882] [security] CVE-2022-0391: urllib.parse should sanitize urls containing ASCII newline and tabs.

2022-02-06 Thread STINNER Victor


STINNER Victor  added the comment:

CVE-2022-0391 has been assigned to this vulnerability.

--
nosy: +vstinner
title: [security] urllib.parse should sanitize urls containing ASCII newline 
and tabs. -> [security] CVE-2022-0391: urllib.parse should sanitize urls 
containing ASCII newline and tabs.

___
Python tracker 

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



[issue46655] typing.TypeAlias is not in the list of allowed plain _SpecialForm typeforms

2022-02-06 Thread Gregory Beauregard


Change by Gregory Beauregard :


--
pull_requests: +29346
pull_request: https://github.com/python/cpython/pull/31175

___
Python tracker 

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



[issue46648] `test.test_urllib2.MiscTests.test_issue16464` flaky due to external connection

2022-02-06 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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-06 Thread STINNER Victor


STINNER Victor  added the comment:

> New changeset 04dd60e50cd3da48fd19cdab4c0e4cc600d6af30 by Victor Stinner in 
> branch 'main':
> bpo-46659: Update the test on the mbcs codec alias (GH-31168)

This change is not correct, I created bpo-46668 to fix it.

--

___
Python tracker 

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



[issue46668] encodings: the "mbcs" alias doesn't work

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue46655] typing.TypeAlias is not in the list of allowed plain _SpecialForm typeforms

2022-02-06 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 77b025be4a4cd5a3bfc1b1af560cc57e8e956c98 by Gregory Beauregard in 
branch 'main':
bpo-46655: allow stringized TypeAlias with get_type_hints (GH-31156)
https://github.com/python/cpython/commit/77b025be4a4cd5a3bfc1b1af560cc57e8e956c98


--

___
Python tracker 

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



[issue46655] typing.TypeAlias is not in the list of allowed plain _SpecialForm typeforms

2022-02-06 Thread Guido van Rossum


Guido van Rossum  added the comment:

Looks like the more likely use case would be PEP 563:

from __future__ import annotations
from typing import TypeAlias, get_type_hints

import typing

class C:
a: TypeAlias = int

print(get_type_hints(C))


This prints

Traceback (most recent call last):
  File "C:\Users\gvanrossum\cpython\t.py", line 9, in 
print(get_type_hints(C))
  File 
"C:\Users\gvanrossum\AppData\Local\Programs\Python\Python310\lib\typing.py", 
line 1808, in get_type_hints
value = _eval_type(value, base_globals, base_locals)
  File 
"C:\Users\gvanrossum\AppData\Local\Programs\Python\Python310\lib\typing.py", 
line 326, in _eval_type
return t._evaluate(globalns, localns, recursive_guard)
  File 
"C:\Users\gvanrossum\AppData\Local\Programs\Python\Python310\lib\typing.py", 
line 690, in _evaluate
type_ = _type_check(
  File 
"C:\Users\gvanrossum\AppData\Local\Programs\Python\Python310\lib\typing.py", 
line 171, in _type_check
raise TypeError(f"Plain {arg} is not valid as type argument")

--
nosy: +gvanrossum

___
Python tracker 

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



[issue46669] Add types.Self

2022-02-06 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

PEP 673 (which was accepted) adds typing.Self already. bpo-46534 tracks 
implementing it.

--

___
Python tracker 

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



[issue46668] encodings: the "mbcs" alias doesn't work

2022-02-06 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3.11 supports the 40 code pages:

* 037
* 273
* 424
* 437
* 500
* 720
* 737
* 775
* 850
* 852
* 855
* 856
* 857
* 858
* 860
* 861
* 862
* 863
* 864
* 865
* 866
* 869
* 874
* 875
* 932
* 949
* 950
* 1006
* 1026
* 1125
* 1140
* 1250
* 1251
* 1252
* 1253
* 1254
* 1255
* 1256
* 1257
* 1258

--

___
Python tracker 

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



[issue46669] Add types.Self

2022-02-06 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Typeshed now has a nice self-describing type variable to annotate context 
managers:

Self = TypeVar('Self')

def __enter__(self: Self) -> Self:
return self

It would be nice to have that in the standard library types module as well.

--
messages: 412682
nosy: Jelle Zijlstra, gvanrossum, rhettinger
priority: normal
severity: normal
status: open
title: Add types.Self
versions: Python 3.11

___
Python tracker 

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



[issue46661] Duplicat deprecation warnings in docs for asyncio

2022-02-06 Thread Guido van Rossum


Guido van Rossum  added the comment:

Kumar are you interested in fixing this?

--

___
Python tracker 

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



[issue46668] encodings: the "mbcs" alias doesn't work

2022-02-06 Thread STINNER Victor

STINNER Victor  added the comment:

The alias was created in 2003 to fix bpo-671666:
---
commit 4eab486476c0082087a8460a5ab1064e64cc1a6b
Author: Martin v. Löwis 
Date:   Mon Mar 3 09:34:01 2003 +

Patch #671666: Alias ANSI code page to "mbcs".
---

In 2003, bpo-671666 was created because Python didn't support "cp932" encoding, 
whereas the MBCS codec was available and could used directly since cp932 was 
the ANSI code page.

The alias allows to support the ANSI code 932 without implement it.

But Python got a "cp932" codec the year after:
---
commit 3e2a30692085d32ac63f72b35da39158a471fc68
Author: Hye-Shik Chang 
Date:   Sat Jan 17 14:29:29 2004 +

Add CJK codecs support as discussed on python-dev. (SF #873597)

Several style fixes are suggested by Martin v. Loewis and
Marc-Andre Lemburg. Thanks!
---

--

___
Python tracker 

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



[issue46657] Add mimalloc memory allocator

2022-02-06 Thread Christian Heimes


Christian Heimes  added the comment:

We have an autoconf check for stdatomic.h. The test even verifies that a 
program with atomic_load_explicit() compiles and links.

How do we want to use mimalloc in the future? Is it going to stay optional in 
3.12? Then the default setting for --with-mimalloc should depend on presence of 
stdatomic.h. Do we want to make it mandatory for GC heap walking and nogil? 
Then --with-mimalloc should default to "yes" and configure should abort when 
stdatomic.h is missing.

I'm leaning towards --with-mimalloc=yes. It will make users aware that they 
need a compiler with atomics:

configure: error: --with-mimalloc requires stdatomic.h. Update your compiler or 
rebuild with --without-mimalloc. Python 3.12 will require stdatomic.

--

___
Python tracker 

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



[issue46668] encodings: the "mbcs" alias doesn't work

2022-02-06 Thread STINNER Victor

New submission from STINNER Victor :

While working on bpo-46659, I found a bug in the encodings "mbcs" alias. Even 
if the function has 2 tests (in test_codecs and test_site), both tests missed 
the bug :-(

I fixed the alias with this change:
---
commit 04dd60e50cd3da48fd19cdab4c0e4cc600d6af30
Author: Victor Stinner 
Date:   Sun Feb 6 21:50:09 2022 +0100

bpo-46659: Update the test on the mbcs codec alias (GH-31168)

encodings registers the _alias_mbcs() codec search function before
the search_function() codec search function. Previously, the
_alias_mbcs() was never used.

Fix the test_codecs.test_mbcs_alias() test: use the current ANSI code
page, not a fake ANSI code page number.

Remove the test_site.test_aliasing_mbcs() test: the alias is now
implemented in the encodings module, no longer in the site module.
---

But Eryk found two bugs:

"""


This was never true before. With 1252 as my ANSI code page, I checked 
codecs.lookup('cp1252') in 2.7, 3.4, 3.5, 3.6, 3.9, and 3.10, and none of them 
return the "mbcs" encoding. It's not equivalent, and not supposed to be. The 
implementation of "cp1252" should be cross-platform, regardless of whether 
we're on a Windows system with 1252 as the ANSI code page, as opposed to a 
Windows system with some other ANSI code page, or a Linux or macOS system.

The differences are that "mbcs" maps every byte, whereas our code-page 
encodings do not map undefined bytes, and the "replace" handler of "mbcs" uses 
a best-fit mapping (e.g. "α" -> "a") when encoding text, instead of mapping all 
undefined characters to "?".
"""

and my new test fails if PYTHONUTF8=1 env var is set:

"""
This will fail if PYTHONUTF8 is set in the environment, because it overrides 
getpreferredencoding(False) and _get_locale_encoding().
"""

The code for the "mbcs" alias changed at lot between Python 3.5 and 3.7.

In Python 3.5, site module:
---
def aliasmbcs():
"""On Windows, some default encodings are not provided by Python,
while they are always available as "mbcs" in each locale. Make
them usable by aliasing to "mbcs" in such a case."""
if sys.platform == 'win32':
import _bootlocale, codecs
enc = _bootlocale.getpreferredencoding(False)
if enc.startswith('cp'):# "cp***" ?
try:
codecs.lookup(enc)
except LookupError:
import encodings
encodings._cache[enc] = encodings._unknown
encodings.aliases.aliases[enc] = 'mbcs'
---

In Python 3.6, encodings module:
---
(...)
codecs.register(search_function)

if sys.platform == 'win32':
def _alias_mbcs(encoding):
try:
import _bootlocale
if encoding == _bootlocale.getpreferredencoding(False):
import encodings.mbcs
return encodings.mbcs.getregentry()
except ImportError:
# Imports may fail while we are shutting down
pass

codecs.register(_alias_mbcs)
---

Python 3.7, encodings module:
---
(...)
codecs.register(search_function)

if sys.platform == 'win32':
def _alias_mbcs(encoding):
try:
import _winapi
ansi_code_page = "cp%s" % _winapi.GetACP()
if encoding == ansi_code_page:
import encodings.mbcs
return encodings.mbcs.getregentry()
except ImportError:
# Imports may fail while we are shutting down
pass

codecs.register(_alias_mbcs)
---

The Python 3.6 and 3.7 "codecs.register(_alias_mbcs)" doesn't work because 
"search_function()" is tested before and it works for "cpXXX" encodings. My 
changes changes the order in which codecs search functions are registered: 
first the MBCS alias, then the encodings search_function().

In Python 3.5, the alias was only created if Python didn't support the code 
page.

--
components: Library (Lib)
messages: 412678
nosy: vstinner
priority: normal
severity: normal
status: open
title: encodings: the "mbcs" alias doesn't work
versions: Python 3.11

___
Python tracker 

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



[issue46644] typing: remove callable() check from typing._type_check

2022-02-06 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue46667] SequenceMatcher & autojunk - false negative

2022-02-06 Thread Tim Peters


Tim Peters  added the comment:

SequenceMatcher looks for the longest _contiguous_ match. "UNIQUESTRING" isn't 
the longest by far when autojunk is False, but is the longest when autojunk is 
True. All those bpopular characters then effectively prevent finding a longer 
match than 'QUESTR' (capital 'I" is also in bpopular) directly.

The effects of autojunk can be surprising, and it would have been better if it 
were False by default. But I don't see anything unexpected here. Learn from 
experience and force it to False yourself ;-) BTW, it was introduced as a way 
to greatly speed comparing files of code, viewing them as sequences of lines. 
In that context, autojunk is rarely surprising and usually helpful. But it more 
often backfires when comparing strings (viewed as sequences of characters) :-(

--
nosy: +tim.peters

___
Python tracker 

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



[issue46654] urllib.request.urlopen doesn't handle UNC paths produced by pathlib's as_uri() (but can handle UNC paths with additional slashes)

2022-02-06 Thread Eryk Sun


Change by Eryk Sun :


--
assignee: docs@python -> 
components:  -2to3 (2.x to 3.x conversion tool), Argument Clinic, Build, C API, 
Cross-Build, Demos and Tools, Distutils, Documentation, Extension Modules, 
FreeBSD, IDLE, IO, Installation, Interpreter Core, Parser, Regular Expressions, 
SSL, Subinterpreters, Tests, Tkinter, Unicode, Windows, XML, asyncio, ctypes, 
email, macOS
stage:  -> needs patch
type: performance -> behavior
versions:  -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



[issue46667] SequenceMatcher & autojunk - false negative

2022-02-06 Thread Jonathan


Jonathan  added the comment:

Gah. I mean 0.008 in both directions. I'm just going to be quiet now. :-)

--

___
Python tracker 

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



[issue46667] SequenceMatcher & autojunk - false negative

2022-02-06 Thread Jonathan


Jonathan  added the comment:

(Like the idiot I am, the example code is wrong. `autojunk` parameter should 
*not* be set for either of them to get the stated wrong results).

In place of "UNIQUESTRING", any unique 3 character string triggers it (QQQ, 
EEE, ZQU...). And in those cases you get a ratio of 0.008! (and 0.993 in the 
other direction!)

--

___
Python tracker 

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



[issue46648] `test.test_urllib2.MiscTests.test_issue16464` flaky due to external connection

2022-02-06 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

The merged PRs disable the test without anything tracking fixing or 
re-re-enabling it.  Reopening & retitling this issue.

This specific test does not need to use an external server. That has nothing to 
do with what the purposes of the test is which is all around a content-length 
issue per https://bugs.python.org/issue16464

The appropriate fix is to have the test manage it's own http server on 
localhost in another thread or process.

We do not need to test it with https.

--
nosy: +gregory.p.smith
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open
title: `test.test_urllib2.MiscTests.test_issue16464` started to fail -> 
`test.test_urllib2.MiscTests.test_issue16464` flaky due to external connection
versions: +Python 3.10, 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



[issue46667] SequenceMatcher & autojunk - false negative

2022-02-06 Thread Jonathan


New submission from Jonathan :

The following two strings are identical other than the text "UNIQUESTRING".
UNIQUESTRING is at the start of first and at the end of second.
Running the below gives the following output:


0.99830220713073
0.99830220713073
0.023769100169779286  # ratio

0.99830220713073
0.99830220713073
0.023769100169779286  # ratio

As you can see, Ratio is basically 0. Remove either of the UNIQUESTRING pieces 
and it goes up to 0.98 (correct)... Remove both and you get 1.0 (correct)


```
from difflib import SequenceMatcher

first = """
UNIQUESTRING
Lorem Ipsum is simply dummy text of the printing and typesetting industry. 
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, 
when an unknown printer took a galley of type and scrambled it to make a type 
specimen book. It has survived not only five centuries, but also the leap into 
electronic typesetting, remaining essentially unchanged. It was popularised in 
the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, 
and more recently with desktop publishing software like Aldus PageMaker 
including versions of Lorem Ipsum
"""


second = """

Lorem Ipsum is simply dummy text of the printing and typesetting industry. 
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, 
when an unknown printer took a galley of type and scrambled it to make a type 
specimen book. It has survived not only five centuries, but also the leap into 
electronic typesetting, remaining essentially unchanged. It was popularised in 
the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, 
and more recently with desktop publishing software like Aldus PageMaker 
including versions of Lorem Ipsum  UNIQUESTRING
"""

sm = SequenceMatcher(None, first, second, autojunk=False)
print(sm.real_quick_ratio())
print(sm.quick_ratio())
print(sm.ratio())

print()

sm2 = SequenceMatcher(None, second, first, autojunk=False)
print(sm2.real_quick_ratio())
print(sm2.quick_ratio())
print(sm2.ratio())

```

If I add `autojunk=False`, then I get a correct looking ratio (0.98...), 
however from my reading of the autojunk docs, UNIQUESTRING shouldn't be 
triggering it. Furthermore, looking in the code, as far as I can see autojunk 
is having no effect...

Autojunk considers these items to be "popular" in that string:
`{'n', 'p', 'a', 'h', 'e', 'u', 'I', 'r', 'k', 'g', 'y', 'm', 'c', 'd', 't', 
'l', 'o', 's', ' ', 'i'}`

If I remove UNIQUESTRING from `first`, this is the autojunk popular set:
`{'c', 'p', 'a', 'u', 'r', 'm', 'k', 'g', 'I', 'd', ' ', 'o', 'h', 't', 'e', 
'i', 'l', 's', 'y', 'n'}`

They're identical!

In both scenarios, `b2j` is also identical.

I don't pretend to understand what the module is doing in any detail, but this 
certainly seems like a false positive/negative.

Python 3.8.10

--
components: Library (Lib)
messages: 412673
nosy: jonathan-lp
priority: normal
severity: normal
status: open
title: SequenceMatcher & autojunk - false negative
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



[issue46666] IDLE indent guide

2022-02-06 Thread primexx


New submission from primexx :

Request: support indent guide for IDLE in editor window (i.e. not interactive 
shell)

there appears to not be currently support for indent guides in idle

one take is that idle is meant for small scripts and one should seek out a more 
complex IDE if it gets to the point of needing indent lines 
https://stackoverflow.com/q/66231105

i think that there would still be value in indent lines even in IDLE. it is a 
popular IDE for beginners and even in short scripts there can still be 
sufficiently large indented blocks, relatively speaking. it doesn't take that 
much code for indent guides to become helpful.

--
assignee: terry.reedy
components: IDLE
messages: 412672
nosy: primexx, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE indent guide
versions: Python 3.10, Python 3.11, 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



[issue46665] IDLE Windows shortcuts by default

2022-02-06 Thread primexx


New submission from primexx :

In IDLE on Windows, there are certain keyboard shortcut idiosycracies in the 
default configuration. 

For example,

redo is ctrl+shift+z (standard elsewhere) rather than ctrl+y (Microsoft's 
standard)

de-indenting is ctrl+[ rather than shift+tab (also affects multi-line selected 
behaviour)

Request: adjust the defaults based on OS platform and use windows style by 
default on windows

If this is a dupe I apologize. I tried to search for an existing issue but 
wasn't able to find any with the keywords i can think of

--
assignee: terry.reedy
components: IDLE
messages: 412671
nosy: primexx, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE Windows shortcuts by default
versions: Python 3.10, Python 3.11, 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



[issue46664] PY_SSIZE_T_MAX is not an integer constant expression

2022-02-06 Thread ov2k


Change by ov2k :


--
type: compile error -> enhancement

___
Python tracker 

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



[issue46664] PY_SSIZE_T_MAX is not an integer constant expression

2022-02-06 Thread ov2k


New submission from ov2k :

PY_SSIZE_T_MAX is currently defined in Include/pyport.h as: 

#define PY_SSIZE_T_MAX ((Py_ssize_t)(((size_t)-1)>>1))

This is not an integer constant expression, which means it can't be used in 
preprocessor conditionals.  For example: 

#if PY_SSIZE_T_MAX > UINT32_MAX

will fail to compile.  This was touched upon and ignored a long time ago: 

https://mail.python.org/archives/list/python-...@python.org/thread/27X7LINL4UO7DAJE6J3IFQEZGUKAO4VL/

I think the best fix is to move the definition of PY_SSIZE_T_MAX (and 
PY_SSIZE_T_MIN) next to the definition of Py_ssize_t, and use the proper 
corresponding limit macro.  If Py_ssize_t is a typedef for ssize_t, then 
PY_SSIZE_T_MAX should be SSIZE_MAX.  If Py_ssize_t is a typedef for 
Py_intptr_t, then PY_SSIZE_T_MAX should be INTPTR_MAX.  There's a minor 
complication because Py_ssize_t can be defined in PC/pyconfig.h.  I'm not so 
familiar with the various Windows compilers, so I'm not sure what's best to do 
here.  I think __int64 has a corresponding _I64_MAX macro, and int obviously 
has INT_MAX.

--
components: C API
messages: 412670
nosy: ov2k
priority: normal
severity: normal
status: open
title: PY_SSIZE_T_MAX is not an integer constant expression
type: compile error
versions: Python 3.10, Python 3.11, 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



[issue46657] Add mimalloc memory allocator

2022-02-06 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

Thanks, I'm indeed interested.  Most credit goes to Christian for advancing 
this.

For the missing stdatomic.h, would it be appropriate to have an autoconfig 
check for it?  Can just disable mimalloc if it doesn't exist.

--

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-06 Thread STINNER Victor


STINNER Victor  added the comment:

> Please see the discussion on https://bugs.python.org/issue43552: 
> locale.getpreferredencoding() needs to be deprecated as well. Instead we 
> should have a single locale.getencoding() as outlined there... perhaps in a 
> separate ticket ?! Thanks.

Yeah, I read this issue. But these things are too complicated :-) I prefer to 
move step by step.

Once locale.getencoding() (or a similar function) is added, we can update the 
deprecation message.

I hope to be able to deprecate getdefaultlocale() and to add such new function 
in Python 3.11.

--

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-06 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

> For these reasons, I propose to deprecate locale.getdefaultlocale(): 
> setlocale(), getpreferredencoding() and getlocale() should be used instead.

Please see the discussion on https://bugs.python.org/issue43552: 
locale.getpreferredencoding() needs to be deprecated as well. Instead we should 
have a single locale.getencoding() as outlined there... perhaps in a separate 
ticket ?! Thanks.

--
nosy: +lemburg

___
Python tracker 

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



[issue46648] `test.test_urllib2.MiscTests.test_issue16464` started to fail

2022-02-06 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29344
pull_request: https://github.com/python/cpython/pull/31173

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 06b8f1615b09099fae5c5393334b8716a4144d20 by Victor Stinner in 
branch 'main':
bpo-46659: test.support avoids locale.getdefaultlocale() (GH-31167)
https://github.com/python/cpython/commit/06b8f1615b09099fae5c5393334b8716a4144d20


--

___
Python tracker 

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



[issue29240] PEP 540: Add a new UTF-8 mode

2022-02-06 Thread STINNER Victor


STINNER Victor  added the comment:

> New changeset 91106cd9ff2f321c0f60fbaa09fd46c80aa5c266 by Victor Stinner in 
> branch 'master':
> bpo-29240: PEP 540: Add a new UTF-8 Mode (#855)
> https://github.com/python/cpython/commit/91106cd9ff2f321c0f60fbaa09fd46c80aa5c266

Oh, this change broke the mbcs alias on Windows and the test_codecs and 
test_site tests (2 tests!) missed the bug :-( I fixed it in:

New changeset 04dd60e50cd3da48fd19cdab4c0e4cc600d6af30 by Victor Stinner in 
branch 'main':
bpo-46659: Update the test on the mbcs codec alias (GH-31168)
https://github.com/python/cpython/commit/04dd60e50cd3da48fd19cdab4c0e4cc600d6af30

--

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 04dd60e50cd3da48fd19cdab4c0e4cc600d6af30 by Victor Stinner in 
branch 'main':
bpo-46659: Update the test on the mbcs codec alias (GH-31168)
https://github.com/python/cpython/commit/04dd60e50cd3da48fd19cdab4c0e4cc600d6af30


--

___
Python tracker 

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



[issue46663] test_math test_cmath test_complex fails on Fedora Rawhide buildbots

2022-02-06 Thread STINNER Victor


New submission from STINNER Victor :

PPC64LE Fedora Rawhide LTO 3.10:
https://buildbot.python.org/all/#/builders/674/builds/543

3 tests failed: test_cmath test_complex test_math

That's a GCC 12 regression: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104389

--
components: Tests
messages: 412663
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_math test_cmath test_complex fails on Fedora Rawhide buildbots
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



[issue46644] typing: remove callable() check from typing._type_check

2022-02-06 Thread Gregory Beauregard


Gregory Beauregard  added the comment:

I compiled your PR to run it and was testing in 3.10 as well, but I was testing 
in a file with from __future__ import annotations unintentionally. I retract 
the comment. It turns out `list[42]` is okay though, which I suppose is more 
relevant going forward. My confusion here is sort of the crux of my problem 
with these runtime checks: they are inconsistently applied in different 
locations which is why callable() was causing a lot of bugs.

--

___
Python tracker 

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



[issue46642] typing: tested TypeVar instance subclass TypeError is incidental

2022-02-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The test is good. If we accidentally make a TypeVar instance subclassable, it 
will catch such error.

--

___
Python tracker 

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



[issue46644] typing: remove callable() check from typing._type_check

2022-02-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

But it gives the same result.

What version of Python do you test with?

--

___
Python tracker 

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



[issue46660] datetime.timestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts


Change by Sam Roberts :


--
resolution:  -> not a bug

___
Python tracker 

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



[issue46660] datetime.timestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts


Sam Roberts  added the comment:

this seems like an expected discrepancy because of a difference in the 
mechanism used for aware datatimes vs. naive datetimes, although I'm not sure I 
understand why the computation with naive datetimes uses the mktime() function 
rather than invoking datetime.timedelta.total_seconds() on a datetime 
difference.

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



[issue46654] urllib.request.urlopen doesn't handle UNC paths produced by pathlib's as_uri() (but can handle UNC paths with additional slashes)

2022-02-06 Thread Emanuelle Pharand


Change by Emanuelle Pharand :


--
assignee:  -> docs@python
components: +2to3 (2.x to 3.x conversion tool), Argument Clinic, Build, C API, 
Cross-Build, Demos and Tools, Distutils, Documentation, Extension Modules, 
FreeBSD, IDLE, IO, Installation, Interpreter Core, Library (Lib), Parser, 
Regular Expressions, SSL, Subinterpreters, Tests, Tkinter, Unicode, Windows, 
XML, asyncio, ctypes, email, macOS
nosy: +Alex.Willmer, asvetlov, barry, docs@python, dstufft, eric.araujo, 
ezio.melotti, koobs, ladykraken, larry, lys.nikolaou, mrabarnett, ned.deily, 
pablogsal, paul.moore, r.david.murray, ronaldoussoren, steve.dower, 
terry.reedy, tim.golden, vstinner, yselivanov, zach.ware
type:  -> performance
versions: +Python 3.10, Python 3.11, 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



[issue46644] typing: remove callable() check from typing._type_check

2022-02-06 Thread Gregory Beauregard


Gregory Beauregard  added the comment:

I'm referring to within type annotations, where this code path isn't used: try 
a: List[42]

This code path can show up in type aliases though.

--

___
Python tracker 

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



[issue46644] typing: remove callable() check from typing._type_check

2022-02-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

No, List[42] is not currently accepted.

>>> List[42]
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/typing.py", line 318, in inner
return func(*args, **kwds)
   ^^^
  File "/home/serhiy/py/cpython/Lib/typing.py", line 1127, in __getitem__
params = tuple(_type_check(p, msg) for p in params)
 ^^
  File "/home/serhiy/py/cpython/Lib/typing.py", line 1127, in 
params = tuple(_type_check(p, msg) for p in params)
   ^^^
  File "/home/serhiy/py/cpython/Lib/typing.py", line 184, in _type_check
raise TypeError(f"{msg} Got {arg!r:.100}.")
^^^
TypeError: Parameters to generic types must be types. Got 42.

--

___
Python tracker 

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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29343
pull_request: https://github.com/python/cpython/pull/31171

___
Python tracker 

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



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2022-02-06 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue31057] pydoc for tempfile.TemporaryDirectory should say it returns the name

2022-02-06 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue25970] py_compile.compile fails if existing bytecode file is unwritable

2022-02-06 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-02-06 Thread PySimpleGUI


PySimpleGUI  added the comment:

I'm sorry for not getting back quicker on the Linux testing.  I've not figured 
out how to get 8.6.12 up and running on my Linux environment.  I've tried both 
Python 3.9 and Python 3.10 and neither have 8.6.12.

--
Added file: https://bugs.python.org/file50607/Linux3.10.jpg

___
Python tracker 

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



[issue46662] Lib/sqlite3/dbapi2.py: convert_timestamp function failed to correctly parse timestamp

2022-02-06 Thread Bo-wei Chen


Change by Bo-wei Chen :


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

___
Python tracker 

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



[issue46662] Lib/sqlite3/dbapi2.py: convert_timestamp function failed to correctly parse timestamp

2022-02-06 Thread Bo-wei Chen


New submission from Bo-wei Chen :

convert_timestamp function in Lib/sqlite3/dbapi2.py fails to parse a timestamp 
correctly, if it does not have microseconds but comes with timezone 
information, e.g. b"2022-02-01 16:09:35+00:00"

Traceback:

Traceback (most recent call last):
  File "/Users/user/Desktop/test.py", line 121, in 
convert_timestamp(b"2022-02-01 16:09:35+00:00")
  File "/Users/user/Desktop/test.py", line 112, in convert_timestamp
hours, minutes, seconds = map(int, timepart_full[0].split(b":"))
ValueError: invalid literal for int() with base 10: b'35+00'

--
components: Library (Lib)
messages: 412655
nosy: Rayologist
priority: normal
severity: normal
status: open
title: Lib/sqlite3/dbapi2.py: convert_timestamp function failed to correctly 
parse timestamp
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



[issue46657] Add mimalloc memory allocator

2022-02-06 Thread Christian Heimes


Christian Heimes  added the comment:

Buildbots "PPC64 Fedora PR" and all RHEL 7 build bots provided by David 
Edelsohn are failing because compiler is missing support for stdatomic.h.

--

___
Python tracker 

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



[issue46661] Duplicat deprecation warnings in docs for asyncio

2022-02-06 Thread Guido van Rossum


New submission from Guido van Rossum :

I found that several asyncio function descriptions, e.g. gather, have a 
duplicate deprecation notice like this:

   .. deprecated-removed:: 3.8 3.10
  The ``loop`` parameter.  This function has been implicitly getting the
  current running loop since 3.7.  See
  :ref:`What's New in 3.10's Removed section `
  for more information.

For gather, that notice appears both before and after the example. For a few 
others, too.

--
assignee: docs@python
components: Documentation, asyncio
messages: 412653
nosy: asvetlov, docs@python, gvanrossum, yselivanov
priority: normal
severity: normal
status: open
title: Duplicat deprecation warnings in docs for asyncio
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29341
pull_request: https://github.com/python/cpython/pull/31168

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29340
pull_request: https://github.com/python/cpython/pull/31167

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


Added file: https://bugs.python.org/file50606/cal_locale.py

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


Removed file: https://bugs.python.org/file50605/cal_locale.py

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-06 Thread STINNER Victor


STINNER Victor  added the comment:

cal_locale.py: Test calendar.LocaleTextCalendar() default locale, manual test 
for GH-31166.

--
Added file: https://bugs.python.org/file50605/cal_locale.py

___
Python tracker 

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



[issue46659] Deprecate locale.getdefaultlocale() function

2022-02-06 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue46644] typing: remove callable() check from typing._type_check

2022-02-06 Thread Gregory Beauregard


Gregory Beauregard  added the comment:

List[42] is already accepted, and your proposed patch does not change it to 
make it not accepted. The issue is _type_check is only called in a few 
particular locations; this is part of the technical reason I'm not very 
concerned about relaxing the _type_check requirements.

>From a type checking philosophy point of view I agree with Jelle and am 
>negative on strict runtime requirements in typing.py.

--

___
Python tracker 

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



[issue46660] datetime.timestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts


Sam Roberts  added the comment:

the first sentence should have read:

datetime.timestamp() fails for naive-datetime values prior to the start of the 
epoch, but for some reason works properly for aware-datetime values prior to 
the start of the epoch.

--
title: datetime.fromtimestamp() fails for naive-datetime values prior to the 
start of the epoch -> datetime.timestamp() fails for naive-datetime values 
prior to the start of the epoch

___
Python tracker 

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



[issue46660] datetime.fromtimestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts


Change by Sam Roberts :


--
title: datetime.datetime.fromtimestamp -> datetime.fromtimestamp() fails for 
naive-datetime values prior to the start of the epoch

___
Python tracker 

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



  1   2   >