[issue42612] Software Designer

2020-12-09 Thread Deepanshu Garg


New submission from Deepanshu Garg :

I am calling and executing python script from C++ code using 
"PyRun_SimpleFile". This API is being called from windows thread and every 
thread intializes and finalizes the python interpreter. However, it works fine 
for single thread but if intiate a request immideatly after first returned the 
results, it does not work.

I ttried using PyGILState_STATE as well but it caused me access violation issue 
and application crashed

--
components: C API
messages: 382816
nosy: deepanshugarg09
priority: normal
severity: normal
status: open
title: Software Designer
type: crash
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



[issue42611] PEP 594

2020-12-09 Thread Jeremy Kloth


Change by Jeremy Kloth :


--
nosy: +jkloth

___
Python tracker 

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



Re: Property type hints?

2020-12-09 Thread dn via Python-list

On 10/12/2020 13:06, Paul Bryan wrote:

Thanks for the comprehensive response, dn!

I guess I'm influenced by data classes here, where the object's 
attribute type hints are represented by class variable annotations.



I'm a great fan of them too - the saving of 'boilerplate code' does it 
for me; but yes, the typing benefits come for-free!



Just in case it needs to be said: there's no need to 'declare' 
properties (or any other methods) as if they are class-attributes - 
either when using data-classes or rolling-your-own!


Also, remember that class-attributes will become (actually be 'hidden' 
by) instance-attributes if used on the LHS of an expression within the 
class (replicating the 'two' entity problem, discussed earlier).

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


[issue42611] PEP 594

2020-12-09 Thread Kyle Stanley


New submission from Kyle Stanley :

This issue was created for the purpose of tracking any changes related to PEP 
594 (Removing dead batteries from stdlib), and any relevant discussions about 
the modules being removed.

--
components: Library (Lib)
messages: 382815
nosy: aeros, christian.heimes
priority: normal
pull_requests: 22588
severity: normal
status: open
title: PEP 594
type: enhancement
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



PyCA cryptography 3.3.1 released

2020-12-09 Thread Paul Kehrer
PyCA cryptography 3.3.1 has been released to PyPI. cryptography includes
both high level recipes and low level interfaces to common cryptographic
algorithms such as symmetric ciphers, asymmetric algorithms, message
digests, X509, key derivation functions, and much more. We support Python
2.7, Python 3.6+, and PyPy.

Please note that this is the final version that will support Python 2.7!

Changelog (https://cryptography.io/en/latest/changelog/):

* Re-added a legacy symbol causing problems for older ``pyOpenSSL`` users.

-Paul Kehrer (reaperhulk)
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


Re: Python idle did not open even after trying many times

2020-12-09 Thread Terry Reedy

On 12/9/2020 11:08 AM, avinash gaur wrote:

Dear Sir/Mam,
I am facing a problem with Python Idle. I am unable to open python idle
even after clicking on it so many times. I am using Python 3.7 on Windows.


What are you clicking on?
Did IDLE work before?  (If you just installed 3.7, why?)

Can you start interactive Python?  and get >>> prompt?
Does 'import tkinter' work?
Does 'import idlelib.idle' work?
--
Terry Jan Reedy

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


[issue42385] Should enum.auto's behavior be adjusted for StrEnum to return the enum name?

2020-12-09 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



Re: Unable to download

2020-12-09 Thread Siddarth Adiga
Thank you for your concern. I use windows 10. But I was able to download
it. The fifth time I tried, it worked.
But then I had a prolem opening Jupyter Notebook, it said "Fatal error in
launcher: unable to create process using. The system cannot find the file
specified." So I had to download Anaconda.

So thank you. I was able to open Python.

On Thu, 10 Dec 2020, 00:04 Bob Gailer,  wrote:

>
>
> On Wed, Dec 9, 2020, 11:46 AM Siddarth Adiga 
> wrote:
>
>> Hello. I wanted to download the Python Version 3.9.1 but it said there was
>> already another version of Python already installed. But I have deleted
>> the
>> program from the ADD OR REMOVE PROGRAMS option. But still I am unable to
>> download it. Please help.
>
>
> What OS are you using?
>
> Exactly what did you do to download?
> Exactly what did the error.message say?
>
> Bob Gailer
>
>>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue42517] Enum: do not convert private names into members

2020-12-09 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 7cf0aad96d1d20f07d7f0e374885f327c2d5ff27 by Ethan Furman in 
branch 'master':
bpo-42517: [Enum] do not convert private names into members (GH-23722)
https://github.com/python/cpython/commit/7cf0aad96d1d20f07d7f0e374885f327c2d5ff27


--

___
Python tracker 

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



[issue42567] Enum: manually call __init_subclass__ after members are added

2020-12-09 Thread Ethan Furman


Change by Ethan Furman :


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



[issue42567] Enum: manually call __init_subclass__ after members are added

2020-12-09 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 6bd94de168b58ac9358277ed6f200490ab26c174 by Ethan Furman in 
branch 'master':
bpo-42567: [Enum] call __init_subclass__ after members are added (GH-23714)
https://github.com/python/cpython/commit/6bd94de168b58ac9358277ed6f200490ab26c174


--

___
Python tracker 

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



Re: Property type hints?

2020-12-09 Thread Paul Bryan
Thanks for the comprehensive response, dn!

I guess I'm influenced by data classes here, where the object's
attribute type hints are represented by class variable annotations.


On Thu, 2020-12-10 at 07:49 +1300, dn via Python-list wrote:
> On 09/12/2020 13:17, Paul Bryan wrote:
> > Would this be a reasonably correct way to annotate a property with
> > a
> > type hint?
> > 
> > > > > class Foo:
> > ... bar: int
> 
> 
> If we build a class with (only) the above two lines, Python's help 
> lookup offers the following documentation:
> 
> <<<
> Help on Foo in module __main__ object:
> 
> class Foo(builtins.object)
>   |  Data descriptors defined here:
>   |
>   |  __dict__
>   |  dictionary for instance variables (if defined)
>   |
>   |  __weakref__
>   |  list of weak references to the object (if defined)
>   |
>   |  
> --
>   |  Data and other attributes defined here:
>   |
>   |  __annotations__ = {'bar': }
>  >>>
> 
> Note the last line identifying 'bar' as having integer-type.
> 
> However, when we continue, by adding a property/lookup-method called
> 'bar'.
> 
> > ... @property
> > ... def bar(self):
> > ... return 1
> 
> 
> ...the help lookup becomes:
> 
> <<<
> class Foo(builtins.object)
>   |  Readonly properties defined here:
>   |
>   |  bar
>   |
>   |  
> --
>   |  Data descriptors defined here:
>   |
>   |  __dict__
>   |  dictionary for instance variables (if defined)
>   |
>   |  __weakref__
>   |  list of weak references to the object (if defined)
>   |
>   |  
> --
>   |  Data and other attributes defined here:
>   |
>   |  __annotations__ = {'bar': }
>  >>>
> 
> Note that 'bar' has now been listed as a read-only property.
> 
> Further, if we remove the explicit typing (int) of 'bar', the help 
> listing doesn't change.
> 
> 
> <<<
> class Foo(builtins.object)
>   |  Readonly properties defined here:
>   |
>   |  bar
>   |
>   |  
> --
>   |  Data descriptors defined here:
>   |
>   |  __dict__
>   |  dictionary for instance variables (if defined)
>   |
>   |  __weakref__
>   |  list of weak references to the object (if defined)
>  >>>
> 
> Except that the annotation documentation has disappeared!
> 
> Hence, one assumes, the question!
> 
> The problem is that the help system appears to be talking about two 
> different things: 'bar' the class int, and 'bar' the method/property.
> At 
> run-time however, there cannot be two uses of the same name, and the 
> last-defined 'wins'.
> 
> Continuing:-
> 
> > ...
> > > > > foo = Foo()
> > > > > import typing
> > > > > typing.get_type_hints(foo)
> > {'bar': }
> > 
> > I could also decorate the property method return value:
> > ... def bar(self) -> int:
> 
> ...and when the typing-hint is added to the property's def, the help 
> listing still doesn't change/improve.
> 
> 
> That said, I've been following this last convention since moving to
> typing.
> 
> Putting a separate description at the beginning of the class invites
> the 
> reader to think of 'foo' as an integer. That's not 'wrong', in the
> sense 
> that a property is/produces an attribute in the same dotted-notation 
> from the object-name. However,there could be quite a lot of code
> between 
> this 'declaration' line and the property def!
> 
> However, there is another line of logic built upon the idea that all 
> class-attributes should be defined in the class 'header' and all 
> instance-attributes in __init__() or __post_init__(). Does this
> underlie 
> the discussion?
> 
> 
> > I don't see the point though, because you can't access it with
> > get_type_hints.
> 
> Correct: if one codes (only) the property-bar, then:
> 
>  >>> get_type_hints( Foo )
> {}
> 
> However, reverting back to the first class-definition, we do see 
> something for our money:
> 
>  >>> get_type_hints( foo )
> {'bar': }
> 
> Unfortunately, as mentioned above, there is this confusion between
> the 
> two 'bar's...
> 
> Proof?
> 
> If we change things, the result is not what (it would appear) is
> desired:
> 
>  >>> class Foo:
> ...   bar:str
> ...   @property
> ...   def bar( self ):
> ... return 1
> ...
>  >>> get_type_hints( Foo )
> {'bar': }
> 
> Yet the 'bar' property will return an int!
> 
> ...and this is proven/made worse when we add explicit typing to the 
> property definition:
> 
>  >>> class Foo:
> ...   bar:str
> ...   @property
> ...   def bar( self )->int:
> ... return 1
> ...
>  >>> get_type_hints( Foo )
> {'bar': }
> 
> Our documentation entries don't agree, and don't match 'reality'.
> Ouch!
> 
> Beyond that, I won't hazard a guess at the minds of the 'Python gods'
> who design and implement these things. However, please remember that
> in 
> this discussion we have been 

[issue39791] New `files()` api from importlib_resources.

2020-12-09 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

This issue was implemented, just not as fully as I'd have hoped. Still lacking 
is native support for .files on the built-in package providers and removing the 
legacy APIs or at least configuring them to rely on the files API, but as far 
as supplying the files API, this work is done.

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

___
Python tracker 

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



[issue39707] Abstract property setter/deleter implementation not enforced, but documented as such

2020-12-09 Thread Guido van Rossum


Guido van Rossum  added the comment:

Josh, feel free to submit a PR (make sure it mentions this issue).

--

___
Python tracker 

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



[issue39707] Abstract property setter/deleter implementation not enforced, but documented as such

2020-12-09 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

If this is going to be closed as rejected, I think it still needs some 
improvement to the documentation. Right now, the docs for abstractproperty 
(deprecated in favor of combining property and abstractmethod) state:

"If only some components are abstract, only those components need to be updated 
to create a concrete property in a subclass:"

This heavily implies that if *all* components of the property are abstract, 
they must *all* be updated to create a concrete property on the subclass, when 
that is not the case (it's documenting a special way of overriding just one 
component by borrowing the base class, not a normal means of defining a 
property). If nothing else, mentioning this quirk in the docs seems like it 
would save confusion (e.g. 
https://stackoverflow.com/questions/65224767/python-abstract-property-cant-instantiate-abstract-class-with-abstract-me
 ).

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, josh.r
resolution: rejected -> 
status: closed -> open
title: Abstract property setter/deleter implementation not enforced. -> 
Abstract property setter/deleter implementation not enforced, but documented as 
such
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



[issue34750] locals().update doesn't work in Enum body, even though direct assignment to locals() does

2020-12-09 Thread Ethan Furman


Ethan Furman  added the comment:

Okay, you convinced me.  I would ask two things, though:

- use vars() instead of locals()
- split the one-liner  ;)

class Foo(Enum):
vars().update({
k: v
for k, v in foo_defines.items()
if k.startswith('FOO_')
})
def some_method(self):
# do something

--

___
Python tracker 

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



[issue34750] locals().update doesn't work in Enum body, even though direct assignment to locals() does

2020-12-09 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



[issue34750] locals().update doesn't work in Enum body, even though direct assignment to locals() does

2020-12-09 Thread Ethan Furman


Change by Ethan Furman :


--
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue42417] Empty body {} in POST requests leads to 405 Method not allowed error

2020-12-09 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I cannot reproduce with 3.9.0, using attached files -- I do not get either 400 
or 405; I get "None received" message:

```python3 flask_client.py  

  
--INS--
b'"None received"\n'

```

--
nosy: +andrei.avk

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2020-12-09 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d5dcb653176387b72c8630f1a5464571f538a639 by pxinwr in branch 
'master':
bpo-31904: Define THREAD_STACK_SIZE for VxWorks (GH-23718)
https://github.com/python/cpython/commit/d5dcb653176387b72c8630f1a5464571f538a639


--

___
Python tracker 

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



[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-09 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +22585
pull_request: https://github.com/python/cpython/pull/23724

___
Python tracker 

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



[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-09 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a82f63f5af027a0eab0f0812d750b804368cbd25 by Victor Stinner in 
branch 'master':
bpo-32381: Add _PyRun_AnyFileObject() (GH-23723)
https://github.com/python/cpython/commit/a82f63f5af027a0eab0f0812d750b804368cbd25


--

___
Python tracker 

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



[issue41559] Add support for PEP 612 to typing.py

2020-12-09 Thread Guido van Rossum


Guido van Rossum  added the comment:

I wrote

class C(Generic[T, P]): ...

and was surprised that C.__parameters__ was (T,) instead of (T, P).

--

___
Python tracker 

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



[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-09 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +22584
pull_request: https://github.com/python/cpython/pull/23723

___
Python tracker 

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



[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2020-12-09 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ca064402079f889226cb107b26b329891431c319 by Victor Stinner in 
branch 'master':
bpo-32381: Remove unused _Py_fopen() function (GH-23711)
https://github.com/python/cpython/commit/ca064402079f889226cb107b26b329891431c319


--

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-12-09 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset f6d1520219899874d78e7710934c9b21af880f9a by Miss Islington (bot) 
in branch '3.8':
bpo-40084: [Enum] dir() includes member attributes (GH-19219) (GH-22853)
https://github.com/python/cpython/commit/f6d1520219899874d78e7710934c9b21af880f9a


--

___
Python tracker 

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



[issue42560] Improve Tkinter Documentation

2020-12-09 Thread E. Paine


E. Paine  added the comment:

@Fredrik, can you comment on when we might expect effbot.org to become 
available again? (i.e. is it worth us updating the docs to note that its down / 
changing the link to the Wayback Machine?)

--
nosy: +effbot

___
Python tracker 

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



[issue26131] Raise ImportWarning when loader.load_module() is used

2020-12-09 Thread Brandt Bucher


Brandt Bucher  added the comment:

Yep, looks like that was it. Thanks!

--

___
Python tracker 

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



[issue42560] Improve Tkinter Documentation

2020-12-09 Thread Mason Ginter


Mason Ginter  added the comment:

Would it then be a good idea to add a link to the archive.org version of 
effbot? If so how best to add it to the documentation. The only other instances 
I can find links to archive.org in the documentation reference webpages that 
are down permanently, unlike effbot.

Docs/library/unittest.rst:55
Docs/library/xmlrpc.client.rst:52
Docs/using/windows.rst:1088

In the documentation, should we clarify that effbot is temporarily down and 
link to the archive.org, or just change the hyperlink (as in other instances 
above)?

--

___
Python tracker 

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



Re: Property type hints?

2020-12-09 Thread dn via Python-list

On 09/12/2020 13:17, Paul Bryan wrote:

Would this be a reasonably correct way to annotate a property with a
type hint?


class Foo:

... bar: int



If we build a class with (only) the above two lines, Python's help 
lookup offers the following documentation:


<<<
Help on Foo in module __main__ object:

class Foo(builtins.object)
 |  Data descriptors defined here:
 |
 |  __dict__
 |  dictionary for instance variables (if defined)
 |
 |  __weakref__
 |  list of weak references to the object (if defined)
 |
 |  --
 |  Data and other attributes defined here:
 |
 |  __annotations__ = {'bar': }
>>>

Note the last line identifying 'bar' as having integer-type.

However, when we continue, by adding a property/lookup-method called 'bar'.


... @property
... def bar(self):
... return 1



...the help lookup becomes:

<<<
class Foo(builtins.object)
 |  Readonly properties defined here:
 |
 |  bar
 |
 |  --
 |  Data descriptors defined here:
 |
 |  __dict__
 |  dictionary for instance variables (if defined)
 |
 |  __weakref__
 |  list of weak references to the object (if defined)
 |
 |  --
 |  Data and other attributes defined here:
 |
 |  __annotations__ = {'bar': }
>>>

Note that 'bar' has now been listed as a read-only property.

Further, if we remove the explicit typing (int) of 'bar', the help 
listing doesn't change.



<<<
class Foo(builtins.object)
 |  Readonly properties defined here:
 |
 |  bar
 |
 |  --
 |  Data descriptors defined here:
 |
 |  __dict__
 |  dictionary for instance variables (if defined)
 |
 |  __weakref__
 |  list of weak references to the object (if defined)
>>>

Except that the annotation documentation has disappeared!

Hence, one assumes, the question!

The problem is that the help system appears to be talking about two 
different things: 'bar' the class int, and 'bar' the method/property. At 
run-time however, there cannot be two uses of the same name, and the 
last-defined 'wins'.


Continuing:-


...

foo = Foo()
import typing
typing.get_type_hints(foo)

{'bar': }

I could also decorate the property method return value:
... def bar(self) -> int:


...and when the typing-hint is added to the property's def, the help 
listing still doesn't change/improve.



That said, I've been following this last convention since moving to typing.

Putting a separate description at the beginning of the class invites the 
reader to think of 'foo' as an integer. That's not 'wrong', in the sense 
that a property is/produces an attribute in the same dotted-notation 
from the object-name. However,there could be quite a lot of code between 
this 'declaration' line and the property def!


However, there is another line of logic built upon the idea that all 
class-attributes should be defined in the class 'header' and all 
instance-attributes in __init__() or __post_init__(). Does this underlie 
the discussion?




I don't see the point though, because you can't access it with get_type_hints.


Correct: if one codes (only) the property-bar, then:

>>> get_type_hints( Foo )
{}

However, reverting back to the first class-definition, we do see 
something for our money:


>>> get_type_hints( foo )
{'bar': }

Unfortunately, as mentioned above, there is this confusion between the 
two 'bar's...


Proof?

If we change things, the result is not what (it would appear) is desired:

>>> class Foo:
...   bar:str
...   @property
...   def bar( self ):
... return 1
...
>>> get_type_hints( Foo )
{'bar': }

Yet the 'bar' property will return an int!

...and this is proven/made worse when we add explicit typing to the 
property definition:


>>> class Foo:
...   bar:str
...   @property
...   def bar( self )->int:
... return 1
...
>>> get_type_hints( Foo )
{'bar': }

Our documentation entries don't agree, and don't match 'reality'. Ouch!

Beyond that, I won't hazard a guess at the minds of the 'Python gods' 
who design and implement these things. However, please remember that in 
this discussion we have been using Python itself, whereas the docs and 
PEP-justifications for typing clearly say:


<<<
Note The Python runtime does not enforce function and variable type 
annotations. They can be used by third party tools such as type 
checkers, IDEs, linters, etc.

>>>

which may stump whatever the aim in using get-type-hints() may have been.


If we're only talking about code-review, then (personal) comment of 
'documenting' the method-definition applies.

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


[issue26131] Raise ImportWarning when loader.load_module() is used

2020-12-09 Thread Brett Cannon


Brett Cannon  added the comment:

What is "VendorImporter" (see the message of the ImportWarning)? That's not in 
the stdlib, so it looks like your system is injecting something via some `.pth` 
file or environment variable that doesn't define exec_module().

--

___
Python tracker 

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



[issue42417] Empty body {} in POST requests leads to 405 Method not allowed error

2020-12-09 Thread Bhushan Shelke


Bhushan Shelke  added the comment:

Any update on this? Did the files I submitted help in reproducing/identifying 
the issue?

--

___
Python tracker 

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



Re: Unable to download

2020-12-09 Thread Bob Gailer
On Wed, Dec 9, 2020, 11:46 AM Siddarth Adiga 
wrote:

> Hello. I wanted to download the Python Version 3.9.1 but it said there was
> already another version of Python already installed. But I have deleted the
> program from the ADD OR REMOVE PROGRAMS option. But still I am unable to
> download it. Please help.


What OS are you using?

Exactly what did you do to download?
Exactly what did the error.message say?

Bob Gailer

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


[issue40747] sysconfig.get_config_var("py_version_nodot") should return 3_10

2020-12-09 Thread Mark Shannon


Mark Shannon  added the comment:

What's blocking this?
It is a real pain not to be able to install packages for 3.10.

I don't much care what the format is, but since there seems to be some 
difficulty in changing it, why not leave the output as `310`?

It isn't ambiguous, as long as we specify how to parse the number:
2 digits: XY.  X = major, Y = minor
3 digits: XYY. X = major, YY = minor
4 digits: XXYY. XX = major, YY = minor

So 31.0 will be `3100`.

That should be good for a millenium or so :)

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue26131] Raise ImportWarning when loader.load_module() is used

2020-12-09 Thread Brandt Bucher


Brandt Bucher  added the comment:

I'm seeing the following test failure locally on master (doesn't seem to be 
showing up in CI though). I'm not too familiar with this stuff, but it looks 
related to this change:

==
FAIL: test_all (test.test___all__.AllTest) (module='distutils.command')
--
Traceback (most recent call last):
  File "/home/bucher/src/cpython/Lib/test/test___all__.py", line 55, in 
check_all
self.assertEqual(keys, all_set, "in module {}".format(modname))
  File "/home/bucher/src/cpython/Lib/contextlib.py", line 140, in __exit__
next(self.gen)
  File "/home/bucher/src/cpython/Lib/test/support/warnings_helper.py", line 
177, in _filterwarnings
raise AssertionError("unhandled warning %s" % reraise[0])
AssertionError: unhandled warning {message : 
ImportWarning('VendorImporter.exec_module() not found; falling back to 
load_module()'), category : 'ImportWarning', filename : '', lineno : 681, line : None}

--

Should we be ignoring the new warning in this test as well? I'm still not sure 
why I seem to be the only one seeing it.

--
nosy: +brandtbucher

___
Python tracker 

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



Re: numpy/python (image) problem

2020-12-09 Thread Paulo da Silva
Às 05:55 de 09/12/20, Paulo da Silva escreveu:
> Hi!
> 
> I am looking at some code, that I found somewhere in the internet, to
> compute DCT for each 8x8 block in an gray (2D) image (512x512).
> 
> This is the code:
> 
> def dct2(a):
> return
> scipy.fft.dct(scipy.fft.dct(a,axis=0,norm='ortho'),axis=1,norm='ortho')
> 
> imsize=im.shape
> dct=np.zeros(imsize)
> 
> # Do 8x8 DCT on image (in-place)
> for i in r_[:imsize[0]:8]: # Seems the same as "for i in
> np.arange(0,imsize[0],8)"!
> for j in r_[:imsize[1]:8]:
> dct[i:(i+8),j:(j+8)]=dct2(im[i:(i+8),j:(j+8)])
> 
> I tried to do the same thing with:
> 
> imsize=im.shape
> im8=im.reshape(imsize[0]*imsize[1]//8//8,8,8)
> dct_test=np.asarray([dct2(im8x) for im8x in im8])
> dct_test=dct_test.reshape(imsize)
> 
> so that dct_test should be equal to (previous) dct.
> But they are completely different.
> 
> What am I doing wrong?
> 
This was silly :-)
The first code splits the image in 8x8 squares.
The last one builds 8x8 squares from each line in sequence!

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


[issue41928] ZipFile does not supports Unicode Path Extra Field (0x7075) zip header field

2020-12-09 Thread Andrea Giudiceandrea


Change by Andrea Giudiceandrea :


--
nosy: +andreaerdna

___
Python tracker 

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



[issue42517] Enum: do not convert private names into members

2020-12-09 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



Unable to download

2020-12-09 Thread Siddarth Adiga
Hello. I wanted to download the Python Version 3.9.1 but it said there was
already another version of Python already installed. But I have deleted the
program from the ADD OR REMOVE PROGRAMS option. But still I am unable to
download it. Please help...
-- 
https://mail.python.org/mailman/listinfo/python-list


Python idle did not open even after trying many times

2020-12-09 Thread avinash gaur
Dear Sir/Mam,
I am facing a problem with Python Idle. I am unable to open python idle
even after clicking on it so many times. I am using Python 3.7 on Windows.
I have already installed and uninstalled python 3.7 so many times. But it
is not working
Any help will be appreciated
Thanking you
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue42517] Enum: do not convert private names into members

2020-12-09 Thread Ethan Furman


Ethan Furman  added the comment:

Make that deprecate in 3.9, work correctly in 3.10.

--

___
Python tracker 

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



[issue42603] Tkinter: pkg-config is not used to get location of tcl and tk headers/libraries

2020-12-09 Thread Manolis Stamatogiannakis


Change by Manolis Stamatogiannakis :


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

___
Python tracker 

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



[issue38893] broken container/selinux integration

2020-12-09 Thread Christian Heimes


Christian Heimes  added the comment:

I have created a new PR that introduces preserve_security_context argument and 
changes the default behavior of copy operations. All copy operations behave now 
similar to "cp -p --preserve=xattr" by default. copy2(src, dst, 
preserve_security_context=True) restores the old, problematic behavior that is 
similar to "cp -p --preserve=xattr,context".

It's not completely equivalent because I decided to omit all attributes in the 
restricted "security" xattr namespace. coreutils only handles 
"security.selinux" on an SELinux enabled system differently.

--

___
Python tracker 

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



[issue38893] broken container/selinux integration

2020-12-09 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +22580
pull_request: https://github.com/python/cpython/pull/23720

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2020-12-09 Thread dimitri.wei


dimitri.wei  added the comment:

test comment

--
components: +Build -Cross-Build
nosy: +wlf100220

___
Python tracker 

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



[issue42610] Get the type from a variable

2020-12-09 Thread dimitri.wei


Change by dimitri.wei :


--
title: Get the type from a var -> Get the type from a variable

___
Python tracker 

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



[issue42610] Get the type from a var

2020-12-09 Thread dimitri.wei


Change by dimitri.wei :


--
title: Get the type of from a var -> Get the type from a var

___
Python tracker 

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



[issue42610] Get the type of from a var

2020-12-09 Thread dimitri.wei


Change by dimitri.wei :


--
components:  -Demos and Tools

___
Python tracker 

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



[issue42610] Get the type of from a var

2020-12-09 Thread dimitri.wei


New submission from dimitri.wei :

**Feature**
A similar feature in typescript
```ts
const foo: number = 1
type Foo = typeof foo  // type Foo = number

function bar(x: string): void {

}

type Bar = typeof bar // type Bar = (x: string) => void
```

**Pitch**
The expected way in future python.
```py
from typing import Type
foo: int = 1
Foo = Type[foo]  # equivalent to Foo = int

def bar(x: string) -> None :
...
Bar = Type[bar]  # equivalent to Bar = Callable[[str], None]
```

--
components: Demos and Tools
messages: 382792
nosy: wlf100220
priority: normal
severity: normal
status: open
title: Get the type of from a var
type: enhancement
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



[issue42609] Eval with too high string multiplication crashes newer Python versions

2020-12-09 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



[issue31904] Python should support VxWorks RTOS

2020-12-09 Thread Peixing Xin


Change by Peixing Xin :


--
pull_requests: +22579
pull_request: https://github.com/python/cpython/pull/23718

___
Python tracker 

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



[issue42609] Eval with too high string multiplication crashes newer Python versions

2020-12-09 Thread Erik Lamers


Change by Erik Lamers :


--
title: Eval with two high string multiplication crashes newer Python versions 
-> Eval with too high string multiplication crashes newer Python versions

___
Python tracker 

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



[issue42609] Eval with two high string multiplication crashes newer Python versions

2020-12-09 Thread Erik Lamers


Change by Erik Lamers :


--
versions: +Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue42609] Eval with two high string multiplication crashes newer Python versions

2020-12-09 Thread Erik Lamers


New submission from Erik Lamers :

For Python version 3.7 and above the following statement will end up in a 
segfault.

eval("1 + 100"*100)

Whereas Python versions 3.6 and below would tread this as a Recursion error.

--
components: Interpreter Core
messages: 382791
nosy: Erik-Lamers1
priority: normal
severity: normal
status: open
title: Eval with two high string multiplication crashes newer Python versions
type: crash
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



[issue42608] Installation failed from source code on Debian ([307/416] test_socket)

2020-12-09 Thread ali


New submission from ali :

I'm following guide below to install Python3.7 from source on Debian-64Bit.

https://linuxize.com/post/how-to-install-python-3-7-on-ubuntu-18-04/

I'm installing Python3.7.9-final-64bit.

But `make -j 8` hanged out more than 2 hours  on:
0:22:43 load avg: 1.29 [307/416] test_socket

How to fix it !/?

--
components: Build
messages: 382790
nosy: alimp5
priority: normal
severity: normal
status: open
title: Installation failed from source code on Debian ([307/416] test_socket)
type: crash
versions: Python 3.7

___
Python tracker 

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