[issue41791] mimetypes module does not recognize jp2 type

2020-09-14 Thread Radim Novotny


New submission from Radim Novotny :

Even if jp2 is in the official list of types 
https://www.iana.org/assignments/media-types/media-types.xhtml it's not 
recognized by the MimeTypes.guess_type:

   >>> from mimetypes import MimeTypes
   >>> MimeTypes().guess_type('test.jp2')
   (None, None)

The same example works in Python 3.7 and returns 'image/jp2'

--
messages: 376927
nosy: naro
priority: normal
severity: normal
status: open
title: mimetypes module does not recognize jp2 type
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



[issue41790] C-API documentation

2020-09-14 Thread mohamed koubaa


New submission from mohamed koubaa :

The C-API documentation introduction contains an error:

"Almost all Python objects live on the
heap: you never declare an automatic or static variable of type
:c:type:`PyObject`, only pointer variables of type :c:type:`PyObject*` can  be
declared.  The sole exception are the type objects; since these must never be
deallocated, they are typically static :c:type:`PyTypeObject` objects."

With heap types, PyTypeObject can be deallocated.

--
assignee: docs@python
components: Documentation
messages: 376926
nosy: docs@python, koubaa
priority: normal
pull_requests: 21308
severity: normal
status: open
title: C-API documentation
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-14 Thread Alex Gaynor


Change by Alex Gaynor :


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

___
Python tracker 

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



[issue41789] Enum: __str__ and friends sometimes erroneously replaced

2020-09-14 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-14 Thread Alex Gaynor


Change by Alex Gaynor :


--
assignee:  -> alex

___
Python tracker 

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



[issue41786] re.RegexFlag.__str__ is incorrect

2020-09-14 Thread Ethan Furman


Ethan Furman  added the comment:

The behavior of not honoring the object.__str__ override is a bug in Enum and 
currently being tracked in issue41789.

--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Enum: __str__ and friends sometimes erroneously replaced

___
Python tracker 

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



[issue41789] Enum: __str__ and friends sometimes erroneously replaced

2020-09-14 Thread Ethan Furman


New submission from Ethan Furman :

If an Enum declares __str__, __repr__, __format__, or __reduce_ex__ to be 
object`s, then it will get replaced by the base Enum's corresponding method.  
E.g.:

  class RegexFlag(IntFlag):

 IGNORECASE = I = 2

 def repr(self):
 return 're.%s' % self.name

 __str__ = object.__str__

The intent of the above is have str(RegexFlag.I) == repr(RegexFlag.I) (with 
some quotes, of course), but currently RegexFlag.__str__ will be replaced with 
Flag.__str__.

--
assignee: ethan.furman
components: Library (Lib)
messages: 376924
nosy: barry, eli.bendersky, ethan.furman
priority: normal
severity: normal
stage: needs patch
status: open
title: Enum: __str__ and friends sometimes erroneously replaced
type: behavior
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



[issue41788] enhancement: add assertDuration context manager to unittest module

2020-09-14 Thread Matthew Davis


New submission from Matthew Davis :

# Summary

I propose an additional unit test type for the unittest module.
TestCase.assertDuration(min=None, max=None), which is a context manager, 
similar to assertRaises. It runs the code inside it, and then fails the test if 
the duration of the code inside was not between min and max.


# Use case

I want to check that when I call a certain function in my application, it 
doesn't take far more time than I expect, or far less time.

e.g. if I'm trying to do things concurrently, I want to test that they are 
indeed concurrent, by measuring whether the duration equals the sum of all 
processes' duration, or the max.

# MWE

```
import unittest
from time import sleep, time
from multiprocessing import Pool

def slow(x):
sleep(x)

# blocking sleep for 0, 1, 2, 3 seconds, concurrently
def together():
with Pool(4) as p:
p.map(slow, range(4))

class TestConcurrent(unittest.TestCase):
# this is how you do it today
def test_today(self):
start = time()
together()
end = time()
duration = end - start
self.assertGreaterEqual(duration, 2)
# max should be 3 seconds, plus some overhead
# if together() called slow() in series,
# total duration would be 0 + 1 + 2 + 3 = 6 > 4
self.assertLessEqual(duration, 4) 

# this is how I want to do it
def test_simpler(self):
with self.assertDuration(min=2, max=4):
together()
```

# Solution

I just need to add a new context manager next to this one:
https://github.com/python/cpython/blob/6b34d7b51e33fcb21b8827d927474ce9ed1f605c/Lib/unittest/case.py#L207

--
components: Library (Lib)
messages: 376923
nosy: matt-davis
priority: normal
severity: normal
status: open
title: enhancement: add assertDuration context manager to unittest module

___
Python tracker 

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



[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-14 Thread Inada Naoki


Change by Inada Naoki :


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



[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-14 Thread Inada Naoki


Inada Naoki  added the comment:

+1. It is a very important API.

--

___
Python tracker 

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



[issue41541] [PATCH] Make pty.spawn set window size

2020-09-14 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


Added file: https://bugs.python.org/file49458/script.py

___
Python tracker 

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



[issue41541] [PATCH] Make pty.spawn set window size

2020-09-14 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


Added file: https://bugs.python.org/file49457/script.py

___
Python tracker 

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



[issue41541] [PATCH] Make pty.spawn set window size

2020-09-14 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


Removed file: https://bugs.python.org/file49457/script.py

___
Python tracker 

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



[issue41541] [PATCH] Make pty.spawn set window size

2020-09-14 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


Added file: https://bugs.python.org/file49455/before.png

___
Python tracker 

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



[issue41541] [PATCH] Make pty.spawn set window size

2020-09-14 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


Added file: https://bugs.python.org/file49456/after.png

___
Python tracker 

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



[issue41517] Able to subclass enum with members by using multiple inheritance

2020-09-14 Thread Ethan Furman


Ethan Furman  added the comment:

To answer the invariant question, see this post by Guido:

  https://mail.python.org/pipermail/python-dev/2013-April/125716.html

--

___
Python tracker 

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



[issue41513] High accuracy math.hypot()

2020-09-14 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I saw that the Gentoo bot reacted badly to the new tests, so I reverted them.

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



[issue41513] High accuracy math.hypot()

2020-09-14 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 95a8a0e01d1f4f49ad6b4d4f2ae3bbf93c462013 by Raymond Hettinger in 
branch 'master':
bpo-41513: Remove broken tests that fail on Gentoo (GH-22249)
https://github.com/python/cpython/commit/95a8a0e01d1f4f49ad6b4d4f2ae3bbf93c462013


--

___
Python tracker 

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



[issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name

2020-09-14 Thread Vedran Čačić

Vedran Čačić  added the comment:

Noone said it is a requirement, I just said it would be nice to have it 
factored out as a decorator or something instead of having to write __repr__ 
over and over again.

--

___
Python tracker 

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



[issue41412] After installation on Windows7, 64bit Python 3.9.0b5 reports "api-ms-win-core-path-l1-1-0.dll" missing and doesn't start

2020-09-14 Thread Steve Dower


Steve Dower  added the comment:

Works great! (By which I mean, doesn't work at all ;) )

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



[issue41783] Standard Color class

2020-09-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

Yeah, I don't want to give any false hope on getting such a class accepted to 
the stdlib. It's not super likely to be accepted unless there's a more 
compelling motivation on why it needs to be in the stdlib and not just on PyPI.

--

___
Python tracker 

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



[issue35243] readline timeout too long for async gfx use

2020-09-14 Thread pmp-p


Change by pmp-p :


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



[issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name

2020-09-14 Thread Ethan Furman


Ethan Furman  added the comment:

"repr as inverse of eval" is nice to have, but it is not a requirement.

--

___
Python tracker 

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



[issue41787] adding PEP references to documentation

2020-09-14 Thread Cameron Simpson


New submission from Cameron Simpson :

Add rationale for __length_hint__ and link to PEP 424, per the discussion here:

https://mail.python.org/archives/list/python-...@python.org/thread/HXNFMIEZH73MXYEBP4TDIK3KFPYJ4QKR/#CXBEWAYSCAZCU7QABRBTKNVPDM3LELUM

Once the phrasing and directives are agreed, continue to chase other references 
in the docs.

This will produce multiple small PRs, possibly one per PEP as chased.

Phrasing:

I intend to amend the "New in version V." lines to become "New in version V, 
originally specified by PEPNNN." with a link to the PEP on "PEPNNN". I'm 
tempted to make "version V" also a link to its Whats New page; that will make 
for a bit more visual noise but seems pertinent.

The other thing I'd like to consider is a _single sentence_ in the docs 
identifying the main motivating use case for the feature. The __length_hint__ 
docs are a prime example here - the purpose of the feature is not mentioned, 
merely its semantics. While a feature can be used for many purposes, knowing 
why it was introduces brings a lot of cognitive benefit to the reader.

--
assignee: docs@python
components: Documentation
messages: 376914
nosy: cameron, docs@python
priority: normal
severity: normal
status: open
title: adding PEP references to documentation

___
Python tracker 

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



[issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name

2020-09-14 Thread Vedran Čačić

Vedran Čačić  added the comment:

If it's considered to be not too backwards-incompatible, I think it would be 
nice to have str different from repr. That way we can finetune what exactly we 
need. But we can already do almost exactly that with *int* instead of *str*, so 
it's not too compelling.

Much more important thing is the "repr as inverse of eval". Is there any way we 
can have that for our own enums (as a mixin or a decorator)?

@module_global(re)
class RegexFlag(Enum):
...

It would be fantastic. :-)

--

___
Python tracker 

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



[issue41786] re.RegexFlag.__str__ is incorrect

2020-09-14 Thread Ethan Furman


Ethan Furman  added the comment:

>>> import re
>>> re.I
re.IGNORECASE

>>> print(re.I)
RegexFlag.IGNORECASE# according to comment in linked issue, this should be 
`re.IGNORECASE` as well

--

___
Python tracker 

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



[issue41786] re.RegexFlag.__str__ is incorrect

2020-09-14 Thread Ethan Furman


New submission from Ethan Furman :

In issue36548 - Make the repr of re flags more readable - __str__ is set to 
object.__str__.  Hovewer, setting __str__ to object.__str__ means that EnumMeta 
will replace __str__ with the first Enum's __str__ instead (Flag, in this case).

As asked in issue40066: do we want the str() and repr() to be the same, or 
should the str() be the plain numeric value?

--
components: Library (Lib)
messages: 376911
nosy: ethan.furman, ezio.melotti, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: re.RegexFlag.__str__ is incorrect
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



[issue41513] High accuracy math.hypot()

2020-09-14 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +21305
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/22249

___
Python tracker 

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



[issue41513] High accuracy math.hypot()

2020-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

Multiple tests failed on x86 Gentoo Non-Debug with X 3.x:
https://buildbot.python.org/all/#/builders/58/builds/73

Example of failure:

==
FAIL: testHypotAccuracy (test.test_math.MathTests) (hx='0x1.10106eb4b44a2p+29', 
hy='0x1.ef0596cdc97f8p+29')
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_math.py",
 line 855, in testHypotAccuracy
self.assertEqual(hypot(x, y), z)
AssertionError: 1184594898.793983 != 1184594898.7939832

(I didn't investigate the bug, I just report the failure.)

--
nosy: +vstinner
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue41541] [PATCH] Make pty.spawn set window size

2020-09-14 Thread Ethan Furman


Change by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue41783] Standard Color class

2020-09-14 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Also the trend is to not put classes like this in the standard library at all.

--
nosy: +rhettinger

___
Python tracker 

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



[issue41785] Unittest do not support datatime for AlmostEqual method

2020-09-14 Thread Hildo Guillardi Júnior

Hildo Guillardi Júnior  added the comment:

Thanks.

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



[issue41785] Unittest do not support datatime for AlmostEqual method

2020-09-14 Thread Irit Katriel


Irit Katriel  added the comment:

You need to pass the delta in as a kwarg:

https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertAlmostEqual

>>> unittest.TestCase().assertAlmostEqual( datetime.date(2020,1,5),  
>>> datetime.date(2020,1,2), delta=datetime.timedelta(2))
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\User\src\cpython\lib\unittest\case.py", line 893, in 
assertAlmostEqual
raise self.failureException(msg)
AssertionError: datetime.date(2020, 1, 5) != datetime.date(2020, 1, 2) within 
datetime.timedelta(days=2) delta (datetime.timedelta(days=3) difference)
>>> unittest.TestCase().assertAlmostEqual( datetime.date(2020,1,5),  
>>> datetime.date(2020,1,2), delta=datetime.timedelta(3))
>>>

--
nosy: +iritkatriel

___
Python tracker 

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



[issue41783] Standard Color class

2020-09-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

The normal way for something like this to be added to the stdlib would first be 
for a version on PyPI to be widely used. Then it would be evaluated for 
suitability for inclusion in the stdlib.

Having it first on PyPI would flesh out the API and use cases. For example, I 
have no idea what an API for a Color class would be. I imagine it would depend 
on what other software it's designed to interface with. Would it be float 
values? ints? What range? RGB? HSV? Conversions between those?

For example, see the process that ipaddress went through, which included 
writing PEP 3144.

--
nosy: +eric.smith

___
Python tracker 

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



[issue39451] enum.Enum reference count leaks

2020-09-14 Thread Ethan Furman


Ethan Furman  added the comment:

Thanks, Dan, for checking this out.  As you noted, a garbage collection solved 
the issue, so I'm not going to worry about it.

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



[issue41785] Unittest do not support datatime for AlmostEqual method

2020-09-14 Thread Hildo Guillardi Júnior

New submission from Hildo Guillardi Júnior :

I am running a test

`self.assertAlmostEqual(date1, date2, 6)`

and getting the result:

ERROR: test_datetime_linspace (__main__.TestFunctions)
Check the linspace object output type and delta between them.
--
Traceback (most recent call last):
  File 
"/home/lab/Documents/UNICAMP/LabREI/web-visualization/tests/test_interpreter.py",
 line 87, in test_datetime_linspace
self.assertAlmostEqual(time_list[-1], now, 6)
  File "/usr/lib/python3.8/unittest/case.py", line 957, in assertAlmostEqual
if round(diff, places) == 0:
TypeError: type datetime.timedelta doesn't define __round__ method


Despite the definition

@overload
def assertAlmostEqual(self, first: datetime.datetime, second: 
datetime.datetime,
  places: int = ..., msg: Any = ...,
  delta: datetime.timedelta = ...) -> None: ...

on file case.pyi, the case.py doesn't deal good with `if round(diff, places) == 
0:`, with `diff` the difference between the two varaibles.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 376904
nosy: hildogjr
priority: normal
severity: normal
status: open
title: Unittest do not support datatime for AlmostEqual method
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



[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread Ethan Furman


Change by Ethan Furman :


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



[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread miss-islington


miss-islington  added the comment:


New changeset b502c7618d710d31517a7ee6a72890d0963e357a by Miss Islington (bot) 
in branch '3.9':
bpo-40721: add note about enum member name case (GH-22231)
https://github.com/python/cpython/commit/b502c7618d710d31517a7ee6a72890d0963e357a


--

___
Python tracker 

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



[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread miss-islington


miss-islington  added the comment:


New changeset 624cc10ee4aae513be9f2812f6f5621b6f32f17c by Miss Islington (bot) 
in branch '3.8':
bpo-40721: add note about enum member name case (GH-22231)
https://github.com/python/cpython/commit/624cc10ee4aae513be9f2812f6f5621b6f32f17c


--

___
Python tracker 

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



[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21304
pull_request: https://github.com/python/cpython/pull/22248

___
Python tracker 

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



[issue40721] PEP0435 (enums) -- there is no standard on enum item letters case

2020-09-14 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 542e1df2b018ee7068dba8076f2d6e84efd6e144 by Ethan Furman in 
branch 'master':
bpo-40721: add note about enum member name case (GH-22231)
https://github.com/python/cpython/commit/542e1df2b018ee7068dba8076f2d6e84efd6e144


--

___
Python tracker 

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



[issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name

2020-09-14 Thread Ethan Furman


Ethan Furman  added the comment:

Looks like the `re` module's flags have been updated separately in issue36548:

  >>> import re
  >>> re.I
  re.IGNORECASE

  >>> print(re.I)
  # should also be re.IGNORECASE

  >>> re.I|re.S|re.X
  re.IGNORECASE|re.DOTALL|re.VERBOSE


For stdlib Enum conversions are we happy with that?  Or should __str__ just 
print the numeric value?

--
nosy: +ezio.melotti, mrabarnett, serhiy.storchaka
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue41783] Standard Color class

2020-09-14 Thread Mertcan


Change by Mertcan :


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

___
Python tracker 

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



[issue41744] NuGet python.props only works in python nuget, not other variants

2020-09-14 Thread miss-islington


miss-islington  added the comment:


New changeset b007a9be6fab6d55deae070e5eaef9755794e169 by Miss Islington (bot) 
in branch '3.8':
bpo-41744: Package python.props with correct name in NuGet package (GH-22154)
https://github.com/python/cpython/commit/b007a9be6fab6d55deae070e5eaef9755794e169


--

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-14 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> @Batuhan, do you want to look into this?

Sure, will check it out!

--

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-14 Thread Guido van Rossum


Guido van Rossum  added the comment:

I actually have no idea where dir() gets its information.  IIRC the 
implementation was a collaboration with Batuhan -- @Batuhan, do you want to 
look into this?  Presumably some metadata needs to be added to 
genericaliasobject.c.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-14 Thread Alex Gaynor


New submission from Alex Gaynor :

This function is incredibly useful for efficient interoperability between 
Python and other languages with UTF-8 based strings (e.g. Rust). Right now it's 
not possible to do interop without several copies/allocations if you're trying 
to build an abi3 wheel. This is tactically relevant to me here: 
https://github.com/PyO3/pyo3/issues/1125

This API has been stable since it was introduced in Python 3.1, so I think 
making it stable would be appropriate.

Inada, Benjamin suggested I should ask you for your feedback on this. I'm happy 
to send a pull request.

--
components: C API
keywords: easy (C)
messages: 376896
nosy: alex, benjamin.peterson, inada.naoki
priority: normal
severity: normal
status: open
title: Promote PyUnicode_AsUTF8AndSize to be available with the limited API 
(PEP 384)
type: enhancement

___
Python tracker 

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



[issue41646] shutil.copy documentation should clarify support for path-like objects

2020-09-14 Thread Steve Dower


Steve Dower  added the comment:

Thanks!

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

___
Python tracker 

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



[issue41744] NuGet python.props only works in python nuget, not other variants

2020-09-14 Thread Steve Dower


Steve Dower  added the comment:

Thanks!

--
assignee:  -> steve.dower
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue41744] NuGet python.props only works in python nuget, not other variants

2020-09-14 Thread Steve Dower

Steve Dower  added the comment:


New changeset 7c11a9accabe3720940f334eb1226bb7bb9179c7 by Václav Slavík in 
branch 'master':
bpo-41744: Package python.props with correct name in NuGet package (GH-22154)
https://github.com/python/cpython/commit/7c11a9accabe3720940f334eb1226bb7bb9179c7


--

___
Python tracker 

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



[issue41744] NuGet python.props only works in python nuget, not other variants

2020-09-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21301
pull_request: https://github.com/python/cpython/pull/22246

___
Python tracker 

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



[issue41744] NuGet python.props only works in python nuget, not other variants

2020-09-14 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue41646] shutil.copy documentation should clarify support for path-like objects

2020-09-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21299
pull_request: https://github.com/python/cpython/pull/22244

___
Python tracker 

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



[issue41646] shutil.copy documentation should clarify support for path-like objects

2020-09-14 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue41646] shutil.copy documentation should clarify support for path-like objects

2020-09-14 Thread Steve Dower


Steve Dower  added the comment:


New changeset 8f2b991eef062c22c429a96983c78be007180b66 by Zackery Spytz in 
branch 'master':
bpo-41646: Mention path-like objects support in the docs for shutil.copy() 
(GH-22208)
https://github.com/python/cpython/commit/8f2b991eef062c22c429a96983c78be007180b66


--

___
Python tracker 

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



[issue40108] Improve error message for -m option when .py is present

2020-09-14 Thread Brett Cannon


Change by Brett Cannon :


--
components: +Library (Lib) -XML

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-14 Thread mohamed koubaa


Change by mohamed koubaa :


--
pull_requests: +21297
pull_request: https://github.com/python/cpython/pull/22242

___
Python tracker 

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



[issue40536] Addition of a "list of available time zones" function to zoneinfo

2020-09-14 Thread Paul Ganssle

Paul Ganssle  added the comment:

Thanks Łukasz. Sorry I forgot to respond last time. We've had no feedback on 
this whatsoever, and I think we've probably made the right choice, so we can go 
ahead and call this resolved.

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



[issue39883] Use BSD0 license for code in docs

2020-09-14 Thread Guido van Rossum


Guido van Rossum  added the comment:

This looks fully resolved. Thanks again Todd!

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



[issue40536] Addition of a "list of available time zones" function to zoneinfo

2020-09-14 Thread Łukasz Langa

Łukasz Langa  added the comment:

Note: the release of the last RC is imminent. Whatever API changes were 
planned, they have to wait for 3.10.

--
priority: deferred blocker -> critical
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



[issue41412] After installation on Windows7, 64bit Python 3.9.0b5 reports "api-ms-win-core-path-l1-1-0.dll" missing and doesn't start

2020-09-14 Thread Łukasz Langa

Łukasz Langa  added the comment:

"Leaving this open until we can validate on the next release".

You should be able to do it now, Steve.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue40746] test_gdb failing on 32-bit armv7l when built with GCC -Og (fail on Raspbian on 3.9, regression from 3.8)

2020-09-14 Thread Łukasz Langa

Łukasz Langa  added the comment:

Downgrading since this missed rc1 anyway.

--
priority: release blocker -> high

___
Python tracker 

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



[issue41025] C implementation of ZoneInfo cannot be subclassed

2020-09-14 Thread Łukasz Langa

Change by Łukasz Langa :


--
priority: release blocker -> critical
stage: backport needed -> resolved
status: open -> closed

___
Python tracker 

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



[issue41025] C implementation of ZoneInfo cannot be subclassed

2020-09-14 Thread Łukasz Langa

Łukasz Langa  added the comment:

I will be cutting RC2 from the head of 3.9.

--

___
Python tracker 

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



[issue14527] How to link with a non-system libffi?

2020-09-14 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

___
Python tracker 

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



[issue14527] How to link with a non-system libffi?

2020-09-14 Thread wang zhao


wang zhao  added the comment:

We managed to fixed on the server by following and got it sucuessfully compiled:
-./configure  --with-system-ffi  LDFLAGS="-L 
/home/XXX/installs/libffi-3.3/lib64/" CPPFLAGS="-I 
/home/XXX/installs/libffi-3.3/include/"
-LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/XXX/installs/libffi-3.3/lib64/
-make

--
nosy: +zhao.wang.unsw
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



[issue19081] zipimport behaves badly when the zip file changes while the process is running

2020-09-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

On POSIX systems, keeping the file open means you will keep a handle to the 
original file in the case where something moves a new file into it's place (as 
is normal during software package updates) or otherwise unlinks the original.  
That is the situation that led to filing this issue and is one that is 
technically solvable by keeping the file handle open and always using that for 
access.

We can't do anything very meaningful about someone opening the existing file in 
'w+a' mode and scribbling other bytes over it.  I wouldn't try to protect 
against that.  "locking" a file isn't an option on most platforms and when 
available, is very unusual to do in this century.

--

___
Python tracker 

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



[issue41783] Standard Color class

2020-09-14 Thread Mertcan


New submission from Mertcan :

I think it would be useful to have a Color class in Python. Thus, it can become 
a standard and additional libraries may not be needed for many operations. Many 
libraries can be built around this Color class and can pave the way for many 
innovations. It can be a good advantage, especially in the GUI area, that 
beautiful libraries have a common data type. Thanks!

--
components: Library (Lib)
messages: 376883
nosy: mertcandav
priority: normal
severity: normal
status: open
title: Standard Color class
type: enhancement

___
Python tracker 

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



[issue41763] IDLE: scale font to Windows' "zoom" factor

2020-09-14 Thread E. Paine


E. Paine  added the comment:

Firstly, apologies about the original message: rereading it, it was a bit 
random and written in a very illogical order.

> Are you the Elisha Paine that suggested the original fix?

Yes (though I like to think I have somewhat progressed in 2 years!). The reason 
I am E. Paine here is solely because I prefer if Google did not index my entire 
life ;-) On the subject, I would like to thank you Terry 1. for all your work 
on IDLE and CPython more generally and 2. because you were my first experience 
of the devs and were very patient despite my clear incompetence (now and then!)

> tk scales on startup

When first writing this issue I saw that Tk was calling GetDeviceCaps for 
LOGPIXELSX/LOGPIXELSY. The Windows docs say this:
"Number of pixels per logical inch along the screen width..."

I (incorrectly) took this to mean it disregards the system dpi and returns the 
dpi for the monitor. In reality, increasing the zoom factor causes this value 
to increase, meaning Windows (in effect) declares a smaller monitor size 
(certainly in later versions of Windows - whether this is true in older 
versions I don't know).

I have checked and the scale value increases correctly with a change in system 
dpi (hence meaning IDLE also scales correctly).

> IDLE ... remains the same size regardless of what setting the user chooses as 
> their scale factor

Apologies, this is complete rubbish (I think I was comparing it to the increase 
in size on the settings window rather than actually paying proper attention to 
IDLE).

I have closed this issue as not a bug.

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



[issue41782] No f-string in logging.basicConfig()

2020-09-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

Vinay raises a good point about performance that's well worth being aware of, 
especially with expensive objects (as he says). But since f-strings are much 
faster than other formatting (and especially .format()), there's a tradeoff. If 
I have something that I know is likely to be logged, sometimes I'll format it 
with f-strings.

--

___
Python tracker 

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



[issue41782] No f-string in logging.basicConfig()

2020-09-14 Thread Vinay Sajip


Vinay Sajip  added the comment:

It's as Eric said. So I'll close this issue as "not a bug". An additional point 
- by using f-strings, you may be doing unnecessary string formatting - e.g. if 
the event doesn't actually get handled because of logger or handler level or 
filter settings. It's worse if any of the parameters in the f-string are 
expensive to compute, as they would effectively be thrown away if the event 
were not to be handled.

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-14 Thread mohamed koubaa


Change by mohamed koubaa :


--
pull_requests: +21296
pull_request: https://github.com/python/cpython/pull/22240

___
Python tracker 

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



[issue40616] Add `asyncio.BufferQueue`

2020-09-14 Thread Serge Matveenko


Change by Serge Matveenko :


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



[issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module

2020-09-14 Thread Serge Matveenko


Change by Serge Matveenko :


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



[issue38701] datetime.timedelta string representation is ambiguous

2020-09-14 Thread Serge Matveenko


Change by Serge Matveenko :


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



[issue41782] No f-string in logging.basicConfig()

2020-09-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue41782] No f-string in logging.basicConfig()

2020-09-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

Since an f-string just evaluates to a regular string at the call site, before 
any logging code is invoked, there's nothing for the logging code to do. As far 
as it's concerned, it just gets a regular string.

--
nosy: +eric.smith

___
Python tracker 

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



[issue41782] No f-string in logging.basicConfig()

2020-09-14 Thread Shubham Singh


New submission from Shubham Singh :

There is no method to implement format strings in the basicConfig() method of 
the logging module. There are the implementations of '%', '{' or '$' for 
printf-style, str.format() or string.Template respectively using the style 
keyword.

--
messages: 376878
nosy: shubham.25powertech
priority: normal
severity: normal
status: open
title: No f-string in logging.basicConfig()
type: enhancement
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



[issue41781] Typos in typing.py

2020-09-14 Thread Patrick Reader


New submission from Patrick Reader :

In typing.py, the `_allow_reckless_class_cheks` function is spelt wrong, and 
there is also a typo `instnance` in its docstring. I can do a PR but I thought 
I'd open an issue since it might be considered a breaking change (although it 
is `_private` so maybe not?)

https://github.com/python/cpython/blob/1b4552c5e8e925f24c15f707050f22c977171125/Lib/typing.py#L1037

--
components: Library (Lib)
messages: 376877
nosy: pxeger
priority: normal
severity: normal
status: open
title: Typos in typing.py
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



[issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed

2020-09-14 Thread Giordon Stark


Giordon Stark  added the comment:

Hi Pablo,

Thanks for looking at this. Indeed, this seems to be fixed for me on python 3.8 
(I'm using docker image python:3.8-slim) and I'm unable to force the issue to 
come up.

I will go ahead and close this and link the corresponding PR 
(https://github.com/python/cpython/pull/16495) that fixed things up.

--
keywords: +patch
message_count: 4.0 -> 5.0
pull_requests: +21295
resolution:  -> fixed
stage:  -> patch review
status: open -> closed
pull_request: https://github.com/python/cpython/pull/16495

___
Python tracker 

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



[issue41766] Python3.10 (x64) crashes after flake8/pyflakes on Windows

2020-09-14 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> duplicate
superseder:  -> _ast module: get_global_ast_state() doesn't work with Mercurial 
lazy import

___
Python tracker 

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



[issue22256] pyvenv should display a progress indicator while creating an environment

2020-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

I close the issue.

If someone wants to work on venv, I suggest to attempt to copy virtualenv cache 
optimization of virtualenv 20, to speedup the creation of a venv, rather than 
adding a progress bar :-)

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

___
Python tracker 

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



[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-09-14 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-41766 as a duplicate of this issue.

--

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue41780] Generic Alias attributes nor in dir()

2020-09-14 Thread Allan Daemon


New submission from Allan Daemon :

The implementation of PEP 585 in 3.9 adds some new attributes, but they aren't 
listed with dir() (then, not list in autocomplete and IntelliSense).

Python 3.9.0rc1+ (heads/3.9:d7cd1164c1, Aug 25 2020, 17:27:09)

>>> li = list[int]
>>> li.__origin__

>>> getattr(li, '__origin__')

>>> '__origin__' in dir(li)
False

That applies to:

__origin__
__args__
__parameters__

It seems to be not the expected behaviour, so this bug report. If this is not 
the case, some piece of documentation could be interesting. Also, I couldn't 
find anything about Generic Alias in the documentation, only in the source 
code. Should this be addressed too?

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 376873
nosy: AllanDaemon, docs@python
priority: normal
severity: normal
status: open
title: Generic Alias attributes nor in dir()
type: behavior
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



[issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed

2020-09-14 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Indeed, I cannot reproduce this with Pyhon3.8:

(vev) ❯ python -m pytest tests/test_validation.py - -k 
"test_optimizer_stitching" -v
=
 test session starts 
==
platform darwin -- Python 3.8.2, pytest-3.10.1, py-1.9.0, pluggy-0.13.1 -- 
/Users/pgalindo3/github/python/master/vev/bin/python

 cachedir: .pytest_cache
Matplotlib: 3.3.1
Freetype: 2.6.1 


benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False 
min_rounds=5 min_time=0.05 max_time=1.0 calibration_precision=10 
warmup=False warmup_iterations=10)
rootdir: /Users/pgalindo3/github/python/master/pyhf, inifile: pytest.ini
plugins: mpl-0.11, mock-3.3.1, cov-2.10.1, console-scripts-0.2.0, 
benchmark-3.2.3 

  collected 26 items / 18 deselected

tests/test_validation.py::test_optimizer_stitching[scipy-numpy_backend] PASSED  

 [ 12%] 
tests/test_validation.py::test_optimizer_stitching[scipy-jax_backend] PASSED

 [ 25%]
tests/test_validation.py::test_optimizer_stitching[scipy-tensorflow_backend] 
PASSED  
[ 
37%]
tests/test_validation.py::test_optimizer_stitching[scipy-pytorch_backend] 
PASSED  
   
[ 50%]
tests/test_validation.py::test_optimizer_stitching[minuit-numpy_backend] PASSED 

 [ 62%]
tests/test_validation.py::test_optimizer_stitching[minuit-jax_backend] PASSED   

 [ 75%]
tests/test_validation.py::test_optimizer_stitching[minuit-tensorflow_backend] 
PASSED  
   [ 
87%]
tests/test_validation.py::test_optimizer_stitching[minuit-pytorch_backend] 
PASSED

=
 8 passed, 18 deselected, 50 warnings in 3.29 seconds 
=

--

___
Python tracker 

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



[issue41779] add BLOB photo to sqlite3 python

2020-09-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

The bug tracker is not the correct place to request help on using Python. You 
might try the python-list mailing list. You can find information on it at 
https://mail.python.org/mailman/listinfo/python-list. Or you might wait until 
someone answers your Stack Overflow question.

I'm going to leave this open for a while on the off chance that there's 
actually some bug in Python related to your problem.

--
nosy: +eric.smith

___
Python tracker 

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



[issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed

2020-09-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Hi Giordon and thanks for your issue.

Could you please check if you can reproduce this behaviour with Python3.8 and 
with the current master? We have some new
code that may be preventing this to happen:

https://github.com/python/cpython/blob/master/Modules/gcmodule.c#L780

Unfortunately, without a simpler reproducer is difficult to tell what's going 
on so is not possible for me to say
that this is fixed in current master.

--

___
Python tracker 

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



[issue41513] High accuracy math.hypot()

2020-09-14 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 457d4e97de0369bc786e363cb53c7ef3276fdfcd by Raymond Hettinger in 
branch 'master':
bpo-41513: Add docs and tests for hypot() (GH-22238)
https://github.com/python/cpython/commit/457d4e97de0369bc786e363cb53c7ef3276fdfcd


--

___
Python tracker 

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



[issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed

2020-09-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue41779] add BLOB photo to sqlite3 python

2020-09-14 Thread Ali Zaeri


New submission from Ali Zaeri :

Hi this is my problem that I share it in stackowerflow hope you can help me:

https://stackoverflow.com/q/63763089/14168432

--
messages: 376868
nosy: alizaerialora
priority: normal
severity: normal
status: open
title: add BLOB photo to sqlite3 python

___
Python tracker 

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



[issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed

2020-09-14 Thread Ned Deily


Change by Ned Deily :


--
components: +Library (Lib) -macOS

___
Python tracker 

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



[issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed

2020-09-14 Thread Ned Deily


Change by Ned Deily :


--
nosy: +fdrake, nascheme -ned.deily, ronaldoussoren

___
Python tracker 

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



[issue39883] Use BSD0 license for code in docs

2020-09-14 Thread Ned Deily


Ned Deily  added the comment:


New changeset bf7d4d039c46232262a0f736f12761b085a6e7a8 by Miss Islington (bot) 
in branch '3.9':
bpo-39883: Update macOS installer copy of LICENSE. (GH-22235) (GH-22236)
https://github.com/python/cpython/commit/bf7d4d039c46232262a0f736f12761b085a6e7a8


--

___
Python tracker 

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