[issue33000] IDLE Doc: Text consumes unlimited RAM, consoles likely not

2018-11-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Roger, John may have run IDLE rather than IDLEX.  This issue is about 
documenting the fact that tk Texts do not throw away lines, and will accept 
text until there are memory problems.  (Command Prompt, for instance, only 
keeps the last N lines, where N defaults to 300 (not enough to see a test suite 
run) and is max .)

--

___
Python tracker 

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



[issue35142] html.entities.html5 should require a trailing semicolon

2018-11-01 Thread Daniel Lovell


Daniel Lovell  added the comment:

I'm setting this back to closed as I unintentionally reopened. Please forgive 
me as I'm new to the Python BPO. However, I did mean to continue the 
conversation if not reopen the issue.

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

___
Python tracker 

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



[issue35142] html.entities.html5 should require a trailing semicolon

2018-11-01 Thread Daniel Lovell


Daniel Lovell  added the comment:

Ah, I stupidly overlooked that as I'm only familiar with this HTML5 
specification: 
https://html.spec.whatwg.org/multipage/syntax.html#character-references

Where it states that characters MUST be terminated with a semicolon. Honestly 
never seen it done otherwise.

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

___
Python tracker 

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



[issue35140] encoding problem: gbk

2018-11-01 Thread Windson Yang


Windson Yang  added the comment:

If I understand your question correctly, you should save the file(the one 
contain Chinese chars) with GBK encoding using your editor. Otherwise, your 
editor would save it using the default encoding which led to python can't 
decode it correctly.

--
nosy: +Windson Yang

___
Python tracker 

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



[issue35142] html.entities.html5 should require a trailing semicolon

2018-11-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The documentation clearly says that this is for intention and give a reference 
to the HTML5 specification.

--
nosy: +serhiy.storchaka
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



[issue35075] Doc: pprint example uses dead URL

2018-11-01 Thread INADA Naoki


Change by INADA Naoki :


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



[issue35142] html.entities.html5 should require a trailing semicolon

2018-11-01 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +ezio.melotti, xtreak

___
Python tracker 

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



[issue35141] encoding problem: gbk

2018-11-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

@anmikf Please use one issue for all the details. I am closing this as a 
duplicate of issue35140 since it has the same reproducer script and details. 
Feel free to reopen this if it's a different one adding little more context on 
the difference.

Thanks!

--
nosy: +xtreak
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> encoding problem: gbk

___
Python tracker 

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



[issue35142] html.entities.html5 should require a trailing semicolon

2018-11-01 Thread Daniel Lovell


New submission from Daniel Lovell :

html.entities.html5 keys should either require a trailing semicolon. The Python 
docs say:

html.entities.html5
"A dictionary that maps HTML5 named character references [1] to the equivalent 
Unicode character(s), e.g. html5['gt;'] == '>'. Note that the trailing 
semicolon is included in the name (e.g. 'gt;'), however some of the names are 
accepted by the standard even without the semicolon: in this case the name is 
present with and without the ';'. See also html.unescape()."

https://docs.python.org/3/library/html.entities.html?highlight=html

However, it is not clear without looking at the source which keys require the 
semicolon and which do not. Taking a look at the source, the number which 
require a trailing semicolon vastly outnumber the others.

For simplicity and continuity with the w3.org standard HTML5 Character Entity 
Reference Chart - I recommend that the trailing semicolon be required. As they 
are in HTML5: https://dev.w3.org/html5/html-author/charref

My recommendation could then be extrapolated to say we should require the 
ampersand as HTML5 does, but I don't think this revision should be taken this 
far unless others agree.

--
components: Library (Lib)
messages: 329105
nosy: daniellovell
priority: normal
severity: normal
status: open
title: html.entities.html5 should require a trailing semicolon
type: behavior
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



[issue35139] Statically linking pyexpat in Modules/Setup fails to compile on macOS

2018-11-01 Thread miss-islington


miss-islington  added the comment:


New changeset 2339fe7cad9a84815fe551fedd6acdc3f2bf0a64 by Miss Islington (bot) 
in branch '3.6':
closes bpo-35139: The `pyexpat` module's macros in `Modules/Setup` now match 
`setup.py` (GH-10289)
https://github.com/python/cpython/commit/2339fe7cad9a84815fe551fedd6acdc3f2bf0a64


--

___
Python tracker 

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



[issue33578] cjkcodecs missing getstate and setstate implementations

2018-11-01 Thread INADA Naoki


INADA Naoki  added the comment:


New changeset 488c0a6cdf09e21774e63c2a430ecc0de804d147 by INADA Naoki 
(Christopher Thorne) in branch 'master':
bpo-33578: Fix getstate/setstate for CJK decoder (GH-10290)
https://github.com/python/cpython/commit/488c0a6cdf09e21774e63c2a430ecc0de804d147


--

___
Python tracker 

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



[issue35139] Statically linking pyexpat in Modules/Setup fails to compile on macOS

2018-11-01 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset a614cc92088c4e1b2d90aa03415ee6acf70f03b4 by Benjamin Peterson in 
branch '2.7':
[2.7] closes bpo-35139: The `pyexpat` module's macros in `Modules/Setup` now 
match `setup.py` (GH-10293)
https://github.com/python/cpython/commit/a614cc92088c4e1b2d90aa03415ee6acf70f03b4


--

___
Python tracker 

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



[issue35139] Statically linking pyexpat in Modules/Setup fails to compile on macOS

2018-11-01 Thread miss-islington


miss-islington  added the comment:


New changeset 04c96669b161d802b7a906c06cd77895cee1864e by Miss Islington (bot) 
in branch '3.7':
closes bpo-35139: The `pyexpat` module's macros in `Modules/Setup` now match 
`setup.py` (GH-10289)
https://github.com/python/cpython/commit/04c96669b161d802b7a906c06cd77895cee1864e


--
nosy: +miss-islington

___
Python tracker 

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



[issue35139] Statically linking pyexpat in Modules/Setup fails to compile on macOS

2018-11-01 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +9603

___
Python tracker 

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



[issue35139] Statically linking pyexpat in Modules/Setup fails to compile on macOS

2018-11-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9601

___
Python tracker 

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



[issue35139] Statically linking pyexpat in Modules/Setup fails to compile on macOS

2018-11-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9602

___
Python tracker 

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



[issue35139] Statically linking pyexpat in Modules/Setup fails to compile on macOS

2018-11-01 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 318ab63c01f5b8e7562b122ab5ba01258a51277b by Benjamin Peterson 
(Max Bélanger) in branch 'master':
closes bpo-35139: The `pyexpat` module's macros in `Modules/Setup` now match 
`setup.py` (GH-10289)
https://github.com/python/cpython/commit/318ab63c01f5b8e7562b122ab5ba01258a51277b


--
nosy: +benjamin.peterson
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue35141] encoding problem: gbk

2018-11-01 Thread 安迷

New submission from 安迷 :

Windows10x64
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit 
(AMD64)] on win32

--
components: Windows
files: encoding_problem_gbk.py
messages: 329099
nosy: anmikf, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: encoding problem: gbk
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file47902/encoding_problem_gbk.py

___
Python tracker 

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



[issue35113] inspect.getsource returns incorrect source for classes when class definition is part of multiline strings

2018-11-01 Thread Windson Yang


Windson Yang  added the comment:

Yes, the code located at 
https://github.com/python/cpython/blob/7cd25434164882c2093ea41ccfc7b95a05cd5cbd/Lib/inspect.py#L794
 

I think to use a comment status var would be a solution, Do you have any idea 
to fix it?

--
nosy: +Windson Yang

___
Python tracker 

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



[issue31880] subprocess process interaction with IDLEX GUI causes pygnuplot silent failures

2018-11-01 Thread Roger Serwy


Roger Serwy  added the comment:

I am closing this issue. For future reference, IDLEX is a separate project from 
IDLE. Please refer IDLEX bugs to the project developer (me).

--
assignee:  -> terry.reedy
components: +IDLE -Interpreter Core, Windows
nosy: +roger.serwy, terry.reedy
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



[issue35136] test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot

2018-11-01 Thread Kubilay Kocak


Kubilay Kocak  added the comment:

The version in base is:

/usr/bin/openssl version
OpenSSL 1.1.1-freebsd  11 Sep 2018

There is a version from ports also installed at a different prefix, which I 
don't believe Python picks up by default unless Modules/Setup or --with-openssl 
(is this in 3.6?) is used.

I don't believe either, or anything else non-default is used for this buildbot 
environment, either in the worker configuration, or the builder configs 
themselves.

If test_ssl isnt failing on 3.x on this same worker, then presumably there's a 
commit or fix that hasn't been backported.

--

___
Python tracker 

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



[issue33000] IDLE Doc: Text consumes unlimited RAM, consoles likely not

2018-11-01 Thread Roger Serwy


Roger Serwy  added the comment:

Big Stone: Yes, IDLEX does have a slow memory leak. Please check if this bug is 
happening with IDLE itself.

Terry: Thanks for responding to this. I suggest this issue can be closed.

--
nosy: +roger.serwy

___
Python tracker 

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



[issue25416] Add encoding aliases from the (HTML5) Encoding Standard

2018-11-01 Thread Felipe Rodrigues


Felipe Rodrigues  added the comment:

Ezio, I have issued a simple PR that adds just the two aliases cited in the 
issue's initial message. I would like to implement tests but as I wrote in the 
PR's message, I'm not really sure how to proceed with that. bpo-18624 is really 
related to this issue and in there is a reference to a test_codecs.py file that 
I did not find.

If you could give me a few pointer on how to proceed, I'll be glad to improve 
my PR, add tests and even add all the other aliases that are missing.

--

___
Python tracker 

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



[issue33578] cjkcodecs missing getstate and setstate implementations

2018-11-01 Thread Christopher Thorne


Change by Christopher Thorne :


--
pull_requests: +9600

___
Python tracker 

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



[issue35058] Unable to Install Python on Windows

2018-11-01 Thread Steve Dower


Steve Dower  added the comment:

I don't know what is on your syllabus, but you might have more luck with 
Anaconda or WinPython than Python 2.7 or 3.4 (which is how far back you'd have 
to go to get a different installer).

--

___
Python tracker 

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



[issue35129] Different behaviour comparing versions (distutils.version.LooseVersion) between python2.7 and python3.x

2018-11-01 Thread davide moro

davide moro  added the comment:

Thanks and sorry for the duplicate!

Il giorno gio 1 nov 2018 alle ore 00:53 Éric Araujo 
ha scritto:

>
> Éric Araujo  added the comment:
>
> Please discuss on #14894
>
> --
> resolution:  -> duplicate
> stage:  -> resolved
> status: open -> closed
> superseder:  -> distutils.LooseVersion fails to compare number and a word
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue35139] Statically linking pyexpat in Modules/Setup fails to compile on macOS

2018-11-01 Thread Max Bélanger

Change by Max Bélanger :


--
keywords: +patch
pull_requests: +9599
stage:  -> patch review

___
Python tracker 

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



[issue35139] Statically linking pyexpat in Modules/Setup fails to compile on macOS

2018-11-01 Thread Maxime Belanger


Maxime Belanger  added the comment:

The line in question being:

```
#pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c 
-I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI
```

--

___
Python tracker 

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



[issue35139] Statically linking pyexpat in Modules/Setup fails to compile on macOS

2018-11-01 Thread Maxime Belanger


New submission from Maxime Belanger :

Uncommenting the following line in `Modules/Setup` leads to a compiler error on 
macOS (tested w/ Xcode 10):

```
./Modules/expat/xmlparse.c:92:3: error: You do not have support for any sources 
of high quality entropy enabled. For end user security, that is probably not 
what you want.
  Your options include: * Linux + glibc >=2.25 (getrandom): HAVE_GETRANDOM, 
* Linux + glibc <2.25 (syscall SYS_getrandom): HAVE_SYSCALL_GETRANDOM, * BSD / 
macOS >=10.7
  (arc4random_buf): HAVE_ARC4RANDOM_BUF, * BSD / macOS <10.7 (arc4random): 
HAVE_ARC4RANDOM, * libbsd (arc4random_buf): HAVE_ARC4RANDOM_BUF + HAVE_LIBBSD, 
* libbsd
  (arc4random): HAVE_ARC4RANDOM + HAVE_LIBBSD, * Linux / BSD / macOS 
(/dev/urandom): XML_DEV_URANDOM * Windows (RtlGenRandom): _WIN32. If insist on 
not using any of
  these, bypass this error by defining XML_POOR_ENTROPY; you have been 
warned. If you have reasons to patch this detection code away or need changes 
to the build system,
  please open a bug. Thank you!
```

I believe this is due to `setup.py` being out of sync with `Modules/Setup`, 
which defines `XML_POOR_ENTROPY`. I'll attach a patch that resolves the issue 
for me.

--
components: Build, Extension Modules, macOS
messages: 329089
nosy: Maxime Belanger, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Statically linking pyexpat in Modules/Setup fails to compile on macOS
type: compile error
versions: Python 3.6, 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



[issue35075] Doc: pprint example uses dead URL

2018-11-01 Thread miss-islington


miss-islington  added the comment:


New changeset 7d35553138d8b2799ae68601ce836a3647509718 by Miss Islington (bot) 
in branch '3.7':
bpo-35075: Fix broken url in the pprint documentation (GH-10201)
https://github.com/python/cpython/commit/7d35553138d8b2799ae68601ce836a3647509718


--

___
Python tracker 

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



[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There are not just two sides. It is common to wrap new stable C API with 
something like:

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0305

What will you do with this?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35138] timeit documentation should have example with function arguments

2018-11-01 Thread davidak


Change by davidak :


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



[issue35081] Move internal headers to Include/internal/

2018-11-01 Thread STINNER Victor


STINNER Victor  added the comment:

> Please don't change Include/datetime.h without consulting with original 
> authors of this code (see issue876130).

FYI I tried to be very careful on each change to never modify the *public* C 
API.

But I modified the Py_BUILD_CORE API. This is fine since this API can change 
anytime, and it must not be used outside Python.

--

___
Python tracker 

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



[issue35138] timeit documentation should have example with function arguments

2018-11-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

There is an open PR that adds a similar example. Is it the same as the one you 
are proposing and I think you can add a review comment to add it with the same 
PR if it's different?

PR : https://github.com/python/cpython/pull/9787

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue35133] Bugs in concatenating string literals on different lines

2018-11-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am only unsure about email tests. Barry, David, could you please look? There 
may be errors in tests, but it may be that spaces are intentionally omitted, 
for testing cases without spaces. Tests are passed in any case, but I don't 
know the purpose of these tests.

--
nosy: +barry, r.david.murray

___
Python tracker 

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



[issue35137] Exception in isinstance when __class__ property raises

2018-11-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

MemoryError and RecursionError are subclasses of Exception. And there are may 
be other exceptions that can be raised by virtually any code and depend on 
conditions out of your control.

--

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-11-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Please don't change Include/datetime.h without consulting with original authors 
of this code (see issue876130).

--
nosy: +atuining, lemburg, serhiy.storchaka, tim.peters

___
Python tracker 

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



[issue35137] Exception in isinstance when __class__ property raises

2018-11-01 Thread Anthony Sottile


Anthony Sottile  added the comment:

arbitrary, sure, but deriving from `Exception` maybe?

--

___
Python tracker 

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



[issue35138] timeit documentation should have example with function arguments

2018-11-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +easy
stage:  -> needs patch
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



[issue35137] Exception in isinstance when __class__ property raises

2018-11-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Arbitrary exceptions should not be silenced. Imagine that the user pressed 
Ctrl-C when the __class__ property implemented in Python was executed. The 
KeyboardInterrupt exception will be silenced in Python 2, and isinstance() will 
silently return incorrect result.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35137] Exception in isinstance when __class__ property raises

2018-11-01 Thread daniel hahler


Change by daniel hahler :


--
nosy: +blueyed

___
Python tracker 

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



[issue35138] timeit documentation should have example with function arguments

2018-11-01 Thread davidak


New submission from davidak :

It is described here: https://www.pythoncentral.io/time-a-python-function/

I have just tested it. Works as expected.

Best would be if timeit supports this natively.

--
assignee: docs@python
components: Documentation
messages: 329079
nosy: davidak, docs@python
priority: normal
severity: normal
status: open
title: timeit documentation should have example with function arguments
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue35137] Exception in isinstance when __class__ property raises

2018-11-01 Thread Anthony Sottile


New submission from Anthony Sottile :

This may be intentional, but the behaviour changed between python2 and python3. 
 Want to make sure it's intentional as we're working (hacking) around this in 
pytest: https://github.com/pytest-dev/pytest/pull/4284

The actual impact on pytest is the use of `inspect.isclass`

Simplest reproduction:

class C(object):
@property
def __class__(self):
raise AssertionError('fail')

isinstance(C(), type)


In python2.x:

$ python2 t.py
$

In python 3.x:

$ python3.7 t.py
Traceback (most recent call last):
  File "t.py", line 6, in 
isinstance(C(), type)
  File "t.py", line 4, in __class__
raise AssertionError('fail')
AssertionError: fail


In python2.x it appears there's code which intentionally avoids this case:

https://github.com/python/cpython/blob/ca079a3ea30098aff3197c559a0e32d42dda6d84/Objects/abstract.c#L2906-L2909

Mostly want to see if this is intentional or not, it does feel odd that 
`inspect.isclass` raises instead of returning `False` in this case, but it's 
unclear if it's a problem with `isclass` or `isinstance`

--
components: Library (Lib)
messages: 329078
nosy: Anthony Sottile
priority: normal
severity: normal
status: open
title: Exception in isinstance when __class__ property raises
type: behavior
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



[issue35128] warning.warn messages with spacing issues

2018-11-01 Thread Pablo Santiago Blum de Aguiar


Pablo Santiago Blum de Aguiar  added the comment:

Thanks again for reviewing, merging and backporting. Next time I'll try and 
backport as well :-)

--

___
Python tracker 

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



[issue20596] Support for alternate wcstok syntax for Windows compilers

2018-11-01 Thread Erik Janssens


Erik Janssens  added the comment:

I created a github pull request based on the last patch of Jeffrey Armstrong.

Since mingw now also has a wcstok_s function, the discrimination between 
wcstok/wcstok_s is now based on MS_WINDOWS being defined, as was the case in 
Modules/main.c.

Is this correct, or should it be based on the detected compiler ?

--

___
Python tracker 

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



[issue20596] Support for alternate wcstok syntax for Windows compilers

2018-11-01 Thread Erik Janssens


Change by Erik Janssens :


--
pull_requests: +9597

___
Python tracker 

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



[issue35135] pip install --download option does not exist

2018-11-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Sorry, my comment reopened the bug :(

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



[issue35135] pip install --download option does not exist

2018-11-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

FYI created an issue at https://github.com/pypa/pip/issues/5976

Thanks!

--
assignee:  -> docs@python
resolution: third party -> 
stage: resolved -> 
status: closed -> open
type:  -> behavior

___
Python tracker 

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



[issue35135] pip install --download option does not exist

2018-11-01 Thread Zachary Ware


Change by Zachary Ware :


--
assignee: docs@python -> 
resolution:  -> third party
stage:  -> resolved
status: open -> closed
type: behavior -> 

___
Python tracker 

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



[issue35135] pip install --download option does not exist

2018-11-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report. The issue tracker deals with reports for CPython and 
issues related to pip are not maintained here. Please file a doc issue at 
https://github.com/pypa/pip/ . `--download` was deprecated with 
https://github.com/pypa/pip/pull/3085 and PR reports it's for removal with pip 
10. Usage of `pip download` as a toplevel command is encouraged and can be used.

Relevant doc needs to be updated at 
https://github.com/pypa/pip/blob/master/docs/html/user_guide.rst.


Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue35136] test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot

2018-11-01 Thread Christian Heimes


Christian Heimes  added the comment:

I'm trying to figure out the exact OpenSSL version. It used to be part of 
pythoninfo step.

--

___
Python tracker 

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



[issue35136] test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot

2018-11-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

There is also:

Traceback (most recent call last):
   File 
"/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py",
 line 1860, in wrap_conn
self.sock, server_side=True)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 407, in wrap_socket
_context=self, _session=session)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 817, in __init__
self.do_handshake()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 1077, in do_handshake
self._sslobj.do_handshake()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 689, in do_handshake
self._sslobj.do_handshake()
 ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:847)

https://buildbot.python.org/all/#/builders/172/builds/69/steps/4/logs/stdio

--

___
Python tracker 

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



[issue35136] test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot

2018-11-01 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/172/builds/40/steps/4/logs/stdio


==
ERROR: test_ciphers (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py",
 line 1672, in test_ciphers
s.connect(self.server_addr)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 1109, in connect
self._real_connect(addr, False)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 1100, in _real_connect
self.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 1077, in do_handshake
self._sslobj.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 689, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer
Stdout:
 server:  new connection from ('127.0.0.1', 12982)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
Test server failure:
Traceback (most recent call last):
   File 
"/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py",
 line 1938, in run
msg = self.read()
   File 
"/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py",
 line 1915, in read
return self.sslconn.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 874, in read
return self._sslobj.read(len, buffer)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 633, in read
v = self._sslobj.read(len)
 ConnectionResetError: [Errno 54] Connection reset by peer
==
ERROR: test_connect (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py",
 line 1497, in test_connect
s.connect(self.server_addr)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 1109, in connect
self._real_connect(addr, False)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 1100, in _real_connect
self.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 1077, in do_handshake
self._sslobj.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 689, in do_handshake
self._sslobj.do_handshake()
BrokenPipeError: [Errno 32] Broken pipe
Stdout:
 server:  new connection from ('127.0.0.1', 12985)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
Test server failure:
Traceback (most recent call last):
   File 
"/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py",
 line 1938, in run
msg = self.read()
   File 
"/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py",
 line 1915, in read
return self.sslconn.read()
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 874, in read
return self._sslobj.read(len, buffer)
   File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 633, in read
v = self._sslobj.read(len)
 ConnectionResetError: [Errno 54] Connection reset by peer
==
ERROR: test_connect_cadata (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/test/test_ssl.py",
 line 1614, in test_connect_cadata
s.connect(self.server_addr)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 1109, in connect
self._real_connect(addr, False)
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 1100, in _real_connect
self.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 1077, in do_handshake
self._sslobj.do_handshake()
  File "/usr/home/buildbot/python/3.6.koobs-freebsd-current/build/Lib/ssl.py", 
line 689, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer
Stdout:
 server:  new connection from ('127.0.0.1', 12988)
 server: connection cipher is now ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
 server: selected protocol is now None
Test server failure:
Traceback (most recent call last):
   File

[issue35135] pip install --download option does not exist

2018-11-01 Thread Pedro


New submission from Pedro :

https://pip.pypa.io/en/stable/user_guide/#installing-from-local-packages states 
that you can use a --directory option with the install subcommand. This fails 
with pip 18.1 on both Python 2.7 on SLES12 and Python 3.6 on Windows 10:

==

pip install --download my_dir -r reqs.txt

Usage:
  pip install [options]  [package-index-options] ...
  pip install [options] -r  [package-index-options] ...
  pip install [options] [-e]  ...
  pip install [options] [-e]  ...
  pip install [options]  ...

no such option: --download

--
assignee: docs@python
components: Documentation
messages: 329069
nosy: docs@python, pgacv2
priority: normal
severity: normal
status: open
title: pip install --download option does not exist
type: behavior
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



[issue35075] Doc: pprint example uses dead URL

2018-11-01 Thread miss-islington


miss-islington  added the comment:


New changeset 7344b9fa0ef7bd8b902e7aa9a8f74b5dce915e59 by Miss Islington (bot) 
in branch '3.6':
bpo-35075: Fix broken url in the pprint documentation (GH-10201)
https://github.com/python/cpython/commit/7344b9fa0ef7bd8b902e7aa9a8f74b5dce915e59


--

___
Python tracker 

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



[issue35084] binascii.Error: Incorrect padding

2018-11-01 Thread TestUser


TestUser  added the comment:

Last thought ...

man base64 has different options than the program:

python3 -m base64 -d -i test.code2
option -i not recognized
usage: /usr/lib/python3.6/base64.py [-d|-e|-u|-t] [file|-]
-d, -u: decode
-e: encode (default)
-t: encode and decode string 'Aladdin:open sesame'

On Thu, Nov 1, 2018 at 9:31 AM Fred Unll 
wrote:

> My guess is the Gnome terminal. It does not like non ASCI data. There are
> other programs that generate segfaults in the terminal when piped random
> binary data.
>
> Maybe, Python could get a -Q quit setting to turn of the trace back?
>
> Thanks
>
>
> On Thu, Nov 1, 2018 at 9:18 AM TestUser  wrote:
>
>>
>> TestUser  added the comment:
>>
>> That is all the crash automator provides.
>>
>> On Thu, Nov 1, 2018 at 9:13 AM Serhiy Storchaka 
>> wrote:
>>
>> >
>> > Change by Serhiy Storchaka :
>> >
>> >
>> > --
>> > Removed message: https://bugs.python.org/msg329061
>> >
>> > ___
>> > Python tracker 
>> > 
>> > ___
>> >
>>
>> --
>>
>> ___
>> Python tracker 
>> 
>> ___
>>
>

--

___
Python tracker 

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



[issue35084] binascii.Error: Incorrect padding

2018-11-01 Thread TestUser


TestUser  added the comment:

My guess is the Gnome terminal. It does not like non ASCI data. There are
other programs that generate segfaults in the terminal when piped random
binary data.

Maybe, Python could get a -Q quit setting to turn of the trace back?

Thanks

On Thu, Nov 1, 2018 at 9:18 AM TestUser  wrote:

>
> TestUser  added the comment:
>
> That is all the crash automator provides.
>
> On Thu, Nov 1, 2018 at 9:13 AM Serhiy Storchaka 
> wrote:
>
> >
> > Change by Serhiy Storchaka :
> >
> >
> > --
> > Removed message: https://bugs.python.org/msg329061
> >
> > ___
> > Python tracker 
> > 
> > ___
> >
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue35084] binascii.Error: Incorrect padding

2018-11-01 Thread TestUser


TestUser  added the comment:

That is all the crash automator provides.

On Thu, Nov 1, 2018 at 9:13 AM Serhiy Storchaka 
wrote:

>
> Change by Serhiy Storchaka :
>
>
> --
> Removed message: https://bugs.python.org/msg329061
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue35084] binascii.Error: Incorrect padding

2018-11-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

@Tester Thanks for the report. I looked at the crash report and I couldn't see 
CPython crashing with a segfault. I think it's a crash from another application 
which might be running the interpreter and can't handle the error raised by 
CPython for invalid data being decoded. This is something the application which 
crashes has to handle when CPython returns the expected trace back and I don't 
see any fix from CPython's end. Correct me if I am wrong here.

Relevant CPython trace back : 

PythonArgs: ['/usr/lib/python3.6/base64.py', '-d', 'test.code2']
Traceback:
 Traceback (most recent call last):
   File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
 "__main__", mod_spec)
   File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
 exec(code, run_globals)
   File "/usr/lib/python3.6/base64.py", line 602, in 
 main()
   File "/usr/lib/python3.6/base64.py", line 586, in main
 func(f, sys.stdout.buffer)
   File "/usr/lib/python3.6/base64.py", line 512, in decode
 s = binascii.a2b_base64(line)
 binascii.Error: Incorrect padding


Please remove the quoted content while replying from email since it's added to 
the bug tracker and causes scrolling a little difficult with duplicated content.


Thanks

--

___
Python tracker 

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



[issue35084] binascii.Error: Incorrect padding

2018-11-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue35084] binascii.Error: Incorrect padding

2018-11-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Don't include quoted full messages of other users. Only include quoted 
fragments if it is absolutely necessary.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-11-01 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-35134: Move !Py_LIMITED_API to Include/pycapi/.

--

___
Python tracker 

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



[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-01 Thread STINNER Victor


Change by STINNER Victor :


--
title: Move Py_LIMITED_API to Include/pycapi/ -> Move !Py_LIMITED_API to 
Include/pycapi/

___
Python tracker 

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



[issue35134] Move Py_LIMITED_API to Include/pycapi/

2018-11-01 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +9596
stage:  -> patch review

___
Python tracker 

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



[issue35084] binascii.Error: Incorrect padding

2018-11-01 Thread TestUser

TestUser  added the comment:

On Mon, Oct 29, 2018 at 4:03 PM TestUser  wrote:

>
> TestUser  added the comment:
>
> In the new version of Ubuntu this generates a system crash report. Normally
> I delete them.
>
> Give me a day or to to get you one.
>
> Funny, since it is the crash reports use of base64 encoding that led me to
> the Python base64 module.
>
> On Sun, Oct 28, 2018 at 8:42 PM Karthikeyan Singaravelan <
> rep...@bugs.python.org> wrote:
>
> >
> > Karthikeyan Singaravelan  added the comment:
> >
> > Can you please add your definition of a crash? Crash in bug report
> context
> > is used in C language context like causing a segfault, buffer overflow
> etc.
> > Proper Exceptions are not considered as a crash and this is an exception
> > raised since the contents are invalid. If it crashes as I mentioned above
> > can you please add the crash log?
> >
> > --
> >
> > ___
> > Python tracker 
> > 
> > ___
> >
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: 
https://bugs.python.org/file47900/_usr_lib_python3.6_base64.py.1000.zip

___
Python tracker 

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



[issue35134] Move Py_LIMITED_API to Include/pycapi/

2018-11-01 Thread STINNER Victor


New submission from STINNER Victor :

The PEP 384 "Defining a Stable ABI" introduced Py_LIMITED_API define to exclude 
functions from the Python C API. The problem is when a new API is introduced, 
it has to explicitly be excluded using "#ifndef Py_LIMITED_API". If the author 
forgets it, the function is added to be stable API by mistake.

I propose to move the API which should be excluded from the stable ABI to a new 
subdirectory: Include/pycapi/.

To not break the backward compatibility, I propose to automatically include new 
header files from existing header files. For example, 
Include/pycapi/pyapi_objimpl.h would be automatically included by 
Include/pycapi/pycapi_objimpl.h.

New header files would have a "pycapi_" prefix to avoid conflict Include/ 
header files, if Include/pycapi/ directory is in the header search paths.

This change is a follow-up of bpo-35081 which moved Py_BUILD_CORE code to 
Include/internal/.

It is also part of a larger project to cleanup the C API, see:

* https://pythoncapi.readthedocs.io/split_include.html
* https://pythoncapi.readthedocs.io/

The change is backward compatible: #include  will still provide 
exactly the same API.

--
components: Interpreter Core
messages: 329060
nosy: vstinner
priority: normal
severity: normal
status: open
title: Move Py_LIMITED_API to Include/pycapi/
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



[issue35133] Bugs in concatenating string literals on different lines

2018-11-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +9595
stage:  -> patch review

___
Python tracker 

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



[issue35133] Bugs in concatenating string literals on different lines

2018-11-01 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

The following PR fixes many bugs related to concatenating string literals on 
different lines. There are two kinds of errors:

1. Missed space. The first line is ended with a word, and the second line is 
started with a word. When they are concatenated, there is no space between 
words. This is the same issue as issue35128, but not only in warning messages, 
and not only in Python.

2. Missed comma in a list of string literals. This leads to concatenating the 
last string in the first line and the first list in the second line.

--
components: Library (Lib)
messages: 329059
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Bugs in concatenating string literals on different lines
type: behavior
versions: Python 3.6, 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



[issue35075] Doc: pprint example uses dead URL

2018-11-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9594

___
Python tracker 

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



[issue35075] Doc: pprint example uses dead URL

2018-11-01 Thread miss-islington


miss-islington  added the comment:


New changeset bf46a09dec372b85846216bd692d648dac08ac36 by Miss Islington (bot) 
(Pablo Galindo) in branch 'master':
bpo-35075: Fix broken url in the pprint documentation (GH-10201)
https://github.com/python/cpython/commit/bf46a09dec372b85846216bd692d648dac08ac36


--
nosy: +miss-islington

___
Python tracker 

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



[issue35075] Doc: pprint example uses dead URL

2018-11-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9593

___
Python tracker 

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



[issue35128] warning.warn messages with spacing issues

2018-11-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Seems 2.7 is not affected.

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



[issue35128] warning.warn messages with spacing issues

2018-11-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 89138f286938753f273c90547491efe374e617c1 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-35128: Fix spacing issues in warning.warn() messages. (GH-10268). 
(GH-10281)
https://github.com/python/cpython/commit/89138f286938753f273c90547491efe374e617c1


--

___
Python tracker 

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



[issue35128] warning.warn messages with spacing issues

2018-11-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 5e0537cf7e5b0a5ef134c7da0b68b8e55c69f4b0 by Serhiy Storchaka in 
branch '3.7':
[3.7] bpo-35128: Fix spacing issues in warning.warn() messages. (GH-10268). 
(GH-10280)
https://github.com/python/cpython/commit/5e0537cf7e5b0a5ef134c7da0b68b8e55c69f4b0


--

___
Python tracker 

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



[issue35128] warning.warn messages with spacing issues

2018-11-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9592

___
Python tracker 

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



[issue35128] warning.warn messages with spacing issues

2018-11-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +9591

___
Python tracker 

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



[issue35122] Process not exiting on unhandled exception when using multiprocessing module

2018-11-01 Thread akhi singhania


akhi singhania  added the comment:

Thank you very much for the reply and the link.  It seems like I escaped that 
bit in the documentation, my apologises.  I can confirm that using 
cancel_join_thread() removes the need for explicitly calling queue.close().

May I please ask for some more clarification if you do not mind.  My 
understanding now is that, there are two scenarios to consider when a process 
using queues tries to exit:

- The default behaviour seems to be that the process must flush the queue 
before it exits.  This is useful as it will ensure that none of the queued data 
is lost which can be very useful in some circumstances.

- The alternate behaviour (which can be enabled by setting 
cancel_join_thread()) is that you don't care about losing the data in the queue 
and just want to exit.  Again this can be useful in some circumstances if you 
don't care if the data is lost and emptying out the queue might potentially 
take a long time.


Does the above sound about right?  Thank you very much for your explanation and 
sorry again for the noise.

--

___
Python tracker 

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



[issue33578] cjkcodecs missing getstate and setstate implementations

2018-11-01 Thread miss-islington


miss-islington  added the comment:


New changeset ac22f6aa989f18c33c12615af1c66c73cf75d5e7 by Miss Islington (bot) 
(Christopher Thorne) in branch 'master':
bpo-33578: Add getstate/setstate for CJK codec (GH-6984)
https://github.com/python/cpython/commit/ac22f6aa989f18c33c12615af1c66c73cf75d5e7


--
nosy: +miss-islington

___
Python tracker 

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



[issue35132] python-gdb error: Python Exception Type does not have a target

2018-11-01 Thread Dylan Cali


New submission from Dylan Cali :

Python version: 3.6.6-debug
System: Kernel: 4.15.0-38-generic x86_64
Distro: Linux Mint 18.2 Sonya
CPU:Quad core Intel Xeon E3-1505M
Memory: 32018.6MB


Expected:

py-list and py-bt to print the current python frame and traceback when 
attaching to a hung python process with gdb, a debug build of python, and 
cpython/Tools/gdb/libpython.py loaded.


Actual:

py-list and py-bt fail with:

Python Exception  Type does not have a target.:
Error occurred in Python command: Type does not have a target.

Invoking 'set python print-stack full' in gdb produces the more useful:

Traceback (most recent call last):
  File "", line 1, in 
  File "~/git/cpython/Tools/gdb/libpython.py", line 916, in filename
  File "~/git/cpython/Tools/gdb/libpython.py", line 1158, in proxyval
RuntimeError: Type does not have a target.

so it is failing at:

fields = gdb.lookup_type('PyUnicodeObject').target().fields()

in libpython.py [1].


Reproduce:

I haven't been able to create a simple standalone program that triggers the 
failure.  I am working on a PR for Keras to try and fix the multiprocessing 
support in some of their utility classes.  Currently the tests are sporadically 
hanging and my intention was to use python's gdb integration to identify 
exactly where and why the hangs are occuring... but I can't get that 
information at the moment because of the error above when invoking py-list and 
py-bt.

So, unfortunately, the shortest path to reproduce is to checkout the PR branch, 
run the offending tests, connect with gdb, and invoke py-list/py-bt:

* install a debug version of 3.6.6 if one isn't already available
* git clone https://github.com/calid/keras.git -b fix-multiprocessing-hang
* cd keras
* pip install -e .[tests]
* pip install tensorflow
* py.test tests/keras/utils/data_utils_test.py
* wait for hang
* gdb -p 
* invoke py-list or py-bt


I am happy to poke around in libpython.py and try to fix/submit a PR myself, 
but I'm not at all familiar with the python internals so I would need some 
guidance.  And obviously let me know if this isn't actually a bug but rather 
environment related/user error.

Thank you!


[1] https://github.com/python/cpython/blob/v3.6.6/Tools/gdb/libpython.py#L1158

--
components: Demos and Tools
messages: 329052
nosy: Dylan Cali
priority: normal
severity: normal
status: open
title: python-gdb error: Python Exception  Type does not 
have a target
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



[issue35128] warning.warn messages with spacing issues

2018-11-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 4b5e62dbb22a3593e0db266c12f805b727a42b00 by Serhiy Storchaka 
(Pablo Aguiar) in branch 'master':
bpo-35128: Fix spacing issues in warning.warn() messages. (GH-10268)
https://github.com/python/cpython/commit/4b5e62dbb22a3593e0db266c12f805b727a42b00


--

___
Python tracker 

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



[issue35131] Cannot access to customized paths within .pth file

2018-11-01 Thread Valentin Zhao


New submission from Valentin Zhao :

I want to manage all the packages that I installed so every time adding package 
I set "--target" so the package will be downloaded there. Then I wrote the 
directory in a .pth file which is located in "/Python36/Lib/site-packages" so I 
could still get accessed to all the packages even though they are not located 
within "Python36" folder.

However, my current user name of Windows is a Chinese name, which means the 
customized path I mentioned before has Chinese characters within it, thus the 
.pth file will be also encoded with 'gbk'. Every time I would like to import 
these packages will get "UnicodeDecodeError: 'gbk' can't decode byte xxx...".

Fortunately I have found the reason and cracked the problem: python read .pth 
files without setting any encoding. The code is located in 
"Python36/Lib/site.py"

def addpackage(sitedir, name, known_paths):
if known_paths is None:
known_paths = _init_pathinfo()
reset = True
else:
reset = False
fullname = os.path.join(sitedir, name)
try:
# here should set the second param as encoding='utf-8'
f = open(fullname, "r")
except OSError:
return
# other codes

And after I doing this, everything goes well.

--
components: Library (Lib)
files: IMG_20181101_173328_[b...@ae031df.jpg
messages: 329050
nosy: Valentin Zhao
priority: normal
severity: normal
status: open
title: Cannot access to customized paths within .pth file
type: behavior
versions: Python 3.6
Added file: 
https://bugs.python.org/file47899/IMG_20181101_173328_[b...@ae031df.jpg

___
Python tracker 

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



[issue35128] warning.warn messages with spacing issues

2018-11-01 Thread Pablo Santiago Blum de Aguiar


Pablo Santiago Blum de Aguiar  added the comment:

You have a point. They make the message more readable. I've readded the double 
spaces.

--

___
Python tracker 

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



[issue35114] ssl.RAND_status docs describe it as returning True/False; actually returns 1/0

2018-11-01 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue35126] Mistake in FAQ about converting number to string.

2018-11-01 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue35117] set.discard should return True or False based on if element existed.

2018-11-01 Thread tzickel


tzickel  added the comment:

I would think that the .discard is the equivalent of .pop in dict. (instead of 
wasting time once checking and once removing, also the data in a set is the 
data, there is no value to check). 

Even the standard lib has lots of usage of dict.pop(key, None) to not throw an 
exception. (instead of not using None, and catching exception).

What sets this apart from other mutating APIs is that it does not throw an 
exception.

--

___
Python tracker 

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