[issue40745] Typo in library/typing

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset b38bda6e90741a989db2fe321e8b98d5a5c4 by Miss Islington (bot) 
in branch '3.8':
bpo-40745: Fix typos in NewType docs (GH-20379)
https://github.com/python/cpython/commit/b38bda6e90741a989db2fe321e8b98d5a5c4


--

___
Python tracker 

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



[issue40745] Typo in library/typing

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset 6597e2af83e947d18706a3c2a463a7b728974a64 by Miss Islington (bot) 
in branch '3.9':
bpo-40745: Fix typos in NewType docs (GH-20379)
https://github.com/python/cpython/commit/6597e2af83e947d18706a3c2a463a7b728974a64


--

___
Python tracker 

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



[issue40745] Typo in library/typing

2020-05-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19671
pull_request: https://github.com/python/cpython/pull/20411

___
Python tracker 

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



[issue40745] Typo in library/typing

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset 2b0e654f91f28379c6c7ef5fd80e8754afb70935 by ziheng in branch 
'master':
bpo-40745: Fix typos in NewType docs (GH-20379)
https://github.com/python/cpython/commit/2b0e654f91f28379c6c7ef5fd80e8754afb70935


--
nosy: +miss-islington

___
Python tracker 

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



[issue40745] Typo in library/typing

2020-05-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19670
pull_request: https://github.com/python/cpython/pull/20410

___
Python tracker 

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



[issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly

2020-05-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset b03e0ee226b72da737dd0fbf39b635d13bcc220d by Benjamin Peterson in 
branch '3.9':
[3.9] closes bpo-40774: Fix docs indentation for 
asyncio.create_subprocess_shell() (GH-20403) (#20407)
https://github.com/python/cpython/commit/b03e0ee226b72da737dd0fbf39b635d13bcc220d


--

___
Python tracker 

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



[issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset 1f2cc7cedee1a768ee43151c115f6e338751eb8c by Miss Islington (bot) 
in branch '3.8':
closes bpo-40774: Fix docs indentation for asyncio.create_subprocess_shell() 
(GH-20403)
https://github.com/python/cpython/commit/1f2cc7cedee1a768ee43151c115f6e338751eb8c


--

___
Python tracker 

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



[issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly

2020-05-25 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +19669
pull_request: https://github.com/python/cpython/pull/20407

___
Python tracker 

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



[issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly

2020-05-25 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 4a0ac42c52a4d9ccfb0a78ab02aa03172ce0e31a by sth in branch 
'master':
closes bpo-40774: Fix docs indentation for asyncio.create_subprocess_shell() 
(GH-20403)
https://github.com/python/cpython/commit/4a0ac42c52a4d9ccfb0a78ab02aa03172ce0e31a


--
nosy: +benjamin.peterson
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



[issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly

2020-05-25 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue35808] Let's retire pgen

2020-05-25 Thread Ammar Askar


Change by Ammar Askar :


--
nosy: +ammar2
nosy_count: 7.0 -> 8.0
pull_requests: +19667
pull_request: https://github.com/python/cpython/pull/20405

___
Python tracker 

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



[issue40755] Add missing multiset predicates to collections.Counter

2020-05-25 Thread Vedran Čačić

Vedran Čačić  added the comment:

isequal is really strange considering we're talking about Python here. Do any 
of other stdlib types have that method instead of just using == (which works 
fine even now)? I'd even spell the second and third as <= and >=, same as set 
does.

But if we're finally going to accept that Counters are just bags (CS term for 
multisets), then surely .add and .remove (and maybe .discard, setting the count 
to 0) would be more natural additions. I can't count (pun intended) all the 
times I had to write that '] += 1' just to count some element.

--
nosy: +veky

___
Python tracker 

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



[issue40762] Writing bytes using CSV module results in b prefixed strings

2020-05-25 Thread Sidhant Bansal


Sidhant Bansal  added the comment:

Hi Remi, 

I understand your concerns with the current approach to resolve this issue. 
I would like to propose a new/different change to the way `csv.writer` works.

I am putting here the diff of how the updated docs 
(https://docs.python.org/3/library/csv.html#csv.writer) should look for my 
proposed change:

-.. function:: writer(csvfile, dialect='excel', **fmtparams)
+.. function:: writer(csvfile, encoding=None, dialect='excel', **fmtparams)

Return a writer object responsible for converting the user's data into 
delimited
strings on the given file-like object.  *csvfile* can be any object with a
:func:`write` method.  If *csvfile* is a file object, it should be opened 
with
-   ``newline=''`` [1]_.  An optional *dialect*
+   ``newline=''`` [1]_.  An optional *encoding* parameter can be given which is
+   used to define how to decode the bytes encountered before writing them to
+   the csv. After being decoded using this encoding scheme, this resulting 
string
+   will then be transcoded from this encoding scheme to the encoding scheme 
specified
+   by the file object and be written into the CSV file. If the decoding or the
+   transcoding fails an error will be thrown. Incase this optional parameter 
is not
+   provided or is set to None then all the bytes will be stringified with 
:func:`str`
+   before being written just like all the other non-string data. Another 
optional *dialect*
parameter can be given which is used to define a set of parameters specific 
to a
particular CSV dialect.  It may be an instance of a subclass of the
:class:`Dialect` class or one of the strings returned by the

   import csv
   with open('eggs.csv', 'w', newline='') as csvfile:
-  spamwriter = csv.writer(csvfile, delimiter=' ',
+  spamwriter = csv.writer(csvfile, encoding='latin1', delimiter=' ',
   quotechar='|', quoting=csv.QUOTE_MINIMAL)
+  spamwriter.writerow([b'\xc2', 'A', 'B'])
   spamwriter.writerow(['Spam'] * 5 + ['Baked Beans'])
   spamwriter.writerow(['Spam', 'Lovely Spam', 'Wonderful Spam'])

(This diff can be found here: 
https://github.com/sidhant007/cpython/commit/50d809ca21eeab72edfd8c3e5a2e8a998fb467bd)

> If another program opens this CSV file, it will read the string "b'A'" which 
> is what this field actually contains. Everything that is not a number or a 
> string gets converted to a string:

In this proposal, I am proposing "bytes" to be treated specially just like 
strings and numbers are treated by the CSV module, since it also one of the 
primitive datatypes and more relevant than other use defined custom datatypes 
(in your example the point and person object) in a lot of use cases.

> I read your PR, but succeeding to decode it does not mean it's correct

Now we will be providing the user the option to decode according to what 
encoding scheme they want to and that will overcome this. If they provide no 
encoding scheme or set it to None we will simply revert to the current 
behaviour, i.e the b-prefixed string will be written to the CSV. This will 
ensure no accidental conversions using incorrect encoding schemes

--

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2020-05-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 791a46ed58f74d673cf2c0d81deec57155bf7583 by Lysandros Nikolaou in 
branch '3.9':
[3.9] bpo-38964: Print correct filename on a SyntaxError in an fstring 
(GH-20399) (GH-20404)
https://github.com/python/cpython/commit/791a46ed58f74d673cf2c0d81deec57155bf7583


--

___
Python tracker 

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



[issue40773] DOC: Fix rendering for 'retval' on the pdb page

2020-05-25 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Hi Joshua, 

Go for it!  :-)  Please take a look at https://devguide.python.org for how to 
get started and let us know if you have any questions.

--

___
Python tracker 

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



[issue37824] IDLE: Handle Shell input warnings properly.

2020-05-25 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I added a commit to the PR to show warnings once.

--

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2020-05-25 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19666
pull_request: https://github.com/python/cpython/pull/20404

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2020-05-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset f7b1e461567e5e3fa3ba46f589d9edc1b45b2dd0 by Lysandros Nikolaou in 
branch 'master':
bpo-38964: Print correct filename on a SyntaxError in an fstring (GH-20399)
https://github.com/python/cpython/commit/f7b1e461567e5e3fa3ba46f589d9edc1b45b2dd0


--

___
Python tracker 

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



[issue39673] Map errno==ETIME to TimeoutError

2020-05-25 Thread Stephen J. Turnbull


Stephen J. Turnbull  added the comment:

First, let me say I like Giampaolo's TimeoutExpired *much* better as the name 
for this kind of exception!  But that ship has sailed.

I don't understand Giampaolo's comment.  If I understand the claim correctly, 
the problem is that people who should be catching some application-specific 
exception may be misled into catching TimeoutError instead, or into trying to 
get application-specific attributes from TimeoutError.  But that ship sailed 
with the creation of TimeoutError.  (We have a whole fleet sailing with this 
exception.)  Unless Giampaolo is proposing to deprecate TimeoutError?  I'm 
sympathetic ;-), but deprecation is a PITA and takes forever.

If we're not going to deprecate, it seems to me that it's much more 
developer-friendly to catch ETIME with TimeoutError, as that seems very likely 
to be the expected behavior.  It's true that even if Giampaolo changes 
TimeoutExpired to subclass TimeoutError, generic TimeoutError won't have 
.seconds.  But if you catch a TimeoutExpired with TimeoutError, that instance 
*will* have .seconds, and if you try to get .seconds on generic TimeoutError, 
you'll get a different uncaught exception (AttributeError vs. TimeoutError), 
but that TimeoutError wouldn't have been handled by catching TimeoutExpired.

I agree with Eric that people who were distinguishing OSError with .errno=ETIME 
from TimeoutError might be at risk, but I wouldn't do that: if I were going to 
be distinguishing particular OSErrors on the basis of errno (other than in 
"Unexpected OSError (errno = %d)" reporting style), I'd just catch OSError and 
do that.  On the other hand, I might expect TimeoutError to catch ETIME.  And 
Giampaolo says he's never seen either.  I suppose the author of psutil would be 
as likely as anyone to have seen it!

On net (unless we go the deprecation route) it seems that the convenience and 
"intuition" of adding ETIME to TimeoutError outweighs that risk.

I wish there were somebody who was there at the creation of ETIME!

--
nosy: +sjt

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-05-25 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-05-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 6cb0ad20396116b5076a58b05b55286d6d5e0c94 by Lysandros Nikolaou in 
branch '3.9':
bpo-40246: Fix test_fstring when run with the old parser (GH-20402)
https://github.com/python/cpython/commit/6cb0ad20396116b5076a58b05b55286d6d5e0c94


--

___
Python tracker 

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



[issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly

2020-05-25 Thread Stephan Hohe


Change by Stephan Hohe :


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

___
Python tracker 

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



[issue40246] Different error messages for same error - invalid string prefixes

2020-05-25 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


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

___
Python tracker 

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



[issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly

2020-05-25 Thread Stephan Hohe


New submission from Stephan Hohe :

The [documentation][1] for asyncio.create_subprocess_shell() contains an 
"important" block about quoting special characters. This block and the 
following deprecation note belong to this specific function, but are not 
correctly indented and shown at module level.

 [1]: 
https://docs.python.org/3.10/library/asyncio-subprocess.html#asyncio.create_subprocess_shell

--
assignee: docs@python
components: Documentation
messages: 369930
nosy: docs@python, sth
priority: normal
severity: normal
status: open
title: "Important" block in documentation of asyncio.create_subprocess_shell() 
not indented correctly
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37824] IDLE: Handle Shell input warnings properly.

2020-05-25 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Terry,

I put this into debug and found the reason it's printing the warning three 
times.  In `codeop.py`, it's running `_maybe_compile` and there are three try 
statements:

```
def _maybe_compile(compiler, source, filename, symbol):
# Check for source consisting of only blank lines and comments
for line in source.split("\n"):
line = line.strip()
if line and line[0] != '#':
break   # Leave it alone
else:
if symbol != "eval":
source = "pass" # Replace it with a 'pass' statement

err = err1 = err2 = None
code = code1 = code2 = None

try:
code = compiler(source, filename, symbol)
except SyntaxError:
pass

try:
code1 = compiler(source + "\n", filename, symbol)
except SyntaxError as e:
err1 = e

try:
code2 = compiler(source + "\n\n", filename, symbol)
except SyntaxError as e:
err2 = e

try:
if code:
return code
if not code1 and repr(err1) == repr(err2):
raise err1
finally:
err1 = err2 = None
```

It also has this in the module docstring:
```
Compile three times: as is, with \n, and with \n\n appended.  If it
compiles as is, it's complete.  If it compiles with one \n appended,
we expect more.  If it doesn't compile either way, we compare the
error we get when compiling with \n or \n\n appended.  If the errors
are the same, the code is broken.  But if the errors are different, we
expect more.  Not intuitive; not even guaranteed to hold in future
releases; but this matches the compiler's behavior from Python 1.4
through 2.2, at least.
```

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue40773] DOC: Fix rendering for 'retval' on the pdb page

2020-05-25 Thread Joshua Walden


Joshua Walden  added the comment:

I am interesting in contributing and would like to claim this issue.

--
nosy: +Joshua Walden

___
Python tracker 

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



[issue40734] /usr/bin surprisingly in sys.path under IDLE

2020-05-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

'IDLE' is an application implemented by Lib/idlelib.  At least on Windows, 
application startup executables (like pip.exe, on Windows) are normally 
installed in /Scripts, at least on Windows.  What, precisely, in 
'installed in /usr/bin'?

By 'shell prompt', I presume you mean the $ prompt of bash or older unix shell. 
 What precisely did you type?  What happens if you start with
$ python3 -m idlelib
?

Unless you add -n to the above, IDLE runs in two processes: the IDLE process 
that runs the IDLE GUI and the user process that runs user code under the 
supervision of idlelib/run.py.  Each has its own sys and sys.path.  You are 
seeing the user process sys.path.

To see how python initially sets sys.python in the user process, before IDLE 
can possible modify it, edit idlelib.run by (temporarily) adding

print(sys.path, file=sys.__stdout__)

after 'import sys'.  To do this with IDLE, click File => Open module and enter 
'idlelib.run'.  In case you mistakenly make IDLE not run, note where the file 
is and maybe make a backup first.  Then close and start IDLE in your terminal 
and you should see sys.path printed there.  You may see it twice.

--

___
Python tracker 

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



[issue5846] Deprecate obsolete functions in unittest

2020-05-25 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
keywords: +patch
nosy: +erlendaasland
nosy_count: 3.0 -> 4.0
pull_requests: +19663
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/20400

___
Python tracker 

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



[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2020-05-25 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

I already started one actually. But if I don't get to it in a week, I'll make a 
note here and you can take it up.

--

___
Python tracker 

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



[issue38964] Output of syntax error in f-string contains wrong filename

2020-05-25 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


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



[issue38964] Output of syntax error in f-string contains wrong filename

2020-05-25 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
keywords: +patch
nosy: +lys.nikolaou
nosy_count: 4.0 -> 5.0
pull_requests: +19662
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20399

___
Python tracker 

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



[issue40558] update CONTRIBUTING.rst docs

2020-05-25 Thread Zachary Ware


Zachary Ware  added the comment:

The very tiny disk on buildbot.python.org had filled up; its had some space 
cleared and is now working again.

--

___
Python tracker 

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



[issue40766] Add support for SQLITE_DIRECTONLY and SQLITE_INNOCUOUS for user-defined functions

2020-05-25 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


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

___
Python tracker 

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



[issue30008] OpenSSL 1.1.0 deprecated functions

2020-05-25 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +19660
pull_request: https://github.com/python/cpython/pull/20397

___
Python tracker 

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



[issue39673] Map errno==ETIME to TimeoutError

2020-05-25 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

I'm -1 about TimeoutError because the concept of "timeout" is generic enough to 
be often implemented as a custom exception, which poses questions re. 
backward/forward compatibilty. E.g. in psutil I have "TimeoutExpired", also 
providing a "seconds" attribute. Also I've probably never seen ETIME / 
ETIMEDOUT happening, whereas AFAIU the point of PEP 3151 was to create mappings 
for the most common errnos.

--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue40558] update CONTRIBUTING.rst docs

2020-05-25 Thread Ama Aje My Fren


Ama Aje My Fren  added the comment:

Hello all,

they don't seem to be working now?

Thanks.

--
nosy: +amaajemyfren

___
Python tracker 

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



[issue40761] unittest.TestCase.assertTrue return True even if the expr is False

2020-05-25 Thread Zachary Ware


Zachary Ware  added the comment:

`unittest.TestCase.assertTrue` is simple enough (the entire implementation is 
copied below) that there is almost no way for it to fail to raise some kind of 
exception when its first argument is not truthy:

def assertTrue(self, expr, msg=None):
"""Check that the expression is true."""
if not expr:
msg = self._formatMessage(msg, "%s is not true" % safe_repr(expr))
raise self.failureException(msg)

This basically hasn't changed in the 19 years since the unittest module was 
added (though variously at times named `assert_` or `failUnless`), so I'm going 
to go ahead and close the issue.

--
nosy: +zach.ware
resolution:  -> works for me
stage:  -> resolved
status: open -> closed
title: unittest.TestCase.asserTrue return True even if the expr is False -> 
unittest.TestCase.assertTrue return True even if the expr is False

___
Python tracker 

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



[issue40734] /usr/bin surprisingly in sys.path under IDLE

2020-05-25 Thread paul rubin


paul rubin  added the comment:

I'm using Debian 10 MATE live install and have been running IDLE by clicking an 
icon on the top panel, but I just tried running IDLE from the shell prompt in a 
terminal window, and also see /usr/bin in the path.  In both cases, the output 
of os.system('pwd').read() is my home directory.  IDLE itself is installed in 
/usr/bin .

--

___
Python tracker 

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



[issue40688] PEG Generator: Fix scripts to always use the correct parser

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset 3c6c86ab77464e6bcb489064d0ec1be5d1b19f3a by Miss Islington (bot) 
in branch '3.9':
bpo-40688: Use the correct parser in the peg_generator scripts (GH-20235)
https://github.com/python/cpython/commit/3c6c86ab77464e6bcb489064d0ec1be5d1b19f3a


--

___
Python tracker 

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



[issue23082] pathlib relative_to() can give confusing error message

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset 318a18eb889e8733ffb25ada139fdd423606a609 by Miss Islington (bot) 
in branch '3.9':
bpo-23082: Better error message for PurePath.relative_to() from pathlib 
(GH-19611)
https://github.com/python/cpython/commit/318a18eb889e8733ffb25ada139fdd423606a609


--
nosy: +miss-islington

___
Python tracker 

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



[issue40688] PEG Generator: Fix scripts to always use the correct parser

2020-05-25 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


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



[issue40773] DOC: Fix rendering for 'retval' on the pdb page

2020-05-25 Thread Cheryl Sabella


New submission from Cheryl Sabella :

Please only work on this issue if it would be your first contribution to 
CPython.

The rendering for 'retval' description at the bottom of the pdb doc page isn't 
quite right.

https://docs.python.org/3/library/pdb.html

--
assignee: docs@python
components: Documentation
keywords: easy, newcomer friendly
messages: 369918
nosy: cheryl.sabella, docs@python
priority: normal
severity: normal
stage: needs patch
status: open
title: DOC: Fix rendering for 'retval' on the pdb page
type: enhancement
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue40688] PEG Generator: Fix scripts to always use the correct parser

2020-05-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 9645930b5bc1833ef495891d22052d1ba65ab7ea by Lysandros Nikolaou in 
branch 'master':
bpo-40688: Use the correct parser in the peg_generator scripts (GH-20235)
https://github.com/python/cpython/commit/9645930b5bc1833ef495891d22052d1ba65ab7ea


--

___
Python tracker 

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



[issue40688] PEG Generator: Fix scripts to always use the correct parser

2020-05-25 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue40654] shutil.copyfile mutates symlink for absolute path

2020-05-25 Thread Steve Dower


Steve Dower  added the comment:

I think we can safely say this is by design (I know Jason got his backport 
working).

> Understood. However, this statement assumes the "correct path" is the most 
> precise path to resolve the target. If you instead define "correct path" as 
> the one that would be most friendly to the user who created the path, 
> readlink no longer honors that expectation.

Nothing about the os module is meant to be user-friendly first - it's based on 
the POSIX spec ;)

The most important thing is that operations that traverse symlinks should end 
up at the same file as a manual traversal using readlink. The easiest way to 
spoil this is to optimise for readability over correctness.

As discussed, realpath does a little more work to ensure readability, and 
anything else that cares about UI can do similar work. But if the lowest-level 
function loses critical information, there's no way for the developer to get it 
back.

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

___
Python tracker 

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



[issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds

2020-05-25 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Patch release is out now: https://www.sqlite.org/releaselog/3_32_1.html

--

___
Python tracker 

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



[issue40741] Upgrade to SQLite v3.32.1 in Windows and macOS builds

2020-05-25 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
title: Upgrade to SQLite v3.32.0 in Windows and macOS builds -> Upgrade to 
SQLite v3.32.1 in Windows and macOS builds

___
Python tracker 

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



[issue23082] pathlib relative_to() can give confusing error message

2020-05-25 Thread Steve Dower


Steve Dower  added the comment:


New changeset 448325369ff73011d34d6c3a493014fe3ead8843 by Rotuna in branch 
'master':
bpo-23082: Better error message for PurePath.relative_to() from pathlib 
(GH-19611)
https://github.com/python/cpython/commit/448325369ff73011d34d6c3a493014fe3ead8843


--

___
Python tracker 

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



[issue23082] pathlib relative_to() can give confusing error message

2020-05-25 Thread Steve Dower


Change by Steve Dower :


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



[issue23082] pathlib relative_to() can give confusing error message

2020-05-25 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue40750] Support -d flag in the new parser

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset 31084be618b6b7602d58e4d21ceef2e65ed8ef1b by Miss Islington (bot) 
in branch '3.9':
bpo-40750: Do not expand the new parser debug flags if Py_BUILD_CORE is not 
defined (GH-20393)
https://github.com/python/cpython/commit/31084be618b6b7602d58e4d21ceef2e65ed8ef1b


--

___
Python tracker 

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



[issue40754] ModuleNotFoundError: No module named '_testinternalcapi' under Win10

2020-05-25 Thread Zachary Ware


Zachary Ware  added the comment:

At a guess, it looks like we're not including that module in the Windows 
installer.  And indeed, it looks like it's left out of 
Tools/msi/test/test_files.wxs if you would like to provide a PR :)

On the other hand, I'm not sure that test (and any other depending on that 
module) shouldn't be skipped if _testinternalcapi is missing.

--
components: +Installation, Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
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



[issue32280] Expose `_PyRuntime` through a section name

2020-05-25 Thread Steve Dower


Steve Dower  added the comment:

It looks fine to me, but we probably want to clearly document it as 
unsupported/likely to change between releases/etc., especially since it's 
relying on an assumption that we want to change (one static runtime per 
process).

--

___
Python tracker 

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



[issue40740] Missing api-ms-win-core-path-l1-1.0.dll for python-3.9.0b1-amd64.exe Under Win7

2020-05-25 Thread Steve Dower


Steve Dower  added the comment:

Sorry, Windows 7 is no longer supported in Python 3.9. You'll need to update, 
ideally to Windows 10, but if you want to stay on Windows 8.1 then I believe 
that one's supported until Python 3.10.

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

___
Python tracker 

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



[issue40558] update CONTRIBUTING.rst docs

2020-05-25 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset 2377a9bae3f698efaa81ff0426d0feb14c9f6329 by Hai Shi in branch 
'master':
Closes bpo-40558: update CONTRIBUTING.rst to reflect current branches (GH-19989)
https://github.com/python/cpython/commit/2377a9bae3f698efaa81ff0426d0feb14c9f6329


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



[issue40750] Support -d flag in the new parser

2020-05-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19657
pull_request: https://github.com/python/cpython/pull/20394

___
Python tracker 

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



[issue40750] Support -d flag in the new parser

2020-05-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset deb4355a37e41edf1199920789fe9572c1fb43c2 by Pablo Galindo in 
branch 'master':
bpo-40750: Do not expand the new parser debug flags if Py_BUILD_CORE is not 
defined (GH-20393)
https://github.com/python/cpython/commit/deb4355a37e41edf1199920789fe9572c1fb43c2


--

___
Python tracker 

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



[issue40753] Remove Python 2 compatibility code from pathlib

2020-05-25 Thread Ram Rachum


Ram Rachum  added the comment:

Brett: Oh well, I understand. Looking at the devguide, I can't find where this 
is written. I'm interested in seeing how it's phrased, because I do think that 
tiny, incremental changes are important. I would want to know why, for example, 
my change https://github.com/python/cpython/pull/17929 was accepted and this 
one wasn't. Or maybe there isn't a clear cut rule, and it's somewhat random?

--

___
Python tracker 

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



[issue40750] Support -d flag in the new parser

2020-05-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +19656
pull_request: https://github.com/python/cpython/pull/20393

___
Python tracker 

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



[issue23721] Set up a daily test coverage run

2020-05-25 Thread Brett Cannon


Change by Brett Cannon :


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

___
Python tracker 

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



[issue30008] OpenSSL 1.1.0 deprecated functions

2020-05-25 Thread Christian Heimes


Christian Heimes  added the comment:

Yes, it's still relevant. I haven't got time to look into the matter yet.

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

___
Python tracker 

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



[issue40753] Remove Python 2 compatibility code from pathlib

2020-05-25 Thread Brett Cannon


Brett Cannon  added the comment:

> Is this an axiom or is the reasoning written down somewhere?

It should be written down in the devguide at devguide.python.org.

I agree with Serhiy that this isn't really adding anything by making the code 
that much more readable, idiomatic, or faster to warrant the overhead of this 
issue or the PR.

While I appreciate the effort, Ram, I'm closing this issue as rejected and the 
related PR.

--
nosy: +brett.cannon
resolution:  -> rejected
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



[issue40756] Second argument of LoggerAdapter.__init__ should default to None

2020-05-25 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> vinay.sajip
nosy: +vinay.sajip

___
Python tracker 

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



[issue40771] python3 fromtimestamp generates OSError

2020-05-25 Thread SilentGhost


SilentGhost  added the comment:

You seem to have read the docs, so I'm a bit confused why you think that is a 
bug. According to 
https://docs.python.org/3/library/datetime.html#datetime.datetime.fromtimestamp

> fromtimestamp() may raise OverflowError, if the timestamp is out of the range 
> of values supported by the platform C localtime() or gmtime() functions, and 
> OSError on localtime() or gmtime() failure.

This looks exactly like this type of error. It is completely irrelevant whether 
Windows supports a timestamp this far in the future, clearly platform's 
localtime() / gmtime() do not. Constructing datetime object in Python does not 
require such system calls and their limitations no longer apply.

--
nosy: +SilentGhost, belopolsky, p-ganssle
type:  -> behavior

___
Python tracker 

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



[issue30008] OpenSSL 1.1.0 deprecated functions

2020-05-25 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

@christian.heimes, is this issue and PR still relevant?  You mention 3.8 in 
msg291343.  Thanks!

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue40772] module 'resource' has no attribute 'RLIMIT_VMEM'

2020-05-25 Thread Titusz Ban


New submission from Titusz Ban :

While trying to limit the virtual memory used by a process, using

import resource
MAX_VIRTUAL_MEMORY = 1 * 1024 * 1024
resource.setrlimit(resource.RLIMIT_VMEM, (MAX_VIRTUAL_MEMORY, 
MAX_VIRTUAL_MEMORY))

The following error occurred:

AttributeError: module 'resource' has no attribute 'RLIMIT_VMEM'

This is on Ubuntu 16.04 running inside WSL. on Python 3.8.2.

--
messages: 369902
nosy: Titusz Ban
priority: normal
severity: normal
status: open
title: module 'resource' has no attribute 'RLIMIT_VMEM'
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



[issue40737] Fix possible reference leak for sqlite3 initialization

2020-05-25 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
title: Handle PyModule_AddObject() error correctly in sqlite3 -> Fix possible 
reference leak for sqlite3 initialization

___
Python tracker 

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



[issue40750] Support -d flag in the new parser

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset 82da2c3eb4d69b55d9e300ab5d9c1d22bd09b9cd by Miss Islington (bot) 
in branch '3.9':
bpo-40750: Support -d flag in the new parser (GH-20340)
https://github.com/python/cpython/commit/82da2c3eb4d69b55d9e300ab5d9c1d22bd09b9cd


--

___
Python tracker 

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



[issue40763] zipfile.extractall is safe by now

2020-05-25 Thread Ama Aje My Fren


Ama Aje My Fren  added the comment:

Hi,

On Mon, May 25, 2020 at 10:18 AM Va  wrote:

>
> So, the big red warning in Python 3 documentation might be relevant only for 
> Python < 2.7.4, not for any Python 3 version.
>

You may be on to something. It does appear to be what was discussed in
msg181646 on issue6972.
What I see is that from CPython 3.4
(https://docs.python.org/3.4/library/zipfile.html#zipfile.ZipFile.extractall)
while the security warning is still there they add the following line in it:

> This module attempts to prevent that. See extract() note.

The extract() note goes into some detail to explain what and how they
attempt to prevent it.

It is not obvious to me that zipfile._extract_member() together with
(for windows) zipfile._sanitize_windows_name() have handled everything
that could happen.
May I suggest that out of caution we leave it as it is?

--
nosy: +amaajemyfren

___
Python tracker 

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



[issue40750] Support -d flag in the new parser

2020-05-25 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue40750] Support -d flag in the new parser

2020-05-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 800a35c623bbcdb5793c7d7a4974524286311479 by Pablo Galindo in 
branch 'master':
bpo-40750: Support -d flag in the new parser (GH-20340)
https://github.com/python/cpython/commit/800a35c623bbcdb5793c7d7a4974524286311479


--

___
Python tracker 

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



[issue40750] Support -d flag in the new parser

2020-05-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-05-25 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 7d847e29d76b178c2db66b180065771b4d90c78f by Dong-hee Na in branch 
'master':
bpo-39573: Fix buildbot failure for tupleobject.c (GH-20391)
https://github.com/python/cpython/commit/7d847e29d76b178c2db66b180065771b4d90c78f


--

___
Python tracker 

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



[issue40764] Conflation of Counter with Multiset

2020-05-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

For the most part, Counter() works fine with negative counts.  The update() and 
subtract() methods were specifically designed to work with negative values.  
Nothing prevents use cases with negative counts.

In addition, there are some methods like elements() that only make sense with 
positive counts.  So if your use case has negative counts, then these methods 
methods wouldn't be applicable.

Should the Counter() have been two different classes?  Maybe yes, maybe no.  
But that ship sailed a long time ago.  For now, it is what it is and wouldn't 
be easy to change without breaking a lot of code.

>From the outset, the central concept of Counter() is that it is a dictionary 
>that returns zero when a value is missing.  Pretty much everything else is a 
>set of convenience methods supporting all the different ways people aspire to 
>use it (multisets, bags, counters, sparse arrays, etc).  People needing 
>multiset methods use the multiset methods.  People want negative counts use 
>the other methods.

Am marking this a closed.  There isn't much that can be changed here.  Also, 
theoretical objections aside, what we have now seems to be working well enough 
for most people most of the time.

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

___
Python tracker 

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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-05-25 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +19654
pull_request: https://github.com/python/cpython/pull/20391

___
Python tracker 

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



[issue40770] RFE: Run linkchecker on documentation on the CI

2020-05-25 Thread Andy Lester


Change by Andy Lester :


--
nosy: +petdance

___
Python tracker 

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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-05-25 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset ad3252bad905d41635bcbb4b76db30d570cf0087 by Dong-hee Na in branch 
'master':
bpo-39573: Convert Py_TYPE() to a static inline function (GH-20290)
https://github.com/python/cpython/commit/ad3252bad905d41635bcbb4b76db30d570cf0087


--

___
Python tracker 

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



[issue40771] python3 fromtimestamp generates OSError

2020-05-25 Thread Jim Carroll


New submission from Jim Carroll :

We encountered an interesting mtime problem in the field, that I believe 
represents a bug in python's datetime timestamp handling.

A file stored on a windows server had the last-modified date '1/1/4501' (that's 
the year 4501). os.path.getmtime() returns a valid timestamp, but when we try 
to pass this back into datetime.datetime.fromtimestamp() we get an OSError.

I understand that generating an OSError when the date exceeds the epoch support 
on Windows is consistent with the python docs. In our case, the date is clearly 
supported by Windows as evidenced by it's storage in the filesystem. Further, 
we can reproduce the situation using the cygwin touch utility.

>>> import os, datetime
>>> os.system('touch -d "4501-01-01" file.txt')
>>> t = os.path.getmtime('file.txt')
>>> datetime.datetime.fromtimestamp(t)
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 22] Invalid argument

What's interesting is we can manually convert it with reference to the epoch

>>> datetime.datetime(1970, 1, 1) + datetime.timedelta(seconds=t)
datetime.datetime(4501, 1, 1, 5, 0)

We used Windows 10-Pro for our tests running python 3.8.1.

--
components: Library (Lib)
messages: 369895
nosy: jamercee
priority: normal
severity: normal
status: open
title: python3 fromtimestamp generates OSError
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



[issue39465] [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-05-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19653
pull_request: https://github.com/python/cpython/pull/20390

___
Python tracker 

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



[issue40748] Tutorial 4.7 More on Defining Functions missing screen prompts

2020-05-25 Thread Ama Aje My Fren


Ama Aje My Fren  added the comment:

On Sun, May 24, 2020 at 11:34 PM Chas Belov  wrote:

>
> I'm guessing your point is that we only need to show >>> and ... when there 
> will be print output so that we need to distinguish between what is input and 
> what is output.
>

Yes, that is my understanding of the devguide.

> As someone who is currently learning Python, however, consistency in 
> presentation is important to me and reduces cognitive load.

This is a valid concern, but it may not be the case that all people
will face this issue. More importantly it should be right so the
second time you come back to refresh on a point you can also grasp it
quickly ... no?

>
> By REPL, do you mean Read-Eval-Print Loop? I'm not familiar with the acronym 
> and that's what Google is telling me it means. But a Read-Eval-Print Loop 
> would have output,
> and my understanding is that you are arguing against use of ... when there is 
> no output.
>

Yes - that is the shell of CPython that does the Read-Eval-Print Loop.

My reading of the Docs Dev-quide - and I am not an expert -
discourages the sys.ps1 and sys.ps2 (although the current docs site
can hide them to allow for copy-pasta)

--

___
Python tracker 

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



[issue40770] RFE: Run linkchecker on documentation on the CI

2020-05-25 Thread Miro Hrončok

Miro Hrončok  added the comment:

Side note: linkchecker can be installed via pip, but the released version is 
not Python 3 compatible. In Fedora, we package it from git.

--

___
Python tracker 

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



[issue40770] RFE: Run linkchecker on documentation on the CI

2020-05-25 Thread Miro Hrončok

New submission from Miro Hrončok :

In Fedora, we run the following check when we build Python documentation:

# Verify that all of the local links work
#
# (we can't check network links, as we shouldn't be making network connections
# within a build.  Also, don't bother checking the .txt source files; some
# contain example URLs, which don't work)
linkchecker \
  --ignore-url=^mailto: --ignore-url=^http --ignore-url=^ftp \
  --ignore-url=.txt\$ --no-warnings \
  Doc/build/html/index.html

>From time to time, it discovers broken links:

  https://github.com/python/cpython/pull/15700
  https://github.com/python/cpython/pull/20383
  https://github.com/python/cpython/pull/20388

It would be really nice if this check run as part of the CI that builds the 
documentation.

--
assignee: docs@python
components: Documentation
messages: 369892
nosy: docs@python, hroncok, vstinner
priority: normal
severity: normal
status: open
title: RFE: Run linkchecker on documentation on the CI
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



[issue39245] Public API for Vectorcall (PEP 590)

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset 9a5e643483578c3a944ceb5aa511d6c24280aedc by Miss Islington (bot) 
in branch '3.9':
bpo-39245: Fix docs links to the stable ABI (GH-20388)
https://github.com/python/cpython/commit/9a5e643483578c3a944ceb5aa511d6c24280aedc


--

___
Python tracker 

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



[issue39245] Public API for Vectorcall (PEP 590)

2020-05-25 Thread miss-islington

miss-islington  added the comment:


New changeset e50883ccc4bfa198c3d5e3367306324fc49730cb by Miro Hrončok in 
branch 'master':
bpo-39245: Fix docs links to the stable ABI (GH-20388)
https://github.com/python/cpython/commit/e50883ccc4bfa198c3d5e3367306324fc49730cb


--
nosy: +miss-islington

___
Python tracker 

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



[issue39245] Public API for Vectorcall (PEP 590)

2020-05-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19652
pull_request: https://github.com/python/cpython/pull/20389

___
Python tracker 

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



[issue39245] Public API for Vectorcall (PEP 590)

2020-05-25 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok
nosy_count: 2.0 -> 3.0
pull_requests: +19651
pull_request: https://github.com/python/cpython/pull/20388

___
Python tracker 

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



[issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset 20b2bf318345170502b9840673594a5a12a40829 by Miss Islington (bot) 
in branch '3.9':
bpo-38972: Fix typos in PowerShell Execution Policies links (GH-20383)
https://github.com/python/cpython/commit/20b2bf318345170502b9840673594a5a12a40829


--

___
Python tracker 

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



[issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset 331b2dfadb2a5dd990145c043d006166e568af7b by Miss Islington (bot) 
in branch '3.8':
bpo-38972: Fix typos in PowerShell Execution Policies links (GH-20383)
https://github.com/python/cpython/commit/331b2dfadb2a5dd990145c043d006166e568af7b


--

___
Python tracker 

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



[issue40768] pyaudio

2020-05-25 Thread SilentGhost


Change by SilentGhost :


--
resolution:  -> third party
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



[issue40769] Pegen: cover extra surrounding parentheses for invalid annotated assignment

2020-05-25 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +gvanrossum, lys.nikolaou, pablogsal

___
Python tracker 

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



[issue40769] Pegen: cover extra surrounding parentheses for invalid annotated assignment

2020-05-25 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2020-05-25 Thread Mark Dickinson


Mark Dickinson  added the comment:

> For example, should numpy.int64 get this method as well?

That's for the NumPy folks to decide (and I've added Nathaniel Smith to the 
nosy in case he wants to comment), but I don't see any particularly strong 
reason that NumPy would need to add it. It looks as though the NumPy integer 
types have survived happily without a bit_length method, for example - I don't 
even see any issues in the NumPy tracker suggesting that anyone missed it. 
(Though perhaps that's because in the case of a NumPy int one always has at 
least an upper bound on the bit_length available.)

> What is the effect on https://docs.python.org/3.9/library/numbers.html?

No effect, just as int.bit_length has no effect.

> Does it make sense to call (True).popcount()?

It would be spelled `True.bit_count()` if the PR goes in as-is, but sure, why 
not. :-)

--
nosy: +njs

___
Python tracker 

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



[issue40769] Pegen: cover extra surrounding parentheses for invalid annotated assignment

2020-05-25 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

$ python -X oldparser
Python 3.10.0a0 (heads/bpo-x:f2947e354c, May 21 2020, 18:54:57) 
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> (()): int
  File "", line 1
SyntaxError: only single target (not tuple) can be annotated
>>> ((())): int
  File "", line 1
SyntaxError: only single target (not tuple) can be annotated
>>> : int
  File "", line 1
SyntaxError: only single target (not tuple) can be annotated
>>> ([]): int
  File "", line 1
SyntaxError: only single target (not list) can be annotated
>>> (([])): int
  File "", line 1
SyntaxError: only single target (not list) can be annotated

 current 

>>> (()): int
  File "", line 1
(()): int
 ^
SyntaxError: illegal target for annotation
>>> : int
  File "", line 1
: int
   ^
SyntaxError: illegal target for annotation
>>> ([]): int
  File "", line 1
([]): int
 ^
SyntaxError: illegal target for annotation
>>> (([])): int
  File "", line 1
(([])): int
  ^
SyntaxError: illegal target for annotation

--
messages: 369885
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Pegen: cover extra surrounding parentheses for invalid annotated 
assignment

___
Python tracker 

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



[issue40673] urllib.request.URLopener raises different exceptions based on implementation detail

2020-05-25 Thread Ido Michael


Ido Michael  added the comment:

Does it includes the FancyURLopener? This class is derived from URLopener.

Also what needs to be done?
Remove the URLopener, URLopener_Tests and DummyURLopeners ?

--
nosy: +Ido Michael

___
Python tracker 

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



[issue40769] Pegen: cover extra surrounding parentheses for invalid annotated assignment

2020-05-25 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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



[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2020-05-25 Thread Ido Michael


Ido Michael  added the comment:

I agree it should be more informative and have the same standard as the rest of 
the Errors messages.

Can I start a PR?

--
nosy: +Ido Michael

___
Python tracker 

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



[issue10572] Move test sub-packages to Lib/test

2020-05-25 Thread Ido Michael


Change by Ido Michael :


--
nosy:  -Ido Michael

___
Python tracker 

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



[issue34397] remove redundant overflow checks in tuple and list implementations

2020-05-25 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation

2020-05-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19648
pull_request: https://github.com/python/cpython/pull/20384

___
Python tracker 

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



[issue34397] remove redundant overflow checks in tuple and list implementations

2020-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset e682b26a6bc6d3db1a44d82db09d26224e82ccb5 by Sergey Fedoseev in 
branch 'master':
bpo-34397: Remove redundant overflow checks in list and tuple implementation. 
(GH-8757)
https://github.com/python/cpython/commit/e682b26a6bc6d3db1a44d82db09d26224e82ccb5


--
nosy: +miss-islington

___
Python tracker 

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



  1   2   >