ANN: pvlib-0.8.0 python package for solar energy modeling

2020-09-08 Thread Dr. Mark Alexander Mikofski PhD
Dear Pythonistas and Solar Energy enthusiasts,

I am very happy to announce a new, major release of pvlib python, for
simulating the performance of photovoltaic solar energy systems.

*See what's new for v0.8.0:*
* https://pvlib-python.readthedocs.io/en/stable/whatsnew.html

*Releases are available from the CheeseShop and the conda-forge channel:*
* https://pypi.org/project/pvlib/
* https://anaconda.org/conda-forge/pvlib-python

*Read the Documentation:*
* https://pvlib-python.readthedocs.io/en/stable/index.html

*Report issues & contribute:*
* https://github.com/pvlib/pvlib-python

*Highlights:*
* Because this is a major release, there are many breaking changes so
please read through the release notes carefully before updating
* Python-3.5 is no longer supported, SciPy-1.2.0 is now a required
dependency, and the Pandas minimum version is now v0.22.0
* New functions for calculation of sky-diffuse irradiance, fitting PV
module IV-curve traces to single-diode model coefficients, and
accommodating terrain slope when backtracking.
* Many new contributors, bug fixes, and improvements in the documentation.
* Also coming soon, AirSpeed Velocity benchmarks. Stay tuned!

*The development team thanks you for using pvlib python!*

-- 
Mark Mikofski, PhD (2005)
*Fiat Lux*
___
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


[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

That all makes sense (including the full migration).

--

___
Python tracker 

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



Module exists and cannot be found

2020-09-08 Thread James Moe via Python-list
python 3.6.10
opensuse tumbleweed
linux 5.8.4

An old program based on Python (BackInTime) has recently been having
difficulties functioning. See below.

Module PyQt5 is most definitely installed. Apparently there is more to getting
modules loaded than there used to be.

(Also, I am not familiar with Python.)

[ error message (verbose option) ]
Traceback (most recent call last):
  File "/home/jmoe/diy/backintime-master/qt/app.py", line 35, in 
import qttools
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in _call_with_frames_removed
  File "/home/jmoe/diy/backintime-master/qt/qttools.py", line 21, in 
from PyQt5.QtGui import (QFont, QColor, QKeySequence)
  File "", line 971, in _find_and_load
  File "", line 941, in _find_and_load_unlocked
  File "", line 219, in _call_with_frames_removed
  File "", line 971, in _find_and_load
  File "", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'PyQt5'
[ end ]

[ the 1st code lines causing the above ]
qttools.py:
  import os
  import sys
  import gettext
  from PyQt5.QtGui import (QFont, QColor, QKeySequence) <<<-- line 21
  ...

app.py:
  import os
  import sys

  if not os.getenv('DISPLAY', ''):
os.putenv('DISPLAY', ':0.0')

  import datetime
  import gettext
  import re
  import subprocess
  import shutil
  import signal
  from contextlib import contextmanager
  from tempfile import TemporaryDirectory

  import qttools<<<--- line 35
  qttools.registerBackintimePath('common')
  ...
[ end ]

-- 
James Moe
jmm-list at sohnen-moe dot com
Think.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41749] Little improve on imghdr library

2020-09-08 Thread Emmanuel Arias


Change by Emmanuel Arias :


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

___
Python tracker 

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



[issue41749] Little improve on imghdr library

2020-09-08 Thread Emmanuel Arias


New submission from Emmanuel Arias :

For the `what()` function, the `file` parameter is always needed.
In despite of that users can use `h` for send a bytes stream to 
detect the kind of the image, the `file` parameter is need.

Don't have sense ask for `file` parameter when this parameter will
not any effect on the result of the `what` function.

--
components: Library (Lib)
messages: 376618
nosy: eamanu
priority: normal
severity: normal
status: open
title: Little improve on imghdr library
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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Guido van Rossum


Guido van Rossum  added the comment:

I guess some of my gripes about ASDL have to do with our tooling. For example I 
find it annoying that the 'kind' enums overlap, so if I have a void* that I 
know points to an AST node I can't look at the kind to tell what it is.

Anyway, regarding Pablo's proposal, I think that if we do it, we should do a 
full migration, not a piecemeal one. I think the vast majority of asdl_seq_GET 
calls are immediately preceded by a cast anyway, and the majority of 
asdl_seq_SET calls are in generated code.

--

___
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-08 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 3ff6975e2c0af0399467f234b2e307cc76efcfa9 by Mohamed Koubaa in 
branch 'master':
bpo-1635741: port scproxy to multi-phase init (GH-22164)
https://github.com/python/cpython/commit/3ff6975e2c0af0399467f234b2e307cc76efcfa9


--

___
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-08 Thread mohamed koubaa


Change by mohamed koubaa :


--
pull_requests: +21239
pull_request: https://github.com/python/cpython/pull/22165

___
Python tracker 

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



Re: newbie

2020-09-08 Thread Grant Edwards
On 2020-09-08, Don Edwards  wrote:

> I may need. My aim is to write a program
> that simulates croquet - 2 balls colliding with the strikers (cue) ball
> going into the hoop (pocket), not the target ball. I want to be able to
> move the balls around and draw trajectory lines to evaluate different
> positions. Is there a package for this or maybe one to draw and one to
> move? Any help much appreciated.

Is pygame still a thing?

--
Grant


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


[issue41747] dataclasses: generated method's using the wrong qualname

2020-09-08 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> eric.smith

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I know it's moot now, but still -- what benefit do we get 
> from using a "standard" like ASDL?

The "standard" part of it isn't important.  AFAICT, ASDL has a low adoption 
rate and is not maintained.

IMO, the part that matters is that ADSL was carefully balanced to be 
sufficiently expressive while keeping it easy to implement and easy to 
automatically translate into different languages.  Presumably, this will not 
only help other Python implementations and third-party tooling, it will also 
make life easier for us in the long run.

My understanding of the origin of ASDL is that it aspired to solve a common 
problem in language design where people commonly described their abstract 
syntax in way that was too tightly bound to underlying implementation language. 
 This caused long-run problems when reimplementing in other languages and when 
trying to automatically update downstream tools that interoperate with the AST.

In this regard, my personal experience with ASDL has been favorable.  I view it 
as the JSON spec of the AST world, intentionally minimal yet expressive.

That said, I think it failed to establish itself as a standard and almost no 
tooling was created for it.  The original authors expected that ASDL would sit 
side-by-side with BNF and regex notation.  That was a pipe dream.

--

___
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-08 Thread mohamed koubaa


Change by mohamed koubaa :


--
pull_requests: +21238
pull_request: https://github.com/python/cpython/pull/22164

___
Python tracker 

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



[issue19438] Where is NoneType in Python 3?

2020-09-08 Thread Andrés Delfino

Andrés Delfino  added the comment:

types.NoneType was removed here: 
https://github.com/python/cpython/commit/c9543e42330e5f339d6419eba6a8c5a61a39aeca#diff-0f021aec4e35b86a3160d44069dec997

The thing of adding NoneType to types that is somewhat unpleasing to me is that 
it's named exactly as the actual type. Seems confusing.

--

___
Python tracker 

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



[issue19438] Where is NoneType in Python 3?

2020-09-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I would support adding NoneType back to the types module.  Am not sure why it 
was ever removed.  It has a much reason to exists as types.FunctionType which 
is a clear, well-named short-cut for "type(lambda :None)".

--
nosy: +rhettinger

___
Python tracker 

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



[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread miss-islington


miss-islington  added the comment:


New changeset 11a82c7220a29aa1cabd6a1b042742b44c9c9b91 by Miss Islington (bot) 
in branch '3.9':
bpo-41525: Make the Python program help ASCII-only (GH-21836)
https://github.com/python/cpython/commit/11a82c7220a29aa1cabd6a1b042742b44c9c9b91


--

___
Python tracker 

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



[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread miss-islington


miss-islington  added the comment:


New changeset 9171dc2827650a1a3c20dee994145e335befa00e by Miss Islington (bot) 
in branch '3.8':
bpo-41525: Make the Python program help ASCII-only (GH-21836)
https://github.com/python/cpython/commit/9171dc2827650a1a3c20dee994145e335befa00e


--

___
Python tracker 

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



[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread William Pickard


Change by William Pickard :


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



[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 58de1dd6a8677bd213802c19204b827cb7134695 by Serhiy Storchaka in 
branch 'master':
bpo-41525: Make the Python program help ASCII-only (GH-21836)
https://github.com/python/cpython/commit/58de1dd6a8677bd213802c19204b827cb7134695


--
nosy: +pablogsal

___
Python tracker 

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



[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21237
pull_request: https://github.com/python/cpython/pull/22163

___
Python tracker 

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



[issue41525] Python '--help' has corrupted text.

2020-09-08 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



Re: newbie

2020-09-08 Thread Cameron Simpson
On 08Sep2020 10:22, Don Edwards  wrote:
>Purchased the book python-basics-2020-05-18.pdf a few days ago.
>To direct my learning I have a project in mind as per below;

A project is an excellent way to learn something; personally I find it 
hard to learn something without something to which to apply it.

>Just started learning python 3.8. At 76 I will be a bit slow but
>fortunately decades ago l learnt pascal.

Aye; I find Python has a very similar "heft" to Pascal - nicely English 
language like "prose" syntax.

>I am not asking programming help
>just guidance toward package(s) I may need. My aim is to write a program
>that simulates croquet - 2 balls colliding with the strikers (cue) ball
>going into the hoop (pocket), not the target ball. I want to be able to
>move the balls around and draw trajectory lines to evaluate different
>positions. Is there a package for this or maybe one to draw and one to
>move? Any help much appreciated.

Python ships with a "tkinter" module which lets you define a GUI 
interface. You probably want some kind of "canvas" or "image" widget 
from within that to render your playing field diagrams/visualisations.

Someone else will have to speak to a nice geometry package for simple 3d 
renders and lines/angles etc.

Cheers,
Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Opening python

2020-09-08 Thread Cameron Simpson
On 08Sep2020 12:33, Rnyx_ Scarl01  wrote:
>Hello I've downloaded the newest python but I can't find the python
>compiler app eventhough I've already downloaded tge necessary files. What
>shoukd I do?

After a download it is normally necessary to run the installer.

Python is an interpreted language; the compiler phase runs as an 
automatic component of interpreting a Python script.

If there isn't an obvious installer, or you've run the installer but 
still cannot invoke Python, we need more detail:

- what did you download, and from where?

- what operating system are you using?

- what have you done with the download so far?

Cheers,
Cameron Simpson 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue19438] Where is NoneType in Python 3?

2020-09-08 Thread Andrés Delfino

Change by Andrés Delfino :


--
keywords: +patch
nosy: +adelfino
nosy_count: 3.0 -> 4.0
pull_requests: +21235
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22161

___
Python tracker 

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



[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

On Tue, Sep 08, 2020 at 06:23:58PM +, David Williams wrote:
> Steven, it sounds like we agree to the change proposal, which is to 
> remove gendered language from the documentation.

What?

Did you even read what I wrote?

--

___
Python tracker 

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



Re: Fwd: PYTHON BUG. deleting elements of list.

2020-09-08 Thread Richard Damon
On 9/8/20 7:06 PM, Mats Wichmann wrote:
> On 9/7/20 5:01 PM, Driuma Nikita wrote:
>
>
>  _list = list(range(50))
>  for i, el in enumerate(_list):
>  del _list[i]
>  print(_list)
>
>
> Don't change the the list while you are iterating over it, it messes up
> the iteration. It's not "randomly deleting", it's when next is called to
> fetch the next item, the list has changed.
>
> One workaround is to iterate over a copy. For example here's using
> slicing to create a new list to iterate over:
>
> for i, el in enumerate(_list[:]):
>  del _list[i]
>
The issue isn't so much that he is modifying the list that he is
iterating over, but also when he deletes _list[0], all the other
elements move down, so the next time when he does a del _list[1], that
will delete what started as _list[2], and with your code, when he gets
half way done he will hit an index error as he tries to delete _list[26]
from a list with only 25 elements.

-- 
Richard Damon

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


Re: Fwd: PYTHON BUG. deleting elements of list.

2020-09-08 Thread Mats Wichmann
On 9/7/20 5:01 PM, Driuma Nikita wrote:


 _list = list(range(50))
 for i, el in enumerate(_list):
 del _list[i]
 print(_list)


Don't change the the list while you are iterating over it, it messes up
the iteration. It's not "randomly deleting", it's when next is called to
fetch the next item, the list has changed.

One workaround is to iterate over a copy. For example here's using
slicing to create a new list to iterate over:

for i, el in enumerate(_list[:]):
 del _list[i]

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


[issue41748] HTMLParser: parsing error

2020-09-08 Thread Ademar Nowasky Junior


Change by Ademar Nowasky Junior :


--
type: crash -> security

___
Python tracker 

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



Re: Opening python

2020-09-08 Thread Mats Wichmann
On 9/7/20 11:33 PM, Rnyx_ Scarl01 wrote:
> Hello I've downloaded the newest python but I can't find the python
> compiler app eventhough I've already downloaded tge necessary files. What
> shoukd I do?


What have you tried?

And what platform are you on?  This is mildly more involved on Windows.


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


[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> I know it's moot now, but still -- what benefit do we get from using a 
> "standard" like ASDL? All our tooling for it is custom for Python only.

I think there are other tools or implementations of Python that use standard 
parsers for our ASDL file.

In any case, AFAIU we don't need to modify the current ASDL definition as it 
already has type information that we need. For instance:

 | Block(int blocknum, stmt* stmts)

that says that stmts is a sequence of stmt objects, but unfortunately, this is 
translated as an "asdl_seq" type, losing the information that it can only 
contain stmt types. This is what I am planning to address here.

--

___
Python tracker 

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



[issue41748] HTMLParser: parsing error

2020-09-08 Thread Ademar Nowasky Junior


New submission from Ademar Nowasky Junior :

HTML tags that have a attribute name starting with a comma character aren't 
parsed and break future calls to feed(). 

The problem occurs when such attribute is the second one or later in the HTML 
tag. Doesn't seems to affect when it's the first attribute.

#POC:

from html.parser import HTMLParser

class MyHTMLParser(HTMLParser):
def handle_starttag(self, tag, attrs):
print("Encountered a start tag:", tag)

parser = MyHTMLParser()

#This is ok
parser.feed('')

#This breaks
parser.feed('')

#Future calls to feed() will not work
parser.feed('')

--
components: Library (Lib)
messages: 376607
nosy: nowasky.jr
priority: normal
severity: normal
status: open
title: HTMLParser: parsing error
type: crash
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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Guido van Rossum


Guido van Rossum  added the comment:

I know it's moot now, but still -- what benefit do we get from using a 
"standard" like ASDL? All our tooling for it is custom for Python only.

--

___
Python tracker 

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



[RELEASE] Python 3.8.6rc1 is now ready for testing

2020-09-08 Thread Łukasz Langa
Python 3.8.6rc1 is the release candidate of the sixth maintenance release of 
Python 3.8. Go get it here:

https://www.python.org/downloads/release/python-386rc1/ 


Assuming no critical problems are found prior to 2020-09-21, the scheduled 
release date for 3.8.6, no code changes are planned between this release 
candidate and the final release.

That being said, please keep in mind that this is a pre-release and as such its 
main purpose is testing.

Maintenance releases for the 3.8 series will continue at regular bi-monthly 
intervals, with 3.8.7 planned for mid-November 2020.

What’s new?

The Python 3.8 series is the newest feature release of the Python language, and 
it contains many new features and optimizations. See the “What’s New in Python 
3.8 ” document for more 
information about features included in the 3.8 series.

Python 3.8 is becoming more stable. Our bugfix releases are becoming smaller as 
we progress. This one contains 80 changes, not even a half of what we got in 
3.8.4 (the following release was a hotfix). Detailed information about all 
changes made in version 3.8.6 specifically can be found in its change log 
.

We hope you enjoy Python 3.8!

Thanks to all of the many volunteers who help make Python Development and these 
releases possible! Please consider supporting our efforts by volunteering 
yourself or through organization contributions to the Python Software 
Foundation.

Your friendly release team,
Ned Deily @nad 
Steve Dower @steve.dower 
Łukasz Langa @ambv 
___
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


[RELEASE] Python 3.8.6rc1 is now ready for testing

2020-09-08 Thread Łukasz Langa
Python 3.8.6rc1 is the release candidate of the sixth maintenance release of 
Python 3.8. Go get it here:

https://www.python.org/downloads/release/python-386rc1/ 


Assuming no critical problems are found prior to 2020-09-21, the scheduled 
release date for 3.8.6, no code changes are planned between this release 
candidate and the final release.

That being said, please keep in mind that this is a pre-release and as such its 
main purpose is testing.

Maintenance releases for the 3.8 series will continue at regular bi-monthly 
intervals, with 3.8.7 planned for mid-November 2020.

What’s new?

The Python 3.8 series is the newest feature release of the Python language, and 
it contains many new features and optimizations. See the “What’s New in Python 
3.8 ” document for more 
information about features included in the 3.8 series.

Python 3.8 is becoming more stable. Our bugfix releases are becoming smaller as 
we progress. This one contains 80 changes, not even a half of what we got in 
3.8.4 (the following release was a hotfix). Detailed information about all 
changes made in version 3.8.6 specifically can be found in its change log 
.

We hope you enjoy Python 3.8!

Thanks to all of the many volunteers who help make Python Development and these 
releases possible! Please consider supporting our efforts by volunteering 
yourself or through organization contributions to the Python Software 
Foundation.

Your friendly release team,
Ned Deily @nad 
Steve Dower @steve.dower 
Łukasz Langa @ambv 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41734] Refactor b32{encode,decode} tests

2020-09-08 Thread Paul Ganssle

Paul Ganssle  added the comment:

I agree with Filipe here — I think the b32encode/b32decode tests were 
originally written before subtests were available, and this PR has this and 
other real improvements.

I understand why you'd want to have a policy of "no refactoring for its own 
sake", but as I argued in the PR 20441 
(https://github.com/python/cpython/pull/20441#issuecomment-634773049), it's 
safer to leave existing tests alone when making changes to the code under test, 
since there's the possibility that you both introduce an error *and* modify the 
tests in such a way that doesn't catch the error you introduced. In that case, 
"refactoring as you go" doesn't really work, and you need a separate PR for 
improvements like these.

I'm re-opening the ticket for now because I think we should at least discuss 
this before rejecting it out of hand.


> I am a bit confused, in PR 20441 I first just copied the current 
> b32{encode,decode} tests but was given feedback which resulted in the 
> proposed tests, but now I am being told the opposite, that the tests are 
> better as they currently are.

Sorry about the mixed messages. I think you simply chalk this up to the fact 
that Serhiy and I apparently disagree about test structure. I reviewed the 
previous PR and specifically asked for this change, so I think it was a bit 
rash to close the issue right away (though as someone who has probably 
prematurely closed his fair share of issues, I should probably not be tossing 
about stones in the vicinity of my decidedly double-paned domicile).

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Well, since the extra code will be autogenerated, guess it wouldn't be much 
> problematic. But I see about the PEG thing.


On the other hand, having explicit types for the sequences will allow us to get 
compile errors instead of runtime errors for the standard types, so this may be 
a good possibility. Maybe some mixture of both:

* asdl_seq objects can contain an enum describing what they are.
* We have specific specializations for adding to ASDL types.

--

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> No, I am not proposing any modification to the ASDL parsers nor 
> the ASDL definition language.  I am proposing a modification to 
> the internal data structures we use internally to carry sequences
> of ASDL types.

Thanks for the clarification.  Carry on :-)

--

___
Python tracker 

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



Opening python

2020-09-08 Thread Rnyx_ Scarl01
Hello I've downloaded the newest python but I can't find the python
compiler app eventhough I've already downloaded tge necessary files. What
shoukd I do?
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Well, since the extra code will be autogenerated, guess it wouldn't be much 
> problematic. 

It will because it means that generic functions that receive asdl_seq an need 
to cast aliased pointers because they will still receive asdl_seq* items and 
you now need to cars them to the appropriate type:

int foo(asdl_seq* my_seq) {
asdl_seq_expr* = (asdl_seq_expr*)my_seq
}

So you will end up with what I am proposing: a flag in asdl_seq that tells you 
of what type it is.

--

___
Python tracker 

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



newbie

2020-09-08 Thread Don Edwards
Purchased the book python-basics-2020-05-18.pdf a few days ago.
To direct my learning I have a project in mind as per below;

Just started learning python 3.8. At 76 I will be a bit slow but
fortunately decades ago l learnt pascal. I am not asking programming help
just guidance toward package(s) I may need. My aim is to write a program
that simulates croquet - 2 balls colliding with the strikers (cue) ball
going into the hoop (pocket), not the target ball. I want to be able to
move the balls around and draw trajectory lines to evaluate different
positions. Is there a package for this or maybe one to draw and one to
move? Any help much appreciated.

-- 
Regards, Don Edwards
I aim to live forever - or die in the attempt. So far so good!
Perth Western Australia
-- 
https://mail.python.org/mailman/listinfo/python-list


Fwd: PYTHON BUG. deleting elements of list.

2020-09-08 Thread Driuma Nikita
    
    
    Пересылаемое сообщение 
   08.09.2020, 01:43, "python-list-ow...@python.org"
   :
    

   Hello! I see you want to post a message to the Python List. We would
   be happy to help, but you must subscribe first:

     [1]https://mail.python.org/mailman/listinfo/python-list

   After you have subscribed, please send your message to
   [2]python-list@python.org again. Please do not include images as this is
   a text-only forum -- instead, copy/paste or transcribe the information
   from the image that you want us to know.

   Alternatively, this list is mirrored both ways with the
   comp.lang.python newsgroup (news:comp.lang.python).

   Some people find it easier to follow this and other lists via gmane
   ([3]http://news.gmane.org/gmane.comp.python.general), a service which
   offers a newsgroup interface to many online mailing lists.

   *NB all posts to the mailing list are publicly archived at:*

     [4]https://mail.python.org/pipermail/python-list

    

    
    Конец пересылаемого сообщения 
    
    
   With Regards.
   Python is best.
    

References

   Visible links
   1. https://mail.python.org/mailman/listinfo/python-list
   2. mailto:python-list@python.org
   3. http://news.gmane.org/gmane.comp.python.general
   4. https://mail.python.org/pipermail/python-list
--- Begin Message ---
   Hello, python creators and bug fixers.
   I have same strange Basic-type problem time after time.
   Deleting elements of lists - is Basic of basics thing. And i can't count
   on it. It doesn't work in some cases.
   I found a simple example, and example of my problem - to modify the string
   data that i got from parsing internet, web-data - this is the case i got
   the problem.
    
   Simple Example 1.
   I expect to delete all/any elements by index from list by using del,
   .remove(), pop() - it must work as usually. But that doesn't happens.

 _list = list(range(50))
 for i, el in enumerate(_list):
     del _list[i]
 print(_list)

   result:

 # [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35,
 37, 39, 41, 43, 45, 47, 49]

   Same for pop(i) and remove(el).
    
   Works only filter(), creating new _list2 with .append()
   , with SAME IF-statements - as for delete.(thats for Example 2 and problem
   i met with)
    
   Example 2.
   I got a string from parsing something from internet. This is a body of one
   message from my Gmail this time.
   And there is no any way to delete empty elements in existing list to
   pretty the final output-data.
   Sometimes it deletes random elements, but not all. Sometimes deletes
   nothing.
   Another diagnose - tried to take len() of of each element, and it says 0
   to non zero elements.
   The only solution is to create a new list and append needed items instead
   of delete non-needed in first-list.
    
   There are many EMPTY elements. I do .split("'r\n") and trying to run a
   FOR-cycle.
   The list example:
   ['Вы вошли в аккаунт Google с нового Xiaomi HM Note 2', '', '', '', 'Для
   завершения настройки установите официальные приложения от Google.', '',
   '', 'Google Sheets', '', 'Google Sheets', '', 'Создавайте таблицы и
   работайте над ними вместе', '', '4.5/5 Stars', '', '', '', '', '',
   'СКАЧАТЬ', '', '', '', '', '', '', '', 'Google Calendar', '', 'Google
   Calendar', '', 'Все ваши календари, мероприятия и встречи в одном
   приложении', '', '', '', '', '', '', '', 'СКАЧАТЬ', '', '', '', '', '',
   '', '', 'Google Duo', '', 'Google Duo', '', 'Проводите видеовстречи с
   высоким качеством изображения', '', '4.5/5 Stars', '', '', '', '', '',
   'СКАЧАТЬ', '', '', '', '', '', '', '', 'Не отвечайте на это письмо. Вы
   получили это сообщение, так как недавно  ', 'активировали свой аккаунт
   Google на Xiaomi HM Note 2.', '', '', '', '© 2018 Google LLC 1600
   Amphitheatre Parkway, Mountain View, CA 94043, USA', '', '', '', '',
   '—', '', '', '', '']
   With Regards.
--- End Message ---
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> That's a possibility, but that would incur in a lot of new extra code, and 
> some asdl_seq items in the parser contain non-standard types that only PEG 
> uses, so is not possible to auto-generate them.

Well, since the extra code will be autogenerated, guess it wouldn't be much 
problematic. But I see about the PEG thing.

--

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

The problem with asdl_seq_int was that it was hard-coded since there was no 
entity that transpods data between different traversers / node visitors. PR 
20193 tries to implement a general-purpose metadata system to eliminate that 
issue, and can be easily extended for this too!

--

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Why not just include these in the Python-ast.h and auto-generate them in the 
> asdl_c.py

That's a possibility, but that would incur in a lot of new extra code, and some 
asdl_seq items in the parser contain non-standard types that only PEG uses, so 
is not possible to auto-generate them.

--

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Let me know if I'm misunderstanding the proposal.  Are you proposing a 
> non-standard ASDL extension to that won't work with existing ASDL parsers? 

No, I am not proposing any modification to the ASDL parsers nor the ASDL 
definition language.

I am proposing a modification to the internal data structures we use internally 
to carry sequences of ASDL types. Currently, asdl_seq is a type that holds an 
array of void* pointers and the user is supposed to cast the individual items 
to the correct types, which is error prone. I am proposing to add a new field 
to our internal structures that allows the user to have some certainty over 
what these sequences contain.

--

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

We already have a specialized type for int (actually an enumeration);
typedef struct {
Py_ssize_t size;
void *elements[1];
} asdl_seq;

typedef struct {
Py_ssize_t size;
int elements[1];
} asdl_int_seq;

Why not just include these in the Python-ast.h and auto-generate them in the 
asdl_c.py

--

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Within standard ASDL, the sequences already have an ASDL type.  Here's a 
snippet that shows both builtin types and derived types:

start = Program(stmt* procs, expr* calls)

stmt = Procedure(identifier name, identifier* params, bool is_test, stmt body)
 | Block(int blocknum, stmt* stmts)
 | Assign(lvalue target, expr value)
 | If(expr cond, stmt action)
 | Loop(int times, bool fixed, body stmt)
 | AbortLoop(int blocknum)
 | QuitBlock(int blocknum)

expr = BinOp(expr value1, str op, expr value2)
 | Number(int x)
 | Bool(bool x)
 | Id(identifier name)
 | Call(identifier name, expr* args)
 | lvalue

lvalue = Output(bool is_bool)
   | Cell(int i)

--

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Let me know if I'm misunderstanding the proposal.  Are you proposing a 
non-standard ASDL extension to that won't work with existing ASDL parsers?  I 
thought the entire point of ASDL is that it was standard, portable, and had a 
fixed number of types easily implemented in many languages.

FWIW, Here are some of my notes from a compiler project I worked on a while 
back:
# ASDL's seven builtin types are:
# - identifier, int, string, bytes, object, singleton, constant
# - singleton: None, True or False
# - constant can be None, whereas None means "no value" for object
#
# Resources for ASDL:
# 
https://www.usenix.org/legacy/publications/library/proceedings/dsl97/full_papers/wang/wang.pdf
# 
https://eli.thegreenplace.net/2014/06/04/using-asdl-to-describe-asts-in-compilers
# https://www.oilshell.org/blog/2016/12/11.html

--
nosy: +rhettinger

___
Python tracker 

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



[issue41747] dataclasses: generated method's using the wrong qualname

2020-09-08 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue41747] dataclasses: generated method's using the wrong qualname

2020-09-08 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

$ cat t.py
from dataclasses import dataclass

@dataclass
class Foo:
bar: int

Foo()
$ python t.py
Traceback (most recent call last):
  File "/home/isidentical/cpython/cpython/t.py", line 7, in 
Foo()
TypeError: __create_fn__..__init__() missing 1 required positional 
argument: 'bar'

--
components: Library (Lib)
messages: 376594
nosy: BTaskaya, eric.smith
priority: normal
severity: normal
status: open
title: dataclasses: generated method's using the wrong qualname
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



[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2020-09-08 Thread Chary Chary

Chary Chary  added the comment:

Dear all, are there any plans to move this quite old issue forward?

I stumbled across this issue, because I found that at the moment there is no 
out of the box solution to use  tempfile.NamedTemporaryFile in Windows in such 
scenario (which is often used in unit testing):

* in test module:
1) create and open temporary file
2) write data to it
3) pass name of the temporary file to the operational code

* In operational code, being tested
1) open file, using name of the temporary file 
2) read data from this temporary file 

--
nosy: +chary314

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-08 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

Casting incorrect elements pulled from asdl_seq objects has been a pain when 
developing the new PEG parser and is a source of spooky-bug-at-a-distance 
problems in which the consequences of an incorrect casting from void* are felt 
much later.

I propose to add a new field to asdl_seq objects, which is an enumeration of 
the possible types it can contain. The main ideas are:

* By default, the enumeration will have UNDEFINED type.
* We can add some extra macros mirroring asdl_seq_GET and asdl_seq_SET that 
will receive the expected type and in debug mode will assert that the type is 
correct. Something like:

expr_ty item = asdl_set_GET_TYPED(sequence, n, EXPR);

* Usage of asdl_seq_GET and asdl_seq_SET do not do extra checks.

* To set the type information, we can add a new constructor:

asdl_seq_new_typed(size, arena, TYPE);

I think this change is worth because is not very invasive (old usage remains 
the same), we can slowly migrate only the parts that we need/want and will add 
some extra debugging possibilities for cases that has been quite challenging.

--
components: Interpreter Core
messages: 376592
nosy: gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Add optional type information to asdl_seq objects
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



[issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process

2020-09-08 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 3fd69991f47a6672c510fafd76bf183f17ac52ec by Irit Katriel in 
branch 'master':
bpo-38762: Extend logging.test_multiprocessing to cover missing cases. 
(GH-22142)
https://github.com/python/cpython/commit/3fd69991f47a6672c510fafd76bf183f17ac52ec


--

___
Python tracker 

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



[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman


Julian Berman  added the comment:

As a secondary behavior here, which is actually the one that matters more for 
my use case, the following seems surprising as well:

import inspect
s = inspect.signature(lambda **kwargs: kwargs).bind()
s.arguments["foo"] = 12

will similarly silently drop "foo" when attempting to call the function (i.e. 
it will not appear in bound.kwargs).

This behavior I suspect is the intention of the docs saying "Contains only 
explicitly bound arguments." but still seems easily misused when .arguments is 
being used as a frontend for adding additional arguments.

To me just brainstorming again it seems it'd be useful to provide a 
harder-to-misuse frontend, e.g. `BoundArguments.with_arguments(*args, 
**kwargs)` that returns a bound arguments with some additional to-be-bound 
arguments which may end up in `kwargs`.

--

___
Python tracker 

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



RE: What this error want to say? Can't we use return without function?

2020-09-08 Thread Schachner, Joseph
I see. You didn't declare a function, it's just a python script. So you don't 
need a return in that situation, the script just ends when there are no more 
lines.

By the way: you certainly don't want to return or quit BEFORE you print(nice).  
 But the fix here is simply to delete "return coun".  Then your script will run.

--- Joseph S.

-Original Message-
From: Shivlal Sharma  
Sent: Monday, September 7, 2020 3:09 AM
To: python-list@python.org
Subject: What this error want to say? Can't we use return without function?

N = int(input("enter a positive integer:")) coun = 1 while (N > 0):
coun = coun * N
N = N - 1
return coun
nice = ntime(N)
print(nice)


error: return outside of the function

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


[issue41733] ContextVar get value is unexpected

2020-09-08 Thread Yury Selivanov


Yury Selivanov  added the comment:

> my expected result is all objects should be different, because the code runs 
> in different context.

Contexts "branch", so if you store something in the context before asyncio.run 
it will store it in the current thread state. And then asyncio.run will pick it 
up.

Also I'd recommend using something else than object IDs - those can be reused 
and can be very confusing when browsing logs -- it might look like it was the 
same object, but in fact it could be to different objects sharing the same ID 
at different points of time.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread David Williams


David Williams  added the comment:

Thanks also for your input and feedback, Ammar.

--

___
Python tracker 

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



[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread Ammar Askar


Change by Ammar Askar :


--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread David Williams


David Williams  added the comment:

Thanks Victor, I will submit a change request for both of the documents you 
specified.

https://www.python.org/dev/peps/pep-3136/ 
https://github.com/python/devguide/issues/605

Steven, it sounds like we agree to the change proposal, which is to remove 
gendered language from the documentation.

--

___
Python tracker 

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



[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread Ammar Askar


Ammar Askar  added the comment:

The other issue aside, changing

"If the programmer wishes to move to the next iteration of an outer enclosing 
loop, or terminate multiple loops at once, he or she has a few less-than 
elegant options."

to

"If the programmer wishes to move to the next iteration of an outer enclosing 
loop, or terminate multiple loops at once, they have a few less-than elegant 
options."

seems pretty straight forward. But like Victor said, this discussion should be 
happening on an issue in the peps repo and not here.

--
nosy: +ammar2

___
Python tracker 

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



[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Hello David,

I really don't think you speak for the entire LGBTQ community. You don't speak 
for me or my wife.

You mention two issues here:

"First is that break and continue don't allow the programmer to do anything, 
they cause the program control flow to change."

And by changing program control flow, they allow the programmer to do many 
things. That's why we use them: because we want to do something, and the break 
and continue statements allow us to do so more conveniently that the 
alternatives.

You say:

"Second, there is no reason to appeal to gendered pronouns which are 
antiquated."

If gendered pronouns are antiquated, why do people care about choosing their 
pronouns?

David, I would like to assume good faith, but coming in here and declaring that 
pronouns are antiquated seems a bit... trollish. I am sure that there are many 
people who do not agree that pronouns are antiquated or irrelevant. I am pretty 
sure that there are some people in the mailing list who would be very upset if 
you misgendered them by insisting that they need no gendered pronouns.

Many people consider their personal choice of pronoun important enough to list 
it in their mail signature or profile, at possible risk to their own safety.

What you describe as "more include[sic] and parsimonious form (less chatter)" 
reads to me as a more passive, excessively terse, less inclusive form that is 
also incorrect, since "Python syntax is limited..." is not a *motivation*. 
Motivation must refer to human desire, and your version not only has no human 
desire, it has no reference to humans at all. It reads to me as a  cold, 
abstract statement divorced from any motivation or human need.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2020-09-08 Thread Martijn Pieters


Martijn Pieters  added the comment:

Might it be better to just *drop* the AutoProxy object altogether?

All that it adds is a delayed call to MakeProxyType(f"AutoProxy[{typeid}]", 
exposed) (with exposed defaulting to public_methods(instance)), per instance 
per process.

It could be replaced by a direct call to `MakeProxyType()`, using 
`public_methods` directly on the registered type. This wouldn't work for 
callables that are not classes or where instances add functions to the instance 
dict, but for those rare cases you can pass in the `exposed` argument.

The advantage is that it would simplify the codebase; no more need to 
special-case the BaseProxy.__reduce__ method, removing the get_methods() method 
on the Server class, etc. Less surface for this class of bugs to happen in the 
future.

--
nosy: +mjpieters

___
Python tracker 

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



[issue41539] print blocks with multiprocessing and buffered output

2020-09-08 Thread Irit Katriel


Irit Katriel  added the comment:

This may be relevant: 
https://stackoverflow.com/questions/9337711/subprocess-popen-not-thread-safe


It points to print() being not thread safe and suggests to use sys.stdout.write 
instead.  That worked for me with your script.

--

___
Python tracker 

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



[issue41703] Most bytecode changes are absent from Python 3.9 What's new

2020-09-08 Thread Mark Shannon


Mark Shannon  added the comment:

The change note for 33387 incorrectly referred to 32949

--
stage: patch review -> 

___
Python tracker 

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



[issue41539] print blocks with multiprocessing and buffered output

2020-09-08 Thread Irit Katriel


Irit Katriel  added the comment:

You're right, this is a different issue. I debugged it a bit and I think the 
race may be between your print statement and the util._flush_std_streams() in 
Popen.__init__() of Lib/multiprocessing/popen_fork.py.

--

___
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-08 Thread Steve Dower


Change by Steve Dower :


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



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

2020-09-08 Thread Steve Dower


Steve Dower  added the comment:

Thanks for the contribution! I think I only ever tested this with the 64-bit 
package... :)

Could you make it so that we include the file under both names? Just for anyone 
(like me) who has hard-coded the python.props name and parametrised the 
directory name.

(If you want to go for bonus points, having the extra file just  the 
other would be a nice touch, but not so important.)

--

___
Python tracker 

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



[issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process

2020-09-08 Thread Irit Katriel


Irit Katriel  added the comment:

We've decided for now to leave the code's behavior as it is (the alternatives 
are worse) and to keep only the test improvements. See discussion on PR 22142.

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



[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman


Change by Julian Berman :


--
nosy: +yselivanov
versions:  -Python 3.8, Python 3.9

___
Python tracker 

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



[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-08 Thread Julian Berman


New submission from Julian Berman :

The following code succeeds "silently", which seems undesirable:

from inspect import signature
def two():
return 2
bound = signature(two).bind()
bound.arguments["does_not_exist"] = 12
two(*bound.args, **bound.kwargs)

where the mechanism for finally calling `two` is the recommended way shown in 
the docs for `inspect.BoundArguments`: 
https://docs.python.org/3/library/inspect.html#inspect.BoundArguments.apply_defaults

What's happened there is that:

print(b.args, b.kwargs)

"silently" ignored the non-existent argument.

Somewhere along the line here it seems like something should complain. I don't 
see previous discussion of this from quickly searching on the bug tracker, but 
obviously if I've missed something let me know.

I'm also not really sure what the desirable solution is. To me, it's possibly 
that BoundArguments should have a fully-managed way to invoke a callable rather 
than asking a user to unpack *args and *kwargs, and that that mechanism, say 
arguments.be_passed_to(callable) should do the error checking). Having 
`.arguments` full-on reject unknown parameters seems like another possibility 
but there may be reasons that's not a good idea (e.g. if you were to for some 
reason use a bound arguments object to call some other function that *did* take 
that additional argument).

--
components: Library (Lib)
messages: 376578
nosy: Julian
priority: normal
severity: normal
status: open
title: BoundArguments.arguments used in the recommended way to call a callable 
silently succeeds for nonexistent arguments
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



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

2020-09-08 Thread Vaclav Slavik


Change by Vaclav Slavik :


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

___
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-08 Thread Vaclav Slavik


New submission from Vaclav Slavik :

NuGet automatically includes .props file from the build directory in the target 
using the package, but only if the file has the correct name: it must be 
$(id).props. This means that Python's support for this only works correctly in 
the python nuget packages, but not in pythonx86 and others, because the file is 
copied as python.props (instead of pythonx86.props etc) there too.

--
components: Windows
messages: 376577
nosy: paul.moore, steve.dower, tim.golden, vslavik, zach.ware
priority: normal
severity: normal
status: open
title: NuGet python.props only works in python nuget, not other variants
type: behavior

___
Python tracker 

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



[issue41703] Most bytecode changes are absent from Python 3.9 What's new

2020-09-08 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue41703] Most bytecode changes are absent from Python 3.9 What's new

2020-09-08 Thread Mark Shannon


Mark Shannon  added the comment:

https://bugs.python.org/issue39320 has a change note:
https://docs.python.org/3.9/whatsnew/changelog.html#python-3-9-0-beta-3

--

___
Python tracker 

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



[issue41703] Most bytecode changes are absent from Python 3.9 What's new

2020-09-08 Thread Mark Shannon


Change by Mark Shannon :


--
assignee:  -> Mark.Shannon

___
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-08 Thread Manuel Jacob


Manuel Jacob  added the comment:

I was running "make all" and I also ran the documentation generator command 
without an error.

However, I tried it again and now it failed the same way as reported. With a 
debug build, I get "Python/Python-ast.c:231: get_ast_state: Assertion `state != 
NULL' failed.".

Sorry for the noise!

--

___
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-08 Thread Petr Viktorin


Petr Viktorin  added the comment:

That is interesting.

The original post here doesn't mention that the problem occurs in Mercurial's 
"make all", specifically when building documentation, in the command:

/usr/bin/python3.9 gendoc.py "hgrc.5" > hgrc.5.txt.tmp

Could you confirm `make all` works OK with python3.9 on Arch?

--

___
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-08 Thread Manuel Jacob

Manuel Jacob  added the comment:

I couldn’t reproduce the problem with a freshly compiled Python 3.9.0rc1 on 
Arch Linux. Was this ever reproduced on a non-Red Hat system?

--
nosy: +mjacob

___
Python tracker 

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



attrs 20.2.0

2020-09-08 Thread Hynek Schlawack
Hi everyone,

I’m happy to (somewhat belatedly) announce the release of attrs 20.2.0.

attrs is the direct ancestor of dataclasses in the standard library and remains 
the most powerful option for creating regular classes without getting bogged 
down with writing identical boilerplate again and again: https://www.attrs.org/

Heartfelt thanks to my generous sponsors , 
companies subscribing on Tidelift 
, and people who bought me a 
coffee on ! Support like that makes me merge PRs 
and release software on a Saturday afternoon! <3

---

This release fixes a bunch of bugs in the new APIs and a few regressions that 
were introduced in the HUGE 20.1.0 release (if you’ve missed it, check out the 
announcement here: 
):

Backward-incompatible Changes

-   attr.define(), attr.frozen(), attr.mutable(), and attr.field()
remain provisional.

This release fixes a bunch of bugs and ergonomics but they remain
mostly unchanged.

If you wish to use them together with mypy, you can simply drop this
plugin into your project.

Feel free to provide feedback to them in the linked issue #668.

We will release the attrs namespace once we have the feeling that
the APIs have properly settled. #668

Changes

-   attr.define() et al now correct detect __eq__ and __ne__. #671

-   attr.define() et al's hybrid behavior now also works correctly when
arguments are passed. #675

-   It's possible to define custom __setattr__ methods on slotted
classes again. #681

-   In 20.1.0 we introduced the inherited attribute on the
attr.Attribute class to differentiate attributes that have been
inherited and those that have been defined directly on the class.

It has shown to be problematic to involve that attribute when
comparing instances of attr.Attribute though, because when
sub-classing, attributes from base classes are suddenly not equal to
themselves in a super class.

Therefore the inherited attribute will now be ignored when hashing
and comparing instances of attr.Attribute. #684

-   zope.interface is now a "soft dependency" when running the test
suite; if zope.interface is not installed when running the test
suite, the interface-related tests will be automatically skipped.
#685

-   The ergonomics of creating frozen classes using @define(frozen=True)
and sub-classing frozen classes has been improved: you don't have to
set on_setattr=None anymore. #687

The full changelog can be found at 
.

Cheers,
—h
___
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


PyCon India 2020 Keynote: Alolita Sharma

2020-09-08 Thread Sayan Chowdhury
Hi everyone,

We are pleased to announce Alolita Sharma as the second Keynote
Speaker of PyCon India 2020.

About Alolita
-

Alolita Sharma is a Principal Technologist at Amazon Web Services. She
leads open source strategy and engineering for projects focused on
observability and search including OpenTelemetry, Prometheus, Grafana,
Apache Lucene and Open Distro for Elasticsearch. Two decades of doing
open source continue to inspire her. Alolita has built and led
engineering teams at Wikipedia, Twitter, PayPal and IBM. Alolita is
passionate about language technologies that enable everyone to
participate in the Web's information revolution. She serves on the
board of Unicode Consortium and is an invited expert on W3C and ECMA
workgroups. She has served on the boards of the Open Source Initiative
(OSI) and SFLC.in.

You can find her on Twitter: @alolita.

Please retweet the announcement to reach to all the interested parties[0]
https://twitter.com/pyconindia/status/1303297549978275840


--
Sayan Chowdhury
On behalf of PyCon India 2020 Team
https://in.pycon.org/2020/
___
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


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

2020-09-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f315142ddc61e54a59028db562aec5f62db783e1 by Victor Stinner in 
branch 'master':
bpo-1635741: Port mashal module to multi-phase init (#22149)
https://github.com/python/cpython/commit/f315142ddc61e54a59028db562aec5f62db783e1


--

___
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-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset bb083d33f7ffe93cee9e1f63d1e526dc81a6e34f by Victor Stinner in 
branch 'master':
bpo-1635741: Port _string module to multi-phase init (GH-22148)
https://github.com/python/cpython/commit/bb083d33f7ffe93cee9e1f63d1e526dc81a6e34f


--

___
Python tracker 

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



[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread STINNER Victor


STINNER Victor  added the comment:

Hi,

https://www.python.org/dev/peps/pep-3136/ is not really directly part of 
Python. The document is hosted at https://github.com/python/peps/ and was 
authored by Matt Chisholm. I suggest you to propose a PR on the PEP document 
and try to get it reviewed by Matt Chisholm.

See also https://github.com/python/devguide/issues/605 "List terms which should 
be avoided".

--
nosy: +vstinner

___
Python tracker 

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



[issue41743] Remove Unnecessarily Gendered Language from the Documentation

2020-09-08 Thread David Williams


New submission from David Williams :

The Python documentation contains unnecessarily verbose and gendered language 
which does not enhance clarity, and rather, serves as non-inclusive to the 
LGTBQ community

For example:
https://www.python.org/dev/peps/pep-3136/


"Introduction
The break statement allows the programmer to terminate a loop early, and the 
continue statement allows the programmer to move to the next iteration of a 
loop early. In Python currently, break and continue can apply only to the 
innermost enclosing loop.

Motivation
If the programmer wishes to move to the next iteration of an outer enclosing 
loop, or terminate multiple loops at once, he or she has a few less-than 
elegant options."

There are 2 issues here. First is that break and continue don't allow the 
programmer to do anything, they cause the program control flow to change. 
Second, there is no reason to appeal to gendered pronouns which are antiquated. 
The motivation section could easily be rewritten to a more include and 
parsimonious form (less chatter):

"Motivation
Python syntax is limited when it comes to moving to the next iteration of an 
outer enclosing loop, or terminating multiple loops at once, "

--
assignee: docs@python
components: Documentation
messages: 376569
nosy: docs@python, mobiusinversion
priority: normal
severity: normal
status: open
title: Remove Unnecessarily Gendered Language from the Documentation
type: enhancement
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP

2020-09-08 Thread Zachary Ware


Change by Zachary Ware :


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

___
Python tracker 

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



[issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP

2020-09-08 Thread Zachary Ware


Change by Zachary Ware :


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

___
Python tracker 

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



[issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot()

2020-09-08 Thread Petr Viktorin


Petr Viktorin  added the comment:

IMO, a slot should be exposed if there is some reason for exposing it.

bpo-41073 talks about tp_dealloc, which is already exposed as Py_tp_dealloc.
Recently, Py_bf_* slots were exposed (but not as part of the limited API), in 
bpo-40724 which links to the reasons for exposing them.

Which other slots are we missing?

--

___
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-08 Thread STINNER Victor


STINNER Victor  added the comment:

> Python/_warnings.c

I'm not sure if it's a good idea to convert the _warnings module to multi-phase 
init, since it uses a state stored in the interpreter:

/* Given a module object, get its per-module state. */
static WarningsState *
warnings_get_state(void)
{
PyInterpreterState *interp = _PyInterpreterState_GET();
if (interp == NULL) {
PyErr_SetString(PyExc_RuntimeError,
"warnings_get_state: could not identify "
"current interpreter");
return NULL;
}
return >warnings;
}

For example, two _warnings instance would share the _warnings.filters list. 
Maybe it's ok, I don't know.

--

___
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-08 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21231
pull_request: https://github.com/python/cpython/pull/22149

___
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-08 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21230
pull_request: https://github.com/python/cpython/pull/22148

___
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-08 Thread STINNER Victor


STINNER Victor  added the comment:

2020-06-22 16:58: "List of the 58 C extensions using the legacy API (...)"

UPDATE: 56% of Modules/*.c modules are converted (48 on 85).

Since June, 21 extension modules have been converted. There are now 37 
remaining extensions which still use PyModule_Create():

$ grep -l  '\ *(' Modules/*.c|wc -l
37

Modules/*.c:

* 48 files use PyModuleDef_Init()
* 37 files use PyModule_Create()
* 9 files are not modules:

Modules/config.c
Modules/getaddrinfo.c
Modules/getbuildinfo.c
Modules/getnameinfo.c
Modules/getpath.c
Modules/main.c
Modules/_math.c
Modules/rotatingtree.c
Modules/tkappinit.c

--

Outside the Modules/ directory, there are 6 modules using PyModule_Create:

$ grep -l  '\ *(' */*.c|grep -v Modules

Objects/unicodeobject.c
PC/_msi.c
PC/msvcrtmodule.c
PC/winreg.c
PC/winsound.c
Python/import.c
Python/marshal.c
Python/_warnings.c

--

___
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-08 Thread Petr Viktorin

Petr Viktorin  added the comment:

We need this bug solved for 3.9.0 rc2. Łukasz, you're the one to make the call 
about the approach; how can we make your job easier?

My view is:

- Victor's PR 21961 is going in the right direction. But, as far as I know 
(correct me if I'm wrong), Victor unfortunately has less time for CPython than 
usual, for personal reasons. So, the PR is unexpectedly stalled. I don't think 
there's enough time to fix and test it for RC 2.

- My PR 21973 essentially just provides a better error message (and might 
prevent segfaults in more convoluted cases -- essentially ones where the _ast 
module is replaced maliciously). We can merge it, backport to 3.9; then iterate 
on Victor's PR to have a better solution in 3.10.

But Pablo an Victor should chime in as well.

--

___
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-08 Thread Petr Viktorin


Petr Viktorin  added the comment:

I also looked into Mercurial. They have a large list of modules [0] that don't 
work with the lazy-loading scheme. I don't think adding one more should be a 
big problem for them; but we'll reach out to them and confirm that.


[0] 
https://www.mercurial-scm.org/repo/hg/file/tip/hgdemandimport/__init__.py#l26

--

___
Python tracker 

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



[issue41730] Show deprecation warnings for tkinter.tix

2020-09-08 Thread E. Paine


E. Paine  added the comment:

+1

I think this would be very helpful as the only places I can find its 
deprecation are a small note at the top of the Tix Python docs 
[https://github.com/python/cpython/commit/bd63353] and a news entry a long way 
down the 3.6 release notes https://docs.python.org/3/whatsnew/3.6.html#id7 
[https://github.com/python/cpython/commit/ba41c81].

While I agree with @Zachary's comment on #29125 that the injection bug probably 
would be a reasonable excuse to remove Tix, I believe we should first 
"properly" deprecate it (I can imagine a few users getting caught out if we 
remove it without raising a DeprecationWarning in previous versions).

IMO, #31371 should be reopened once this has been merged to facilitate removal 
in a future version and allow discussion for which version removal should occur 
in. I also think that we should back-port this to 3.8/9 to give users more 
notice than they might otherwise get.

@wyz23x2, are you alright to write a patch for this? (I assume no-one has any 
objections given that Tix is already deprecated)

--
nosy: +epaine, zach.ware
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



[issue41736] test_site: test_s_option() failed on AMD64 Windows8.1 Refleaks 3.7

2020-09-08 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue41737] Improper NotADirectoryError when opening a file under a fake directory

2020-09-08 Thread Danny Lin


Danny Lin  added the comment:

I'm not so familiar about the spec. If such behavior is confirmed due to 
implementation difference across OSes, and it's also not desirable to change 
the mapping of the OS error to Python exception, we can simplify left it as-is.

However, this behavior difference can potentially cause cross-platform 
compatibility. For example, the code:

try:
open('/path/to/file/somename.txt')
except FileNotFoundError:
"""do something"""

would work on Windows but break on Linux (or POSIX?).

The current (3.8) description for exception NotADirectoryError is:

Raised when a directory operation (such as os.listdir()) is requested on 
something which is not a directory. Corresponds to errno ENOTDIR.

According to this, a user probably won't expect to receive a NotADirectoryError 
for open('/path/to/file/somename.txt'), as this doesn't seem like a directory 
operation at all, unless he is expert enough to know about the implication of 
errno ENOTDIR.

I think a note should at least be added to the documentation if we are not 
going to change the behavior.

--

___
Python tracker 

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



[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread Diogo Flores


Diogo Flores  added the comment:

Thank you Dong-hee Na and Victor.

@Stefan Krah: I am sorry that you didn't had the chace to try out the patch 
before it got merged, however iff you are curious about the any aspect of the 
implementation (or the motivation behind it) I am happy to discuss it in depth.

--

___
Python tracker 

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



[issue41729] test_winconsoleio fails and hangs on Windows

2020-09-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I was assuming that the default was 1, not 0.  But now that CI tests pass code 
as is, I will leave it alone.

--

___
Python tracker 

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



[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Diogo Flores, it's a nice optimization!


Stefan Krah: "It would have been nice to have had a chance to look at this, but 
apparently those days are over."

The PR has been approved by two core developers. It's a nice optimization, I 
don't see what is the problem here.

--
nosy: +vstinner

___
Python tracker 

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



[issue41732] Custom iterator to memoryview - performance improvement

2020-09-08 Thread Dong-hee Na


Dong-hee Na  added the comment:

Thanks, Diogo for working on this issue.
And thank you for the mentoring guido!

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



  1   2   >