[issue36520] Email header folded incorrectly

2019-05-26 Thread Jeffrey Kintscher

Jeffrey Kintscher  added the comment:

To aid with debugging the code, the Subject line can be simplified:

>>> from email.message import EmailMessage
>>> m = EmailMessage()
>>> m['Subject'] = 'Hello 
>>> =?utf-8?q?W=C3=B6rld!_Hello_W=C3=B6rld!_Hello_W=C3=B6rld!?= Hello 
>>> Wörld!Hello Wörld!'
>>> print(bytes(m))
b'Subject: Hello =?utf-8?q?W=C3=B6rld!_Hello_W=C3=B6rld!_Hello_W=C3=B6rld!?=\n 
Hello =?utf-8?=?utf-8?q?q=3FW=3DC3=3DB6rld!Hello=3F=3D_W=C3=B6rld!?=\n\n'

--

___
Python tracker 

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



[issue17250] argparse: Issue 15906 patch; positional with nargs='*' and string default

2019-05-26 Thread Michael Blahay


Michael Blahay  added the comment:

Also see https://bugs.python.org/issue35495

--
nosy: +mblahay

___
Python tracker 

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



[issue36913] Missing documentation for decorators

2019-05-26 Thread Michael Blahay


Michael Blahay  added the comment:

The PEP is not the first place I go looking for information on Python topics, 
just my two cents.

--
nosy: +mblahay

___
Python tracker 

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



[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-26 Thread Michael Blahay


Michael Blahay  added the comment:

Ryan, last chance, do you have any feedback?

--

___
Python tracker 

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



[issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code.

2019-05-26 Thread Tim Peters


Tim Peters  added the comment:

Same kind of problem with the new upload, Bob.

Line 38 is:

print(Fore.GREEN,"Installed file ",e,Fore.WHITE)

indented 8 spaces. Lines 39 and 40 are empty.  Then line 41 is:

if x>=len(files):  # if x is more than or equal to the number of files in teh 
directory

indented 12 spaces.  That's an indentation error, indented more than the 
statement before it.

Maybe you have some kind of weird binary data (by mistake) in the file that 
gets lost when you upload it?

--

___
Python tracker 

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



[issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code.

2019-05-26 Thread Bob Vegene


Bob Vegene  added the comment:

I decided to check the file in notepad++ and I saw that there actually is an 
indentationerror... However, the save button wasn't working I guess. I can't 
tell you how many times i hit ctrl+s and clicked save. Wow, so it still is a 
bug.

--

___
Python tracker 

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



[issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code.

2019-05-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

Line 41 is indented 4 spaces past line 38, but should not be.

You'd be better served by first asking questions like this on the python-list 
mailing list.

--
nosy: +eric.smith
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



[issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code.

2019-05-26 Thread Bob Vegene


Bob Vegene  added the comment:

uhm, the current file is attached now

is there some sort of error and you guys see it differently???

i can't be the only one getting this. I swear i have everything right, and i'll 
attach an image if i need too.

--
Added file: https://bugs.python.org/file48364/sys32pack.py

___
Python tracker 

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



[issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code.

2019-05-26 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Sorry Bob, are you telling us that the code you submitted to demonstrate 
the error isn't the code that demonstrates the error?

Perhaps you could read this:

http://www.sscce.org/

for some ideas on how to submit a good bug report. It is written for 
Java programmers but most of it applies equally to Python.

--

___
Python tracker 

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



[issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code.

2019-05-26 Thread Tim Peters


Tim Peters  added the comment:

As Steven said, there's an obvious indentation error in the file you actually 
attached.  So nobody can _guess_ what your problem is.  Please upload a file 
showing your actual problem.

If I increase the indentation of the `print` Steven identified to match the 
indentation of the `print` before it, IDLE's Run -> Check Module has no 
complaints.

--
nosy: +tim.peters

___
Python tracker 

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



[issue33361] readline() + seek() on codecs.EncodedFile breaks next readline()

2019-05-26 Thread Diego Argueta


Diego Argueta  added the comment:

> though #32110 ("Make codecs.StreamReader.read() more compatible with read() 
> of other files") may have fixed more (all?) of it.

Still seeing this in 3.7.3 so I don't think so?

--

___
Python tracker 

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



[issue21314] Document '/' in signatures

2019-05-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think we can revisit this now that PEP570 is accepted

--
nosy: +pablogsal

___
Python tracker 

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



[issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code.

2019-05-26 Thread Bob Vegene


Bob Vegene  added the comment:

The error it gives is 

unexpected indent (sys32pack.py, line 41)

(im also using IDLE)

FYI.

--

___
Python tracker 

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



[issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code.

2019-05-26 Thread Bob Vegene


Bob Vegene  added the comment:

No, I removed that before. I actually did have one, but I removed that and it 
still shows.

--

___
Python tracker 

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



[issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code.

2019-05-26 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Hi Bob, and welcome. Can you copy and paste the actual traceback or error you 
get? It isn't obvious from your description what the error is.

Just glancing at the attached sample code, I see what seems to be an obvious 
indentation error:

for _ in range(len(files)):
try:
e = files[x] # e = the file with a paramater of x
os.copy(e,"C:\\Windows\\System32") # copy the file to system32
except Exception as e:
print(Fore.RED,"Could not install file ",x,". The following error 
occurred: ",e,Fore.WHITE)
print(Fore.GREEN,"Installed file ",e,Fore.WHITE)
if x>=len(files):  # if x is more than or equal to the number of 
files in teh directory
print(Fore.GREEN,"Installed ",Fore.WHITE)


Notice that the "if" statement is indented under the print. Is that the cause 
of your error?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue37061] The strangest glitch I have ever seen - incorrect indenterror, even on commented out code.

2019-05-26 Thread Bob Vegene


New submission from Bob Vegene :

So, I'm making a simple program that will allow me to quickly copy programs to 
System32 for use on the command line. When I tried testing this in a file 
called test.py in the same directory as sys32move.py, I got a very strange 
error. IndentError. I am very experienced with python and I know how to fix 
this and why it is caused. I fixed what I thought I could, but the I realized 
something was off. 

I commented out everything in sys32move.py and it still outputs this error.

Now, commenting this out is unnecessary, as this is a false error anyway.


This is test.py:
try:
import sys32pack
install_folder(testfolder)
except Exception as e:
print(e)
input()

(you get same behavior without the catching of the error.)


SYS32PACK.py:

--
components: Build, Cross-Build
files: sys32pack.py
messages: 343591
nosy: Alex.Willmer, bob.vegena
priority: normal
severity: normal
status: open
title: The strangest glitch I have ever seen - incorrect indenterror, even on 
commented out code.
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file48363/sys32pack.py

___
Python tracker 

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



[issue37051] Glossary item "hashable" incorrect

2019-05-26 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

For that matter, slices are immutable built-ins, but they're not hashable 
(presumably to avoid silently working with dictionaries in a non-slice 
capacity).

--
nosy: +josh.r

___
Python tracker 

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



[issue37032] Add CodeType.replace() method

2019-05-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Is there anything more on this issue?

--

___
Python tracker 

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



[issue37060] import ctypes fails with a statically linked interpreter due to dlopen() failure

2019-05-26 Thread Gregory Szorc


New submission from Gregory Szorc :

ctypes/__init__.py calls _ctypes.dlopen(None) on Linux as part of code 
execution during module import. Unfortunately, dlopen() doesn't work if the 
current executable isn't a dynamic executable.

Using a fully statically linked Python executable:

$ ldd python3.7
not a dynamic executable

$ python3.7
>>> import _ctypes

>>> _ctypes.dlopen(None)
Traceback (most recent call last):
  File "", line 1, in 
OSError: Dynamic loading not supported

>>> import ctypes
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/home/gps/src/python-build-standalone.git/build/python/install/lib/python3.7/ctypes/__init__.py",
 line 444, in 
pythonapi = PyDLL(None)
  File 
"/home/gps/src/python-build-standalone.git/build/python/install/lib/python3.7/ctypes/__init__.py",
 line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: Dynamic loading not supported


I think it is a bug that `import ctypes` raises OSError at import time in this 
environment. I can make a compelling argument that this error should either be 
suppressed or converted to an ImportError.

Producing a fully statically linked Python executable is a bit of work and 
isn't easily accomplished with the existing build system. My 
"python-build-standalone" project automates the process. A fully statically 
linked Python executable is available in the zstd compressed archive at 
https://github.com/indygreg/python-build-standalone/releases/download/20190505/cpython-3.7.3-linux64-musl-20190526T0219.tar.zst
 under the python/install/bin/python3.7 path. Simply extract that archive and 
run that binary to reproduce.

--
components: ctypes
messages: 343588
nosy: indygreg
priority: normal
severity: normal
status: open
title: import ctypes fails with a statically linked interpreter due to dlopen() 
failure
versions: Python 3.7

___
Python tracker 

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



[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-26 Thread daniel hahler


daniel hahler  added the comment:

>From my initial comment:

> I've done this via monkeypatching for pdbpp's tests, which resulted in an 
> easy 2% coverage gain (https://github.com/antocuni/pdb/pull/253).

It will also affect running tests with coverage (in general, or using tools 
like pytest-testmon), and using pdb.set_trace then (either for debugging, or 
via post-mortem, e.g. pytest's `--pdb`).

--

___
Python tracker 

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



[issue17005] Add a topological sort algorithm

2019-05-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> * allow input as ordered pairs like the Unix tsort command
> * allow more convenient input as dependency sequences (like graphviz):

This is how my first proposal started (and I still like it a bit more than the 
dictionary input), but there are some concerns (check other comments) regarding 
this API, like representing isolated nodes or disjoint graphs.

> return both the sorted sequence and cycles

Regarding the output, I like returning a collection of sets, where every set 
represents all possible elements of the same order in the result. This also 
helps if the user has some expectation regarding the ordering. For example, in:

['ABDGI', 'BEG', 'CEH', 'KCFHJ']

the results starting with

['A', 'B', 'D'

and

['A', 'B', 'K'

are both valid.

With the current implementation, this is the equivalent of C3 linearization:

  from itertools import tee
  from collections import defaultdict
  def c3_linearization(inheritance_seqs):
 graph = defaultdict(set)
 for seq in inheritance_seqs:
 a, b = tee(seq)
 next(b, None)
 for child, parent in zip(a,b):
 graph[child].add(parent)
 retun ((list(group) for group in functools.toposort(graph)), [])
 return tuple(reversed(order))

  >>> class A: pass
  >>> class B(A): pass
  >>> class C(A): pass
  >>> class D(B, C): pass

   >> D.__mro__
  (__main__.D, __main__.B, __main__.C, __main__.A, object)

   >> c3_linearization([(D, B, A, object), (D, C, A, object)])
  [{__main__.D}, {__main__.B, __main__.C}, {__main__.A}, {object}]

What do you think?

--

___
Python tracker 

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



[issue17005] Add a topological sort algorithm

2019-05-26 Thread Raymond Hettinger


Change by Raymond Hettinger :


Added file: https://bugs.python.org/file48362/tsort.1.py

___
Python tracker 

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



[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-05-26 Thread miss-islington


miss-islington  added the comment:


New changeset bfd0b7720196b9ff647cc33dafbd31a04496402c by Miss Islington (bot) 
in branch '3.7':
[3.7] bpo-28866: No type cache for types with specialized mro, invalidation is 
hard. (GH-13157) (GH-13589)
https://github.com/python/cpython/commit/bfd0b7720196b9ff647cc33dafbd31a04496402c


--
nosy: +miss-islington

___
Python tracker 

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



[issue17005] Add a topological sort algorithm

2019-05-26 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Attaching some of my 2013 work on this.  Here are some API notes:

* spell-out the name topological_sort()

* allow input as ordered pairs like the Unix tsort command
  https://en.wikipedia.org/wiki/Tsort#Examples

* allow more convenient input as dependency sequences (like graphviz):
 [['a', 'b', 'c', 'x], ['b', 'd', 'e', 'y']]
  is short for and equivalent to:
 [(a,b), (b,c), (c,x), (b,d), (d, e), (e, y)]

* return both the sorted sequence and cycles
  (both are individually useful and the latter
   is helpful in debugging in only the former is wanted)

* desire to match the C3 MRO computation


* would like the ordering to be stable and deterministic
  (this precludes picking arbitrary elements from sets).

--
Added file: https://bugs.python.org/file48361/topological_sort.py

___
Python tracker 

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



[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-05-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13496
pull_request: https://github.com/python/cpython/pull/13589

___
Python tracker 

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



[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-05-26 Thread Julien Palard


Julien Palard  added the comment:

I think I can backport it to 3.7, and I let you choose if 2.7 need this.

--

___
Python tracker 

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



[issue30202] Update test.test_importlib.test_abc to test find_spec()

2019-05-26 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue37045] Implement PEP 591: add Final qualifier and @final decorator to typing

2019-05-26 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
pull_requests: +13495
pull_request: https://github.com/python/cpython/pull/13588

___
Python tracker 

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



[issue35753] Importing call from unittest.mock directly causes ValueError

2019-05-26 Thread ppperry


Change by ppperry :


--
nosy:  -ppperry

___
Python tracker 

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



[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-05-26 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 and 3 7 should be fixed as well, no?

--

___
Python tracker 

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



[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-05-26 Thread STINNER Victor

STINNER Victor  added the comment:

Well done Julien 

--

___
Python tracker 

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



[issue37059] spam

2019-05-26 Thread SilentGhost


Change by SilentGhost :


--
nosy:  -erika1998
title: Pre-compile Directive to Remind Coders that Men are Pigs -> spam

___
Python tracker 

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



[issue37059] spam

2019-05-26 Thread SilentGhost


Change by SilentGhost :


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

___
Python tracker 

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



[issue37059] Pre-compile Directive to Remind Coders that Men are Pigs

2019-05-26 Thread Mariatta Wijaya


Change by Mariatta Wijaya :


--
assignee: docs@python -> 
nosy:  -docs@python
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
versions:  -Python 3.7

___
Python tracker 

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



[issue37059] Pre-compile Directive to Remind Coders that Men are Pigs

2019-05-26 Thread Erika


New submission from Erika :

Guido Van Rossum recently let the community know that sexism is keeping women 
away from Python. A simple directive at the top of each py file would help 
remind us.

Throw an error unless #MenArePigs is not in line-1 of the file.

--
assignee: docs@python
components: Documentation
messages: 343580
nosy: docs@python, erika1998
priority: normal
severity: normal
status: open
title: Pre-compile Directive to Remind Coders that Men are Pigs
versions: Python 3.7

___
Python tracker 

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



[issue37032] Add CodeType.replace() method

2019-05-26 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
nosy: +mbussonn

___
Python tracker 

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



[issue33071] Document that PyPI no longer requires 'register'

2019-05-26 Thread hai shi


hai shi  added the comment:

hi, everyone. I am a freshman,so let me do it from easy issues:)

--
nosy: +shihai1991

___
Python tracker 

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



[issue29696] Use namedtuple in string.Formatter.parse iterator response

2019-05-26 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue37051] Glossary item "hashable" incorrect

2019-05-26 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-26 Thread Simon Bernier St-Pierre


Change by Simon Bernier St-Pierre :


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

___
Python tracker 

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



[issue37051] Glossary item "hashable" incorrect

2019-05-26 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue36772] Let lru_cache be used as a decorator with no arguments

2019-05-26 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue36853] inconsistencies in docs builds (Sphinx 2)

2019-05-26 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

> I've just locally ran sphinx 2.0.0 on 071cbd4ea1 (the current tip of your PR) 
> and I'm not getting any error, which one are you getting?

The issue occurs on 2347d3ae36 with `make suspicious` with Sphinx 2.0.0 and 
2.0.1.

```
Doc 2347d3ae36 $ make suspicious

   
mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
PATH=./venv/bin:$PATH sphinx-build -b suspicious -d build/doctrees -D 
latex_elements.papersize=  -W . build/suspicious 
Running Sphinx v2.0.1
loading ignore rules... done, 352 rules loaded
building [mo]: targets for 0 po files that are out of date
building [suspicious]: targets for 476 source files that are out of date
updating environment: 476 added, 0 changed, 0 removed
/Users/jaraco/code/public/cpython/Doc/tools/extensions/pyspecific.py:274: 
RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use 
ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
reading sources... [100%] whatsnew/index

   
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 53%] library/importlib.metadata 

   
Exception occurred:
  File "/Users/jaraco/code/public/cpython/Doc/tools/extensions/suspicious.py", 
line 154, in report_issue
self.warn('[%s:%d] "%s" found in "%-.120s"' %
AttributeError: 'CheckSuspiciousMarkupBuilder' object has no attribute 'warn'
The full traceback has been saved in 
/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rrgn/T/sphinx-err-g3i65y10.log, if 
you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message 
can be provided next time.
A bug report can be filed in the tracker at 
. Thanks!
make[1]: *** [build] Error 2
make: *** [suspicious] Error 1
Suspicious check complete; look for any errors in the above output or in 
build/suspicious/suspicious.csv.  If all issues are false positives, append 
that file to tools/susp-ignored.csv.
```

--

___
Python tracker 

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



[issue37058] Implement PEP 544: add Protocol to typing

2019-05-26 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


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

___
Python tracker 

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



[issue33071] Document that PyPI no longer requires 'register'

2019-05-26 Thread hai shi


Change by hai shi :


--
pull_requests: +13491
stage: backport needed -> patch review
pull_request: https://github.com/python/cpython/pull/13584

___
Python tracker 

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



[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-26 Thread Xavier de Gaye


Xavier de Gaye  added the comment:

> Is getting accurate coverage reports not enough?

But it does not achieve that goal, does it ?

--

___
Python tracker 

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



[issue37058] Implement PEP 544: add Protocol to typing

2019-05-26 Thread Ivan Levkivskyi


New submission from Ivan Levkivskyi :

The implementation would be basically copying some code from `typing_extension` 
and fixing some important known issues (such as renaming @runtime to 
@runtime_checkable and allowing sub-protocols of builtin protocols). Also 
ideally we should get rid of the metaclass `_ProtocolMeta`.

--
assignee: levkivskyi
components: Library (Lib)
messages: 343576
nosy: gvanrossum, levkivskyi, lukasz.langa
priority: normal
severity: normal
stage: needs patch
status: open
title: Implement PEP 544: add Protocol to typing
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue36772] Let lru_cache be used as a decorator with no arguments

2019-05-26 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset b821868e6d909f4805499db519ebc2cdc01cf611 by Raymond Hettinger in 
branch 'master':
bpo-36772 Allow lru_cache to be used as decorator without making a function 
call (GH-13048)
https://github.com/python/cpython/commit/b821868e6d909f4805499db519ebc2cdc01cf611


--

___
Python tracker 

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



[issue18564] Fix Bluetooth address parser

2019-05-26 Thread Michele Orrù

Change by Michele Orrù :


--
title: Integer overflow in the socket function parsing a Bluetooth address -> 
Fix Bluetooth address parser

___
Python tracker 

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



[issue36853] inconsistencies in docs builds (Sphinx 2)

2019-05-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

See also https://github.com/python/cpython/pull/13579 that replaces self.warn 
with self.logger.warn in Doc/tools/extensions/suspicious.py

--
nosy: +xtreak

___
Python tracker 

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



[issue37057] suspicious.py sphinx extension access non-existing attribute.

2019-05-26 Thread SilentGhost


Change by SilentGhost :


--
superseder:  -> inconsistencies in docs builds (Sphinx 2)

___
Python tracker 

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



[issue35753] Importing call from unittest.mock directly causes ValueError

2019-05-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

> The actual bug appears to be "doctest can't run on a module that contains 
> un-unwrappable objects"

Is it the below example scenario being discussed in the issue? Since call is 
imported it's also present in obj.__dict__ and hence trying to unwrap it [0] 
could cause error.

This is also mentioned in https://bugs.python.org/issue25532#msg253885 against 
which this issue was closed. 

> This can occur when you use doctest.DocTestSuite to load doc tests from a 
> module where unittest.mock.call has been imported.

# bpo35753.py
from unittest.mock import call

./python.exe -m doctest bpo35753.py
Traceback (most recent call last):
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/runpy.py", line 
192, in _run_module_as_main
return _run_code(code, main_globals, None,
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/runpy.py", line 
85, in _run_code
exec(code, run_globals)
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/doctest.py", 
line 2785, in 
sys.exit(_test())
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/doctest.py", 
line 2775, in _test
failures, _ = testmod(m, verbose=verbose, optionflags=options)
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/doctest.py", 
line 1947, in testmod
for test in finder.find(m, name, globs=globs, extraglobs=extraglobs):
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/doctest.py", 
line 932, in find
self._find(tests, obj, name, module, source_lines, globs, {})
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/doctest.py", 
line 991, in _find
if ((inspect.isroutine(inspect.unwrap(val))
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", 
line 524, in unwrap
raise ValueError('wrapper loop when unwrapping {!r}'.format(f))
ValueError: wrapper loop when unwrapping call


[0] 
https://github.com/python/cpython/blob/aaf47caf35984e614d93bd8bea5227df55e0e3e6/Lib/doctest.py#L991

--

___
Python tracker 

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



[issue36853] inconsistencies in docs builds (Sphinx 2)

2019-05-26 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
nosy: +mbussonn

___
Python tracker 

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



[issue37057] suspicious.py sphinx extension access non-existing attribute.

2019-05-26 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
resolution:  -> duplicate
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



[issue37057] suspicious.py sphinx extension access non-existing attribute.

2019-05-26 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

Oh yeah, I do... and you are right this is duplicate.

--

___
Python tracker 

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



[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-26 Thread SilentGhost


Change by SilentGhost :


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



[issue37057] suspicious.py sphinx extension access non-existing attribute.

2019-05-26 Thread SilentGhost


SilentGhost  added the comment:

This looks like a duplicate of #36853. Do you happen to have sphinx 2 installed?

--
assignee:  -> docs@python
components: +Documentation
nosy: +SilentGhost, docs@python

___
Python tracker 

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



[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-26 Thread Michael Blahay


Michael Blahay  added the comment:

Thank you Mark. Everything for this one is complete. The issue may be closed.

--

___
Python tracker 

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



[issue37057] suspicious.py sphinx extension access non-existing attribute.

2019-05-26 Thread Matthias Bussonnier


New submission from Matthias Bussonnier :

On a local branch  with some modified docs
```
Traceback (most recent call last):
  File 
"/Users/bussonniermatthias/dev/cpython/Doc/venv/lib/python3.8/site-packages/sphinx/cmd/build.py",
 line 284, in build_main
app.build(args.force_all, filenames)
  File 
"/Users/bussonniermatthias/dev/cpython/Doc/venv/lib/python3.8/site-packages/sphinx/application.py",
 line 337, in build
self.builder.build_update()
  File 
"/Users/bussonniermatthias/dev/cpython/Doc/venv/lib/python3.8/site-packages/sphinx/builders/__init__.py",
 line 324, in build_update
self.build(to_build,
  File 
"/Users/bussonniermatthias/dev/cpython/Doc/venv/lib/python3.8/site-packages/sphinx/builders/__init__.py",
 line 392, in build
self.finish()
  File 
"/Users/bussonniermatthias/dev/cpython/Doc/tools/extensions/suspicious.py", 
line 118, in finish
self.warn('Found %s/%s unused rules:' %
AttributeError: 'CheckSuspiciousMarkupBuilder' object has no attribute 'warn'
```

My guess is that it should be self.logger.warn, and not self.warn.

--
messages: 343569
nosy: mbussonn
priority: normal
severity: normal
status: open
title: suspicious.py sphinx extension access non-existing attribute.
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



[issue35753] Importing call from unittest.mock directly causes ValueError

2019-05-26 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution: duplicate -> 
status: closed -> open

___
Python tracker 

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



[issue37053] Tools/parser/unparse.py does not handle u"bar" correctly

2019-05-26 Thread miss-islington


miss-islington  added the comment:


New changeset aaf47caf35984e614d93bd8bea5227df55e0e3e6 by Miss Islington (bot) 
(Chih-Hsuan Yen) in branch 'master':
bpo-37053: handle strings like u"bar" correctly in Tools/parser/unparse.py 
(GH-13583)
https://github.com/python/cpython/commit/aaf47caf35984e614d93bd8bea5227df55e0e3e6


--
nosy: +miss-islington

___
Python tracker 

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



[issue37053] Tools/parser/unparse.py does not handle u"bar" correctly

2019-05-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Confirmed that this fixes the broken buildbots:

./python -m test test_tools - -uall -m test_files
== CPython 3.8.0a4+ (heads/master:91f4380ced, May 26 2019, 17:30:21) [GCC 8.3.0]
== Linux-5.0.15-1-MANJARO-x86_64-with-glibc2.29 little-endian
== cwd: /home/pablogsal/github/cpython/build/test_python_25649
== CPU count: 12
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 0.50 [1/1] test_tools
test_files (test.test_tools.test_unparse.DirectoryTestCase) ... Testing 
/home/pablogsal/github/cpython/Lib/typing.py
Testing /home/pablogsal/github/cpython/Lib/test/test_typing.py
ok

Ran 1 test in 0.586s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 671 ms
Tests result: SUCCESS

The manual check is needed because the CI in GitHub does not run test_tools 
over all files so it does not take forever.

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



[issue37053] Tools/parser/unparse.py does not handle u"bar" correctly

2019-05-26 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

After reading Python/ast.c, I think my patch is correct, so I submitted it to 
GitHub as https://github.com/python/cpython/pull/13583 :)

--

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

When you start, it should say 'Zoom Height', then 'Restore Height' after you 
maximize.  But if on a screen small enough that the initial height is the same 
as zoomed, IDLE might get confused.  No change on Linux in the PR is the 
intention, so that is good.

--

___
Python tracker 

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



[issue37053] Tools/parser/unparse.py does not handle u"bar" correctly

2019-05-26 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


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

___
Python tracker 

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



[issue37056] test_tools is failing on several buildbots

2019-05-26 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

Duplicate of https://bugs.python.org/issue37053

--
resolution:  -> duplicate
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



[issue37056] test_tools is failing on several buildbots

2019-05-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

See also https://bugs.python.org/issue37053

--
nosy: +xtreak

___
Python tracker 

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



[issue37056] test_tools is failing on several buildbots

2019-05-26 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

BUILDBOT FAILURE REPORT
===

Builder name: AMD64 Debian root 3.x
Builder url: https://buildbot.python.org/all/#/builders/27/
Build url: https://buildbot.python.org/all/#/builders/27/builds/3006

Failed tests


- test_files (test.test_tools.test_unparse.DirectoryTestCase) 
(filename='/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_typing.py')


Test leaking resources
--



Build summary
-

== Tests result: FAILURE then FAILURE ==

401 tests OK.

10 slowest tests:
- test_concurrent_futures: 2 min 57 sec
- test_multiprocessing_spawn: 2 min 22 sec
- test_tools: 2 min 3 sec
- test_multiprocessing_forkserver: 1 min 31 sec
- test_multiprocessing_fork: 1 min 10 sec
- test_tokenize: 1 min 2 sec
- test_asyncio: 48 sec 814 ms
- test_lib2to3: 42 sec 344 ms
- test_io: 41 sec 325 ms
- test_nntplib: 41 sec 260 ms

1 test failed:
test_tools

20 tests skipped:
test_devpoll test_gdb test_idle test_ioctl test_kqueue test_msilib
test_ossaudiodev test_smtpnet test_ssl test_startfile test_tcl
test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle
test_winconsoleio test_winreg test_winsound test_zipfile64

1 re-run test:
test_tools

Total duration: 15 min 26 sec


Tracebacks
--

```traceback
Traceback (most recent call last):
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_tools/test_unparse.py",
 line 309, in test_files
self.check_roundtrip(source)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_tools/test_unparse.py",
 line 132, in check_roundtrip
self.assertASTEqual(ast1, ast2)
  File 
"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_tools/test_unparse.py",
 line 124, in assertASTEqual
self.assertEqual(ast.dump(ast1), ast.dump(ast2))
AssertionError: 'Modu[88178 chars]kind=\'u\')], ctx=Load())), ctx=Load()))], 
dec[421987 chars]=[])' != 'Modu[88178 chars]kind=None)], ctx=Load())), 
ctx=Load()))], deco[421986 chars]=[])'

```

Current builder status
--

The builder is failing currently

Other builds with similar failures
--

-  https://buildbot.python.org/all/#/builders/99/builds/2698
-  https://buildbot.python.org/all/#/builders/99/builds/2699
-  https://buildbot.python.org/all/#/builders/99/builds/2700
-  https://buildbot.python.org/all/#/builders/85/builds/2834
-  https://buildbot.python.org/all/#/builders/85/builds/2835
-  https://buildbot.python.org/all/#/builders/85/builds/2836
-  https://buildbot.python.org/all/#/builders/40/builds/2326
-  https://buildbot.python.org/all/#/builders/40/builds/2327
-  https://buildbot.python.org/all/#/builders/40/builds/2328
-  https://buildbot.python.org/all/#/builders/176/builds/541
-  https://buildbot.python.org/all/#/builders/176/builds/542
-  https://buildbot.python.org/all/#/builders/176/builds/543
-  https://buildbot.python.org/all/#/builders/141/builds/1824
-  https://buildbot.python.org/all/#/builders/141/builds/1825
-  https://buildbot.python.org/all/#/builders/145/builds/1705
-  https://buildbot.python.org/all/#/builders/145/builds/1706
-  https://buildbot.python.org/all/#/builders/145/builds/1707
-  https://buildbot.python.org/all/#/builders/167/builds/1069
-  https://buildbot.python.org/all/#/builders/167/builds/1070
-  https://buildbot.python.org/all/#/builders/167/builds/1071
-  https://buildbot.python.org/all/#/builders/3/builds/2740
-  https://buildbot.python.org/all/#/builders/3/builds/2741
-  https://buildbot.python.org/all/#/builders/3/builds/2742
-  https://buildbot.python.org/all/#/builders/47/builds/2875
-  https://buildbot.python.org/all/#/builders/47/builds/2876
-  https://buildbot.python.org/all/#/builders/27/builds/3007
-  https://buildbot.python.org/all/#/builders/27/builds/3008
-  https://buildbot.python.org/all/#/builders/53/builds/3013
-  https://buildbot.python.org/all/#/builders/53/builds/3014
-  https://buildbot.python.org/all/#/builders/53/builds/3015
-  https://buildbot.python.org/all/#/builders/21/builds/3027
-  https://buildbot.python.org/all/#/builders/21/builds/3028
-  https://buildbot.python.org/all/#/builders/21/builds/3029
-  https://buildbot.python.org/all/#/builders/13/builds/3040
-  https://buildbot.python.org/all/#/builders/13/builds/3041
-  https://buildbot.python.org/all/#/builders/13/builds/3042
-  https://buildbot.python.org/all/#/builders/12/builds/2557
-  https://buildbot.python.org/all/#/builders/12/builds/2558
-  https://buildbot.python.org/all/#/builders/12/builds/2559

--
components: Tests
messages: 343561
nosy: pablogsal
priority: normal
severity: normal
status: open
title: test_tools is failing on several buildbots
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing 

[issue37056] test_tools is failing on several buildbots

2019-05-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This seems a failure caused after merging either PEP589 or PEP586

--
nosy: +gvanrossum, levkivskyi

___
Python tracker 

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



[issue37053] Tools/parser/unparse.py does not handle u"bar" correctly

2019-05-26 Thread Guido van Rossum


Guido van Rossum  added the comment:

Please submit a PR.

--

___
Python tracker 

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



[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-26 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

> The proposed change is not backward compatible.

Indeed, I missed that thanks. I think I could fix that.

> A motivation for this change should be provided first

Is getting accurate coverage reports not enough?

--

___
Python tracker 

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



[issue37055] Numerous warnings with blake2 module

2019-05-26 Thread Christian Heimes


Christian Heimes  added the comment:

The file blake2ns.h renames some of the exported constants to prefix them with 
PyBlake2_foo. The file needs to be updated every time the sources are updated.

I'll look into the issue.

--
nosy: +christian.heimes, inada.naoki
priority: normal -> deferred blocker
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



[issue37021] Can _random.getrandbits() be converted to METH_FASTCALL?

2019-05-26 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This looks good.  Thanks.

--

___
Python tracker 

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



[issue37055] Numerous warnings with blake2 module

2019-05-26 Thread Rémi Lapeyre

New submission from Rémi Lapeyre :

Issue 33164 (commit 51aa35e9e17eef60d04add9619fe2a7eb938358c) introduced 
numerous new warnings on MacOS:

/Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:192:9: warning: 
'blake2b_init' macro redefined
  [-Wmacro-redefined]
#define blake2b_init BLAKE2_IMPL_NAME(blake2b_init)
^
/Users/remi/src/cpython/Modules/_blake2/blake2ns.h:10:9: note: previous 
definition is here
#define blake2b_init   PyBlake2_blake2b_init
^
In file included from /Users/remi/src/cpython/Modules/_blake2/blake2b_impl.c:32:
/Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:193:9: warning: 
'blake2b_init_param' macro redefined
  [-Wmacro-redefined]
#define blake2b_init_param BLAKE2_IMPL_NAME(blake2b_init_param)
^
/Users/remi/src/cpython/Modules/_blake2/blake2ns.h:12:9: note: previous 
definition is here
#define blake2b_init_param PyBlake2_blake2b_init_param
^
In file included from /Users/remi/src/cpython/Modules/_blake2/blake2b_impl.c:32:
/Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:194:9: warning: 
'blake2b_init_key' macro redefined
  [-Wmacro-redefined]
#define blake2b_init_key BLAKE2_IMPL_NAME(blake2b_init_key)
^
/Users/remi/src/cpython/Modules/_blake2/blake2ns.h:11:9: note: previous 
definition is here
#define blake2b_init_key   PyBlake2_blake2b_init_key
^
In file included from /Users/remi/src/cpython/Modules/_blake2/blake2b_impl.c:32:
/Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:195:9: warning: 
'blake2b_update' macro redefined
  [-Wmacro-redefined]
#define blake2b_update BLAKE2_IMPL_NAME(blake2b_update)
^
/Users/remi/src/cpython/Modules/_blake2/blake2ns.h:13:9: note: previous 
definition is here
#define blake2b_update PyBlake2_blake2b_update
^
In file included from /Users/remi/src/cpython/Modules/_blake2/blake2b_impl.c:32:
/Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:196:9: warning: 
'blake2b_final' macro redefined
  [-Wmacro-redefined]
#define blake2b_final BLAKE2_IMPL_NAME(blake2b_final)
^
/Users/remi/src/cpython/Modules/_blake2/blake2ns.h:9:9: note: previous 
definition is here
#define blake2b_final  PyBlake2_blake2b_final
^
In file included from /Users/remi/src/cpython/Modules/_blake2/blake2b_impl.c:32:
/Users/remi/src/cpython/Modules/_blake2/impl/blake2b.c:197:9: warning: 
'blake2b' macro redefined [-Wmacro-redefined]
#define blake2b BLAKE2_IMPL_NAME(blake2b)
^
/Users/remi/src/cpython/Modules/_blake2/blake2ns.h:7:9: note: previous 
definition is here
#define blake2bPyBlake2_blake2b


I'm not sure what should be the public API exactly and where to fix that.

--
messages: 343556
nosy: remi.lapeyre
priority: normal
severity: normal
status: open
title: Numerous warnings with blake2 module

___
Python tracker 

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



[issue37048] ssl module: QUIC support for HTTP/3

2019-05-26 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks for your feedback!

So far I actively refrained from exposing or implementing any encryption 
primitives and API like AES, ChaCha20, and ECDSA. I'm worried about potential 
legal issues and export control restrictions. I have to talk to VanL first.

--

___
Python tracker 

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



[issue37053] Tools/parser/unparse.py does not handle u"bar" correctly

2019-05-26 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

On the other hand, if this causes troubles, feel free to just replace u"bar" 
with "bar" in that test. It is not really important.

--
nosy: +levkivskyi

___
Python tracker 

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



[issue36785] Implement PEP 574

2019-05-26 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 91f4380cedbae32b49adbea2518014a5624c6523 by Antoine Pitrou in 
branch 'master':
bpo-36785: PEP 574 implementation (GH-7076)
https://github.com/python/cpython/commit/91f4380cedbae32b49adbea2518014a5624c6523


--

___
Python tracker 

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



[issue37054] Ignored exceptions in test_memoryio

2019-05-26 Thread Antoine Pitrou


New submission from Antoine Pitrou :

I see the following kind of exceptions when running test_memoryio:

Exception ignored in: 
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/_pyio.py", line 409, in __del__
self.close()
  File "/home/antoine/cpython/default/Lib/_pyio.py", line 2152, in close
if self.buffer is not None and not self.closed:
  File "/home/antoine/cpython/default/Lib/_pyio.py", line 2093, in buffer
return self._buffer
AttributeError: 'StringIO' object has no attribute '_buffer'
Exception ignored in: 
Traceback (most recent call last):
  File "/home/antoine/cpython/default/Lib/_pyio.py", line 409, in __del__
self.close()
  File "/home/antoine/cpython/default/Lib/_pyio.py", line 2152, in close
if self.buffer is not None and not self.closed:
  File "/home/antoine/cpython/default/Lib/_pyio.py", line 2093, in buffer
return self._buffer
AttributeError: 'StringIO' object has no attribute '_buffer'
ok

It seems this could be related to issue18748.

--
components: Library (Lib), Tests
messages: 343552
nosy: pitrou, vstinner
priority: normal
severity: normal
status: open
title: Ignored exceptions in test_memoryio
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-26 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset f3d909428c7c61ea32e8fbb9c8b48344e7904a53 by Mark Shannon (Michael 
Blahay) in branch '3.7':
BPO-27639: Correct return type for UserList slicing operation (#13203)
https://github.com/python/cpython/commit/f3d909428c7c61ea32e8fbb9c8b48344e7904a53


--

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2019-05-26 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
versions: +Python 3.9

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2019-05-26 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Can you not use functools.cmp_to_key() for this?


Here's an example:

>>> import bisect, functools
>>> l = [('f', 5), ('d', 3), ('c', 2), ('b', 1), ('a', 0)]
>>> def cmp(a, b):
... if a > b: return -1
... if a < b: return 1
... return 0
... 
>>> bisect.bisect(l, ('e', 4), key=functools.cmp_to_key(cmp))
1
>>> l
[('f', 5), ('d', 3), ('c', 2), ('b', 1), ('a', 0)]
>>> bisect.insort(l, ('e', 4), key=functools.cmp_to_key(cmp))
>>> l
[('f', 5), ('e', 4), ('d', 3), ('c', 2), ('b', 1), ('a', 0)]

--

___
Python tracker 

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



[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-05-26 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 180dc1b0f4a57c3f66351568ae8488fa8576d7f0 by Mark Shannon (Julien 
Palard) in branch 'master':
bpo-28866: No type cache for types with specialized mro, invalidation is hard. 
(#13157)
https://github.com/python/cpython/commit/180dc1b0f4a57c3f66351568ae8488fa8576d7f0


--

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2019-05-26 Thread Neil Girdhar


Neil Girdhar  added the comment:

The problem with `key=lambda item: -item` is that item cannot always be easily 
negated.  For example, tuples are often used as keys.

--

___
Python tracker 

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



[issue37053] Tools/parser/unparse.py does not handle u"bar" correctly

2019-05-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +easy
nosy: +gvanrossum
stage:  -> needs patch
type: behavior -> enhancement

___
Python tracker 

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



[issue37049] Implement PEP 589: add TypedDict to typing

2019-05-26 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

Regarding the round-trip issue in Lib/test/test_typing.py mentioned by 
SilentGhost:

Apparently the following line added in b891c465bb7d38a597c5c2ad547d7b19194f4dad 
triggers an issue in Tools/parser/unparse.py

Literal[b"foo", u"bar"]

As this is more likely an issue in unparse.py instead of test_typing.py, I 
opened another ticket for tracking: #37053.

--

___
Python tracker 

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



[issue37053] Tools/parser/unparse.py does not handle u"bar" correctly

2019-05-26 Thread Chih-Hsuan Yen


New submission from Chih-Hsuan Yen :

Currently (135c6a56e55d2f4f8718b3b9f03ce3c692b15f0f) the following test fails:

./python -m test.regrtest -v test_tools.test_unparse -u cpu

(Note that -u cpu is needed to force test_unparse.DirectoryTestCase to check 
all files under Lib/ and Lib/test/.)

An example error message:

==
FAIL: test_files (test.test_tools.test_unparse.DirectoryTestCase) 
(filename='/home/yen/Projects/cpython/Lib/test/test_typing.py'
)
--
Traceback (most recent call last):
  File "/home/yen/Projects/cpython/Lib/test/test_tools/test_unparse.py", line 
309, in test_files
self.check_roundtrip(source)
  File "/home/yen/Projects/cpython/Lib/test/test_tools/test_unparse.py", line 
132, in check_roundtrip
self.assertASTEqual(ast1, ast2)
  File "/home/yen/Projects/cpython/Lib/test/test_tools/test_unparse.py", line 
124, in assertASTEqual
self.assertEqual(ast.dump(ast1), ast.dump(ast2))
AssertionError: 'Modu[88178 chars]kind=\'u\')], ctx=Load())), ctx=Load()))], 
dec[421987 chars]=[])' != 'Modu[88178 chars]kind=No
ne)], ctx=Load())), ctx=Load()))], deco[421986 chars]=[])'

--

Apparently that's because Tools/parser/unparse.py does not handle strings like 
u"bar" correctly. I managed to "fix" it with the following patch:

diff --git a/Tools/parser/unparse.py b/Tools/parser/unparse.py
index 385902ef4b..a25b5e49df 100644
--- a/Tools/parser/unparse.py
+++ b/Tools/parser/unparse.py
@@ -399,6 +399,8 @@ class Unparser:
 elif value is ...:
 self.write("...")
 else:
+if t.kind == 'u':
+self.write("u")
 self._write_constant(t.value)

 def _List(self, t):

Not sure if this is the correct approach, though.

--
components: Demos and Tools
messages: 343546
nosy: yan12125
priority: normal
severity: normal
status: open
title: Tools/parser/unparse.py does not handle u"bar" correctly
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I do not have "Zoom/Restore Height". I have only "Restore Height" which 
maximizes the height. The result looks identical with and without PR 13576 
applied. There is no overlapping nor gap between the IDLE windows and the 
bottom panel.

--

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2019-05-26 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

I think it could be done with `key=lambda item: -item` if the key argument is 
added.

--

___
Python tracker 

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



[issue37049] Implement PEP 589: add TypedDict to typing

2019-05-26 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy: +yan12125

___
Python tracker 

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



[issue37041] IDLE: path browser unusable on some displays

2019-05-26 Thread Andre Roberge


Andre Roberge  added the comment:

I ran the example you gave and it worked perfectly.

--

___
Python tracker 

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



[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Pull Request is welcome!

--

___
Python tracker 

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



[issue37049] Implement PEP 589: add TypedDict to typing

2019-05-26 Thread SilentGhost


SilentGhost  added the comment:

Either 135c6a56e55d2f4f8718b3b9f03ce3c692b15f0f or 
b891c465bb7d38a597c5c2ad547d7b19194f4dad (#37046) broke the build. 
Lib/test/test_typing.py does not round-trip.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue31163] Return destination path in Path.rename and Path.replace

2019-05-26 Thread shangdahao


Change by shangdahao :


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

___
Python tracker 

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



[issue37045] Implement PEP 591: add Final qualifier and @final decorator to typing

2019-05-26 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


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



[issue37049] Implement PEP 589: add TypedDict to typing

2019-05-26 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


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



[issue37046] Implement PEP 586: add Literal type constructor to typing

2019-05-26 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


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



[issue37049] Implement PEP 589: add TypedDict to typing

2019-05-26 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:


New changeset 135c6a56e55d2f4f8718b3b9f03ce3c692b15f0f by Ivan Levkivskyi in 
branch 'master':
bpo-37049: PEP 589: Add TypedDict to typing module (GH-13573)
https://github.com/python/cpython/commit/135c6a56e55d2f4f8718b3b9f03ce3c692b15f0f


--

___
Python tracker 

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



[issue37046] Implement PEP 586: add Literal type constructor to typing

2019-05-26 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:


New changeset b891c465bb7d38a597c5c2ad547d7b19194f4dad by Ivan Levkivskyi in 
branch 'master':
bpo-37046: PEP 586: Add Literal to typing module (#13572)
https://github.com/python/cpython/commit/b891c465bb7d38a597c5c2ad547d7b19194f4dad


--

___
Python tracker 

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



[issue37045] Implement PEP 591: add Final qualifier and @final decorator to typing

2019-05-26 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:


New changeset f367242d10ef36db38133a39ab7627f63099cba4 by Ivan Levkivskyi in 
branch 'master':
bpo-37045: PEP 591: Add final qualifiers to typing module (GH-13571)
https://github.com/python/cpython/commit/f367242d10ef36db38133a39ab7627f63099cba4


--

___
Python tracker 

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



[issue27860] Improvements to ipaddress module

2019-05-26 Thread Inada Naoki


Inada Naoki  added the comment:

> I was wondering why it was decided against backporting to 3.7?

Because I treats this is just a code cleanup.

> 6fa84bd12c4b83bee6a41b989363230d5c03b96c fixes an actual bug #35990 (string 
> mask in tuple argument for IPv4Interfaces).

I didn't thought it was a bug.
I don't know it is real bug which should be backported to 3.7 for now.

> Incidentally, there are also no tests for this behavior.

Because I thought there are no change about public (documented) behavior.

> Just to note: both merged PRs lacked news entry.

NEWS entry is not needed for code cleanup.

--

___
Python tracker 

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



  1   2   >