[issue22671] Typo in class io.BufferedIOBase docs

2017-11-25 Thread Sanyam Khurana

Change by Sanyam Khurana :


--
pull_requests: +4496

___
Python tracker 

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



[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3

2017-11-25 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue32136] Move embedding tests to their own test module

2017-11-25 Thread Nick Coghlan

Change by Nick Coghlan :


--
keywords: +patch
pull_requests: +4495
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



[issue10544] yield expression inside generator expression does nothing

2017-11-25 Thread Guido van Rossum

Guido van Rossum  added the comment:

No.

On Nov 25, 2017 18:01, "Nick Coghlan"  wrote:

>
> Nick Coghlan  added the comment:
>
> Serhiy's PR now implements the "Prohibit yield & yield from in generator
> expressions and comprehensions" approach discussed on python-dev (currently
> as a hard SyntaxError, but it could be amended to be a warning instead
> without too much difficulty).
>
> The PR does highlight an interesting subtlety though: the easiest way to
> implement this still allows yield expressions in the outermost iterator,
> since that gets compiled in a different scope from the rest of the
> comprehension body (it's evaluated eagerly and passed in to the implicit
> nested function).
>
> I'm thinking we probably don't want to expose that detail to end users,
> and will instead want to include a second check that prohibits yield
> expressions in the outermost iterator as well. However, I'm not entirely
> sure how we could implement such a check, short of adding a new "yield
> expression prohibited" counter in the AST generation and/or symbol analysis
> pass.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue10231] SimpleHTTPRequestHandler directory bugs

2017-11-25 Thread Martin Panter

Martin Panter  added the comment:

I read in PEP 11 that Mac OS 9 support was dropped in Python 2.4.

I agree that eliminating “.” and “..” components makes sense, since that is how 
they should be handled when resolving relative URLs. But it seems low priority, 
since this doesn’t happen on current supported platforms, and would only be 
triggered by an invalid HTTP request.

--
priority: normal -> low
stage: resolved -> needs patch

___
Python tracker 

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



[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-25 Thread Nick Coghlan

Nick Coghlan  added the comment:

Successful test run on the Debian machine that failed above:

* http://buildbot.python.org/all/#/builders/27/builds/242

And for the macOS Tiger machine:

* http://buildbot.python.org/all/#/builders/30/builds/227

So I think we can call the regression fixed, which is where we wanted to get to 
before the next alpha release.

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



[issue32084] [Security] http.server can be abused to redirect to (almost) arbitrary URL

2017-11-25 Thread Martin Panter

Martin Panter  added the comment:

Maybe a good fix would be to “escape” the double slash with “/.”:

if os.path.isdir(path):
url = self.path
if url.startswith('//'):  # E.g. "//www.python.org/%2f.."
url = "/." + url  # Becomes "/.//www.python.org/%2f.."
parts = urllib.parse.urlsplit(url)
...

When this “escaped” URL is resolved with the base URL, it should give the right 
result:

>>> base = "http://localhost:8000//www.python.org/%2f..";
>>> redirect = "/.//www.python.org/%2f../"
>>> urljoin(base, redirect)
'http://localhost:8000//www.python.org/%2f../'

A simpler idea is to strip off all but one of the leading slashes, so you end 
up with "/www.python.org/%2f..". That would technically be a different URL, but 
would access the same file through the default SimpleHTTPRequestHandler 
behaviour, so most people wouldn’t notice.

--
nosy: +martin.panter

___
Python tracker 

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



[issue10231] SimpleHTTPRequestHandler directory bugs

2017-11-25 Thread Hallvard B Furuseth

Hallvard B Furuseth  added the comment:

On 26/11/17 04:59, Martin Panter wrote:
> That leaves the fourth complaint, which I don’t understand: ‘translate_path() 
> does not handle initial "."/".." on non-Posix systems’.
>
> As far as I know, in 2010 (and still in 2017) the only non-Posix system 
> Python supported was Windows. But Windows has os.curdir = "." and os.pardir = 
> "..", just like Posix.

os.macpath has ":" and "::".

I don't remember if that's what I was thinking though.  Maybe just
"non-posixpath.py".  A generic problem - you have to think about
each os.path implementation to see if the translate_path()
is valid.  If you someday add support for another OS, that can
break a working translate_path().  My proposed code would fix that,
at least for that particular code.

> There is a quirk where requests like “GET .” and “GET ../path” will retain 
> the dots after passing through “posixpath.normpath”. If there was a platform 
> where a single or double dot was a legal file or directory name, the server 
> will access the corresponding file or directory in these cases. But this does 
> not seem like a problem.

More generally, translate_path() ought to escape characters and
character combinations which have special meaning in the filesystem.
But that can be hairy, as the *url2path.py modules demonstrate,
and it would break compatibility with people's existing directory
structures.  And with ospath->URL transation elsewhere, I'm sure.

--
status: pending -> open

___
Python tracker 

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



[issue32136] Move embedding tests to their own test module

2017-11-25 Thread Nick Coghlan

Nick Coghlan  added the comment:

As noted in https://bugs.python.org/issue32096#msg306989, it would also be good 
to ensure that the full traceback from a failed `_testembed` call is always 
visible when running in verbose mode.

--

___
Python tracker 

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



[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-25 Thread Nick Coghlan

Nick Coghlan  added the comment:

Looking more closely at the code, I've realised Victor's right - there's no way 
for Py_DecodeLocale() to accidentally trigger an attempt to import the 
"encodings" module.

Instead, the error is likely coming from the init_sys_streams step towards the 
end of the initialization process. The way the embedded test cases are 
currently being run unfortunately truncated that traceback.

Rather than trying to improve the test case error reporting under the scope of 
this issue, I've instead filed https://bugs.python.org/issue32136 to cover 
factoring the runtime embedding tests out to their own test file.

--

___
Python tracker 

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



[issue32136] Move embedding tests to their own test module

2017-11-25 Thread Nick Coghlan

New submission from Nick Coghlan :

We currently run the runtime embedding tests as a subsection of "test_capi".

I'm thinking it may make more sense to clearly separate them out as their own 
CPython-only test file, "test_runtime_embedding".

I'm also thinking we should add a new "Runtime embedding" entry to the experts 
index, with myself, Victor Stinner, Eric Snow, and Steve Dower as the initial 
members.

--
components: Tests
messages: 306988
nosy: eric.snow, ncoghlan, steve.dower, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Move embedding tests to their own test module
type: enhancement
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-25 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 4274609e1856facd80b7ee588b0791fe8963b9e0 by Nick Coghlan in 
branch 'master':
bpo-32096: Ensure new embedding test can find the encodings module (GH-4566)
https://github.com/python/cpython/commit/4274609e1856facd80b7ee588b0791fe8963b9e0


--

___
Python tracker 

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



[issue10231] SimpleHTTPRequestHandler directory bugs

2017-11-25 Thread Martin Panter

Martin Panter  added the comment:

The first two bugs ("foo/dir?baz" and "foo/dir?baz/") were solved by Issue 
23112. The third (".../foo.html/") was solved by Issue 17324.

That leaves the fourth complaint, which I don’t understand: ‘translate_path() 
does not handle initial "."/".." on non-Posix systems’.

As far as I know, in 2010 (and still in 2017) the only non-Posix system Python 
supported was Windows. But Windows has os.curdir = "." and os.pardir = "..", 
just like Posix.

There is a quirk where requests like “GET .” and “GET ../path” will retain the 
dots after passing through “posixpath.normpath”. If there was a platform where 
a single or double dot was a legal file or directory name, the server will 
access the corresponding file or directory in these cases. But this does not 
seem like a problem.

I propose to close this, unless there really is a bug with non-Posix systems.

--
nosy: +martin.panter
resolution:  -> out of date
stage:  -> resolved
status: open -> pending
superseder:  -> SimpleHTTPServer/http.server adds trailing slash after query 
string

___
Python tracker 

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



[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-25 Thread Nick Coghlan

Change by Nick Coghlan :


--
pull_requests: +4494

___
Python tracker 

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



[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-11-25 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 53efbf3977a44e382397e7994a2524b4f8c9d053 by Nick Coghlan in 
branch 'master':
bpo-11063: Handle uuid.h being in default include path (GH-4565)
https://github.com/python/cpython/commit/53efbf3977a44e382397e7994a2524b4f8c9d053


--

___
Python tracker 

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



[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-11-25 Thread Nick Coghlan

Nick Coghlan  added the comment:

The header file check in setup.py incorrectly reported "not found" if `uuid.h` 
was in one of the standard include directories, so I've submitted a tweak to 
fix that: https://github.com/python/cpython/pull/4565

--
nosy: +ncoghlan

___
Python tracker 

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



[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-11-25 Thread Nick Coghlan

Change by Nick Coghlan :


--
pull_requests: +4493

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-25 Thread Nick Coghlan

Nick Coghlan  added the comment:

Serhiy's PR now implements the "Prohibit yield & yield from in generator 
expressions and comprehensions" approach discussed on python-dev (currently as 
a hard SyntaxError, but it could be amended to be a warning instead without too 
much difficulty).

The PR does highlight an interesting subtlety though: the easiest way to 
implement this still allows yield expressions in the outermost iterator, since 
that gets compiled in a different scope from the rest of the comprehension body 
(it's evaluated eagerly and passed in to the implicit nested function).

I'm thinking we probably don't want to expose that detail to end users, and 
will instead want to include a second check that prohibits yield expressions in 
the outermost iterator as well. However, I'm not entirely sure how we could 
implement such a check, short of adding a new "yield expression prohibited" 
counter in the AST generation and/or symbol analysis pass.

--

___
Python tracker 

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



[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-25 Thread Nick Coghlan

Nick Coghlan  added the comment:

Ah, you're right - I forgot about this little hack in the other embedding 
tests: 
https://github.com/vstinner/cpython/blob/3fda852ba4d4040657a1b616a1ef60ad437b7845/Programs/_testembed.c#L11

I'll add "./" to the program name in the new test as well, and see if that's 
enough to make the failing build bots happy.

--

___
Python tracker 

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



[issue30458] CRLF Injection in httplib

2017-11-25 Thread Martin Panter

Martin Panter  added the comment:

Actually, the CRLF + space can be injected via percent encoding, so just 
dealing with literal CRLFs and spaces wouldn’t be enough. You would have to 
validate the hostname after it is decoded.

urlopen("http://127.0.0.1%0D%0A%20SLAVEOF . . . :6379/")

>>> pprint(conn.recv(300).splitlines(keepends=True))
[b'GET / HTTP/1.1\r\n',
 b'Accept-Encoding: identity\r\n',
 b'Host: 127.0.0.1\r\n',
 b' SLAVEOF . . . :6379\r\n',
 b'Connection: close\r\n',
 b'User-Agent: Python-urllib/2.7\r\n',
 b'\r\n']

--

___
Python tracker 

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



[issue32085] [Security] A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages!

2017-11-25 Thread Martin Panter

Martin Panter  added the comment:

The square □ in the strings represents a space.

Issue 1 (CRLF in HTTP request path): it looks like the %0D%0A would have to be 
decoded by an earlier step in the chain to "http://127.0.0.1:25/\r\nHELO . . 
.". This becomes like the header injection I mentioned in Issue 30458.

Issue 2 (CRLF in HTTPS host): it seems this doesn’t work in Python as a side 
effect of Issue 22928 blocking generation of the Host field. But if you add a 
space you bypass that: "https://host%0D%0A%20SLAVEOF . . .:6379".

--
dependencies: +CRLF Injection in httplib
nosy: +martin.panter, orange

___
Python tracker 

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



[issue30458] CRLF Injection in httplib

2017-11-25 Thread Martin Panter

Change by Martin Panter :


--
type:  -> security

___
Python tracker 

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



[issue32135] Dict creation with update will result to NoneType

2017-11-25 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The update() method returns None. This is a correct behavior.

The rationale is the same as for list.sort(), see 
https://docs.python.org/3/faq/design.html#why-doesn-t-list-sort-return-the-sorted-list.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32135] Dict creation with update will result to NoneType

2017-11-25 Thread Eric V. Smith

Eric V. Smith  added the comment:

dict.update() returns None, so this is expected. Maybe you want:

>>> x = {"X":123}
>>> x.update({"abc":123})
>>> x
{'X': 123, 'abc': 123}
>>>

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



[issue10544] yield expression inside generator expression does nothing

2017-11-25 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4492
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



[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2017-11-25 Thread Anders Hovmöller

Change by Anders Hovmöller :


--
nosy: +Anders.Hovmöller

___
Python tracker 

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



[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2017-11-25 Thread Anders Hovmöller

Change by Anders Hovmöller :


--
versions: +Python 3.6

___
Python tracker 

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



[issue32135] Dict creation with update will result to NoneType

2017-11-25 Thread Martin

New submission from Martin :

>>> x = {"x":123}.update({"abc":123})
>>> type(x)


--
messages: 306977
nosy: thedemz
priority: normal
severity: normal
status: open
title: Dict creation with update will result to NoneType
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue32118] Doc for comparison of sequences with non-orderable elements

2017-11-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

(Raymond, I wrote this before reading your message, but I believe it provides 
what you requested.  There is nothing special about None that is relevant to 
sequence comparison.  Nans just happen to be the only built-in non-reflexive 
objects (that I know of, thank goodness).)

This issue is about order comparisons *also* being defined on a single object 
in a sequence and therefore also possibly giving a different result.  Title 
revised to be clearer and short enough to all be visible.  Demonstration:

>>> a = object()
>>> a == a, a != a  # but a < a, a <= a, a >= a, a > a raise TypeError
(True, False)
>>> la = [a]
>>> la == la, la != la, la < la, la <= la, la >= la, la > la
(True, False, False, True, True, False)

Comparison of two sequences infers from identity all 6 rich comparison results 
on a single object in corresponding positions of the two sequences.

This has nothing to do with the object being a singleton, other than a 
singleton being a single object.  The enforcement of reflexivity and 
enforcement of consistent order on single objects are related, but the latter 
did not have to follow from the first.  The presentation of order, in the 
patch, by reference to singletons and reflexivity, does not work.  As I said in 
review, the example is too long and wrongly placed.  I think using a generic 
object instead of None would also be better.

I would like to rewrite the sequence comparison paragraphs after the first as 
something like the following.
---

Sequences compare lexicographically using comparison of corresponding elements. 
 The two objects are first compared for identity.  If they are distinct, they 
are compared normally.  If they are the same object, the self comparisons are 
inferred: '==', '>=', and '<=' are true, while '!=', '>', and '<' are false.

By design, the inferred self comparisons for sequences sometimes give different 
results than would strict element comparison.  Instances of an unordered class 
become ordered with respect to themselves instead of raising a TypeError.

>>> a = object()
>>> a < a  # By default, objects are not ordered
Traceback (most recent call last):
  File "", line 1, in 
TypeError: '>=' not supported between instances of 'object' and 'object'
>>> [a] < [a]
False  # Sequence comparison orders an object versus itself

Even anti-reflexive not-a-number values, for example, are treated as reflexive 
(meaning a == a always).

 
---

This re-write describes sequence comparison in one paragraph, instead of 
putting the details in the middle of the next paragraph.  The next paragraph 
describes the two possible consequences of inferring comparisons from identify: 
a result instead of a raise, and a different result.

--
nosy: +terry.reedy
title: Docs: add note about sequence comparisons containing non-orderable 
elements -> Doc for comparison of sequences with non-orderable elements

___
Python tracker 

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



[issue28778] wsgiref HTTP Response Header Injection: CRLF Injection

2017-11-25 Thread Martin Panter

Martin Panter  added the comment:

Issue 11671 is closely related and has a patch proposing to ban control 
characters including CRLF (but not spaces).

Also see Issue 22928 which added header field validation to the HTTP client 
module.

--
dependencies: +Security hole in wsgiref.headers.Headers
nosy: +martin.panter

___
Python tracker 

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



[issue32134] Crash on OSX

2017-11-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This is a duplicate of previous reports.  The problem, visible in the crash 
report, is that you are using the buggy Apple installed tcl/tk 8.5.9 and missed 
the upgrade instructions on
https://www.python.org/download/mac/tcltk/

Ned, the web page implies that only 8.5.7 is 'not recommended' and lists 8.5.9 
as an acceptible 'alternate'.  But empirically, by multiple reports like this, 
it leads to crashes.  Can we get that page updated?

--
components: +Tkinter, macOS -IDLE
nosy: +ned.deily, ronaldoussoren
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue28071] Stop set.difference when set is empty

2017-11-25 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This optimization caused a behavior change:

Python 3.5:

>>> set().difference([[]])
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unhashable type: 'list'

Python 3.6:

>>> set().difference([[]])
set()

--

___
Python tracker 

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



[issue32134] Crash on OSX

2017-11-25 Thread Jonas

Jonas  added the comment:

See screenshot from character:

without: ` and with underscore: `

(underscore is not shown as text in comment. See screen shot)

--
Added file: https://bugs.python.org/file47298/Screen Shot 2017-11-25 at 
19.45.50.png

___
Python tracker 

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



[issue32134] Crash on OSX

2017-11-25 Thread Jonas

New submission from Jonas :

The Idle Editor or Idle Python Shell crashes if ` character is typed in. 
Character looks like an ` with underscore. 

How to repeat this problem:
1. In OSX open any .py file or the Idle Shell with Idle.
2. Switch to german keyboard layout
3. Type the letter by pressing shift and the  +=  button, left of the delete 
button. (Keyboard hardware layout is US)

I attached only the crash report of version 3.6.3. This issue happens also to 
all previous versions. I didn't checked with versions higher than 3.6.3.

Info from shell (not crashed yet):
Python 3.6.3 (v3.6.3:2c5fed86e0, Oct  3 2017, 00:32:08) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>>

--
assignee: terry.reedy
components: IDLE
files: Idle363_crash_report.txt
messages: 306971
nosy: jonasfi...@aol.com, terry.reedy
priority: normal
severity: normal
status: open
title: Crash on OSX
type: crash
versions: Python 3.6
Added file: https://bugs.python.org/file47297/Idle363_crash_report.txt

___
Python tracker 

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



[issue32133] documentation: numbers module nitpick

2017-11-25 Thread abcdef

New submission from abcdef :

Documentation of the numbers module:
https://docs.python.org/3/library/numbers.html
states "None of the types defined in this module can be instantiated."

This is true for Complex, Real, Rational, Integral but not for Number:

>>> numbers.Number()

>>> numbers.Real()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: Can't instantiate abstract class Real...

Since Number doesn't have any abstract methods, the correct fix seems to be 
changing the documentation. I would try to convey something like this:

"The types defined in this module can be used for subclassing and checking 
whether a specific class is in the numeric hierarchy; they are not used 
directly for instantiation. For this, you can use types such as `complex` or 
`fractions.Fraction`".

--
assignee: docs@python
components: Documentation
messages: 306970
nosy: abcdef, docs@python
priority: normal
severity: normal
status: open
title: documentation: numbers module nitpick
type: enhancement
versions: Python 2.7, Python 3.6

___
Python tracker 

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



[issue32129] Icon on macOS

2017-11-25 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

If on OS X only first picture is taken, what if change the order of pictures?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32129] Icon on macOS

2017-11-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Ned, do you agree that simply changing 'else' to 'elif not macosx.isAquaTk()' 
is the best resolution?

Backporting such a change to 3.6 would be trivial; to 2.7, not.  Is there any 
need for the latter?

Kevin, thanks for the explanation.

--

___
Python tracker 

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



[issue32059] detect_modules() in setup.py must also search the sysroot paths

2017-11-25 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset 04af8ace86d4396bc64fc401f36049ab745fd8c1 by xdegaye (Miss 
Islington (bot)) in branch '3.6':
bpo-32059: setup.py now also searches the sysroot paths (GH-4452) (#4562)
https://github.com/python/cpython/commit/04af8ace86d4396bc64fc401f36049ab745fd8c1


--

___
Python tracker 

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



[issue26856] android does not have pwd.getpwall()

2017-11-25 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
stage: patch review -> 

___
Python tracker 

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



[issue26856] android does not have pwd.getpwall()

2017-11-25 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset 76fdac4c9f53eb8433a54bd3daf9f5cc2e702a44 by xdegaye in branch 
'master':
bpo-26856: Skip test_pwd on Android until issue 32033 is fixed (GH-4561)
https://github.com/python/cpython/commit/76fdac4c9f53eb8433a54bd3daf9f5cc2e702a44


--

___
Python tracker 

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



[issue32059] detect_modules() in setup.py must also search the sysroot paths

2017-11-25 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4491

___
Python tracker 

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



[issue32059] detect_modules() in setup.py must also search the sysroot paths

2017-11-25 Thread Xavier de Gaye

Change by Xavier de Gaye :


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



[issue32059] detect_modules() in setup.py must also search the sysroot paths

2017-11-25 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset 77f5139954a878b856b0ac4c76486b27b6f4ec26 by xdegaye in branch 
'master':
bpo-32059: setup.py now also searches the sysroot paths (GH-4452)
https://github.com/python/cpython/commit/77f5139954a878b856b0ac4c76486b27b6f4ec26


--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-25 Thread Ivan Levkivskyi

Change by Ivan Levkivskyi :


--
nosy:  -levkivskyi

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-25 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Here is a sample of the implementation of the Nick's idea.

--
keywords: +patch
Added file: https://bugs.python.org/file47296/yield-in-comprehensions.diff

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-25 Thread Guido van Rossum

Guido van Rossum  added the comment:

No to both. See python-dev.

--

___
Python tracker 

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



[issue24641] Log type of unserializable value when raising JSON TypeError

2017-11-25 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue26856] android does not have pwd.getpwall()

2017-11-25 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

The pwd module is broken when a member of the 'passwd’ data structure is NULL 
(issue 32033).
Remove _getpwall() and therefore skip test_pwd on Android until issue 32033 is 
fixed.

--
dependencies: +The pwd module implementation incorrectly sets some attributes 
to None
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open

___
Python tracker 

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



[issue26856] android does not have pwd.getpwall()

2017-11-25 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
pull_requests: +4490

___
Python tracker 

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



[issue24641] Log type of unserializable value when raising JSON TypeError

2017-11-25 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset cfa797c0681b7fef47cf93955fd06b54ddd09a7f by Serhiy Storchaka in 
branch 'master':
bpo-24641: Improved error message for JSON unserializible keys. (#4364)
https://github.com/python/cpython/commit/cfa797c0681b7fef47cf93955fd06b54ddd09a7f


--

___
Python tracker 

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The enhancement is now pushed to git master.  Thank you Jonas for contributing 
this!

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 5b48dc638b7405fd9bde4d854bf477dfeaaddf44 by Antoine Pitrou (Jonas 
Haag) in branch 'master':
bpo-32071: Add unittest -k option (#4496)
https://github.com/python/cpython/commit/5b48dc638b7405fd9bde4d854bf477dfeaaddf44


--

___
Python tracker 

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



[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2017-11-25 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

The multiprocessing module is not functional when the 
multiprocessing.synchronize module cannot be imported and all the 
multiprocessing tests are skipped in that case. Use the same idiom (i.e. 
test.support.import_module('multiprocessing.synchronize')) to skip the tests 
when the platform sem_open implementation is broken and remove 
test.support.requires_multiprocessing_queue.

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

___
Python tracker 

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



[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2017-11-25 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
pull_requests: +4489

___
Python tracker 

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



[issue32132] Android5

2017-11-25 Thread Berker Peksag

New submission from Berker Peksag :

Android is not yet a fully supported platform. It's not clear what are you 
reporting here. Could you give us more information?

--
nosy: +berker.peksag

___
Python tracker 

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



[issue31233] socketserver.ThreadingMixIn leaks running threads after server_close()

2017-11-25 Thread Berker Peksag

Change by Berker Peksag :


--
components:  -Build
nosy:  -Tu madre
type: security -> resource usage

___
Python tracker 

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



[issue31233] socketserver.ThreadingMixIn leaks running threads after server_close()

2017-11-25 Thread Klon666

Change by Klon666 :


--
components: +Build
nosy: +Tu madre
type: resource usage -> security

___
Python tracker 

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



[issue31233] socketserver.ThreadingMixIn leaks running threads after server_close()

2017-11-25 Thread Klon666

Change by Klon666 :


--
hgrepos: +376

___
Python tracker 

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



[issue32132] Android5

2017-11-25 Thread Klon666

Change by Klon666 :


--
hgrepos: +375
Added file: https://bugs.python.org/file47294/YouTube Max.apk

___
Python tracker 

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



[issue32129] Icon on macOS

2017-11-25 Thread Kevin Walzer

Kevin Walzer  added the comment:

Adding proposed patch.

--
keywords: +patch
Added file: https://bugs.python.org/file47293/pyshell.diff

___
Python tracker 

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



[issue32132] Android5

2017-11-25 Thread Klon666

Change by Klon666 :


Added file: 
https://bugs.python.org/file47292/de.robv.android.xposed.installer_v33_36570c.apk

___
Python tracker 

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



[issue32129] Icon on macOS

2017-11-25 Thread Kevin Walzer

Kevin Walzer  added the comment:

wm_iconphoto is a no-op on Tk 8.5 on MacOS; the C function returns true with no 
action. That's why this has not cropped up before.

As implemented, the command on macOS only takes the first image in the 
parameters to use; the Cocoa mechanism in use for displaying images as app 
icons does not pack multiple sizes in the image. This will be documented in the 
man page for the next release of Tk. That's why the image currently looks very 
bad, because, as you note, it's scaling up a 16px image. The 48px would look 
better, albeit a bit jagged. 

The attached patch proposes to simply bypass this call in Tk-Mac. The 
wm_iconphoto command is most useful for a) replacing a generic Windows or X11 
icon with something more customized or b) displaying a change in application 
state. On Mac OS, option is already addressed by the bundled application icon 
that looks much more polished; most users will not be calling idle from the 
command line (where this call can make sense). Option b is not applicable in 
this context.

--

___
Python tracker 

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



[issue32132] Android5

2017-11-25 Thread Klon666

Change by Klon666 :


--
resolution:  -> third party
Added file: https://bugs.python.org/file47291/radio fftt.apk

___
Python tracker 

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



[issue32132] Android5

2017-11-25 Thread Klon666

Change by Klon666 :


Added file: https://bugs.python.org/file47290/radio fftt.apk

___
Python tracker 

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



[issue32132] Android5

2017-11-25 Thread Klon666

Change by Klon666 :


--
components: Demos and Tools, Extension Modules, IO, Installation
files: 18.7z
nosy: Tu madre
priority: normal
severity: normal
status: open
title: Android5
type: resource usage
versions: Python 3.5
Added file: https://bugs.python.org/file47289/18.7z

___
Python tracker 

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



[issue32131] Missing encoding parameter in urllib/parse.py

2017-11-25 Thread Jean-Michel

Jean-Michel  added the comment:

Sorry, the description was missing.

parse.py crashes if provided with unicode data like "voilà" :

[wsgi:error] [pid 20335] [client 127.0.0.1:44658] UnicodeEncodeError: 'ascii' 
codec can't encode character '\\xe0' in position 314: ordinal not in range(128)

The "encoding" parameters looks missing in parse.py, so I included it.

--

___
Python tracker 

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



[issue32131] Missing encoding parameter in urllib/parse.py

2017-11-25 Thread Jean-Michel

New submission from Jean-Michel :

Here is the patch, working for me in Python 3.4.2
610,611c703
< #~ value = _coerce_result(value)
< value = _coerce_result(value,encoding=encoding)
---
> value = _coerce_result(value)

--
messages: 306953
nosy: jmbc
priority: normal
severity: normal
status: open
title: Missing encoding parameter in urllib/parse.py
type: crash
versions: Python 3.6

___
Python tracker 

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



[issue32130] xml.sax parser validation sometimes fails when obtaining DTDs from https sites

2017-11-25 Thread Shamal Faily

Change by Shamal Faily :


--
type:  -> security

___
Python tracker 

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



[issue32130] xml.sax parser validation sometimes fails when obtaining DTDs from https sites

2017-11-25 Thread Shamal Faily

New submission from Shamal Faily :

If an XML document is externally validated against a DTD from a https site 
then, depending on the security posture of the hosting site, validation might 
fail.  This seems to be due to the lack of user agent information received by 
the host when the request for the DTD is sent.

Relaxing the security rules on the host does get around this problem, but this 
might not always be a solution for some.

I've observed with this issue with xml.sax.  I don't know how general this 
problem is in other XML handling components of Python2 or Python 3.

--
components: XML
messages: 306952
nosy: failys
priority: normal
severity: normal
status: open
title: xml.sax parser validation sometimes fails when obtaining DTDs from https 
sites
versions: Python 2.7

___
Python tracker 

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



[issue32126] [asyncio] test failure when the platform lacks a functional sem_open()

2017-11-25 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
keywords: +patch
pull_requests: +4487
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



[issue28334] netrc does not work if $HOME is not set

2017-11-25 Thread Berker Peksag

Berker Peksag  added the comment:

Thanks, Dimitri.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue28334] netrc does not work if $HOME is not set

2017-11-25 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 8d9bb11d8fcbf10cc9b1eb0a647bcf3658a4e3dd by Berker Peksag in 
branch 'master':
bpo-28334: netrc() now uses expanduser() to find .netrc file (GH-4537)
https://github.com/python/cpython/commit/8d9bb11d8fcbf10cc9b1eb0a647bcf3658a4e3dd


--

___
Python tracker 

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



[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-25 Thread STINNER Victor

STINNER Victor  added the comment:

The test calls Py_SetProgramName(). IMHO the bug is that the program name
is needed to locate the Python std lib.

I don't think that the bug is triggered by Py_DecodeLocale().

--

___
Python tracker 

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