[issue35051] Fix pep8 on Lib/turtledemo module

2018-10-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> So, do you recommend me close the pr?

Yes, please.

--
nosy: +rhettinger

___
Python tracker 

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



[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-23 Thread INADA Naoki


INADA Naoki  added the comment:

Is performance overhead negligible?

--
nosy: +inada.naoki

___
Python tracker 

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



[issue35043] functools.reduce doesn't work properly with itertools.chain

2018-10-23 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Blech. Copy'n'paste error in last post:

a = list(itertools.chain.from_iterable(*my_list))

should be:

a = list(itertools.chain.from_iterable(my_list))

(Note removal of *, which is the whole point of from_iterable)

--

___
Python tracker 

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



[issue34260] shutil.copy2 is not the same as cp -p

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 861f61b5a93d178e913ad3c760d529ee3155e66d by Victor Stinner (Zsolt 
Cserna) in branch '3.7':
[3.7] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) 
(GH-10065)
https://github.com/python/cpython/commit/861f61b5a93d178e913ad3c760d529ee3155e66d


--

___
Python tracker 

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



[issue34260] shutil.copy2 is not the same as cp -p

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 797cfbd69e3484ecf25f5acf75b06691e3fc97fa by Victor Stinner (Zsolt 
Cserna) in branch '3.6':
[3.6] bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523) 
(GH-10068)
https://github.com/python/cpython/commit/797cfbd69e3484ecf25f5acf75b06691e3fc97fa


--

___
Python tracker 

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



[issue34260] shutil.copy2 is not the same as cp -p

2018-10-23 Thread Zsolt Cserna


Change by Zsolt Cserna :


--
pull_requests: +9405

___
Python tracker 

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



[issue34794] Memory leak in Tkinter

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f7cefb427cbc50d89a4f19f7f334a4f5421cefd3 by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-34794: Fix a leak in Tkinter. (GH-10025) (GH-10069)
https://github.com/python/cpython/commit/f7cefb427cbc50d89a4f19f7f334a4f5421cefd3


--
nosy: +vstinner

___
Python tracker 

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



[issue35056] Test leaks of memory not managed by Python allocator

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:

You can try to use Valgrind for that?

--

___
Python tracker 

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



[issue35055] Error when we try to download the epub archive

2018-10-23 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@ned maybe we could close this issue

--

___
Python tracker 

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



[issue24209] Allow IPv6 bind in http.server

2018-10-23 Thread Mayank Asthana


Change by Mayank Asthana :


--
nosy: +masthana

___
Python tracker 

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



[issue35047] Better error messages in unittest.mock

2018-10-23 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

It seems to be a good idea.

If you attach a sample, it would be great.

--
nosy: +eamanu

___
Python tracker 

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



[issue35051] Fix pep8 on Lib/turtledemo module

2018-10-23 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

So, do you recommend me close the pr?

--

___
Python tracker 

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



[issue34794] Memory leak in Tkinter

2018-10-23 Thread miss-islington


miss-islington  added the comment:


New changeset 2c549250d8fd6755e3338a771d250e34c78bdb50 by Miss Islington (bot) 
in branch '3.6':
bpo-34794: Fix a leak in Tkinter. (GH-10025)
https://github.com/python/cpython/commit/2c549250d8fd6755e3338a771d250e34c78bdb50


--
nosy: +miss-islington

___
Python tracker 

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



[issue35037] PYLONG_BITS_IN_DIGIT differs between MinGW and MSVC

2018-10-23 Thread Stefan Behnel


Stefan Behnel  added the comment:

The relevant macro seems to be "__MINGW64__". I have neither a Windows 
environment nor MinGW-64 for testing, but the logic should be the same as for 
the "_WIN64" macro, i.e.

#if defined(_WIN64) || defined(__MINGW64__)
#define MS_WIN64
#endif

And then there's probably also something to do to record the compiler version 
in the long CPython version string, etc. I also can't say if MinGW-64 sets the 
"MS_WIN32" macro. Having "MS_WIN64" without "MS_WIN32" might be unexpected for 
some code.

--

___
Python tracker 

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



[issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString()

2018-10-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString()

2018-10-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset c46db9232f1a6e0e3c33053549d03d4335db9dca by Serhiy Storchaka in 
branch 'master':
bpo-30863: Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString(). 
(GH-2599)
https://github.com/python/cpython/commit/c46db9232f1a6e0e3c33053549d03d4335db9dca


--

___
Python tracker 

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



[issue35055] Error when we try to download the epub archive

2018-10-23 Thread Julien Palard


Julien Palard  added the comment:

Bumped python-docs-theme it in production, it should help, next build in 4 
hours.

--

___
Python tracker 

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



[issue34260] shutil.copy2 is not the same as cp -p

2018-10-23 Thread Zsolt Cserna


Change by Zsolt Cserna :


--
pull_requests: +9404

___
Python tracker 

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



[issue34794] Memory leak in Tkinter

2018-10-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9402

___
Python tracker 

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



[issue34794] Memory leak in Tkinter

2018-10-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9403

___
Python tracker 

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



[issue34794] Memory leak in Tkinter

2018-10-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset df13df41a25765d8a39a77220691698498e758d4 by Serhiy Storchaka in 
branch 'master':
bpo-34794: Fix a leak in Tkinter. (GH-10025)
https://github.com/python/cpython/commit/df13df41a25765d8a39a77220691698498e758d4


--

___
Python tracker 

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



[issue29341] Missing accepting path-like object in docstrings of os module functions

2018-10-23 Thread Luna Chen


Luna Chen  added the comment:

Farhaan Bukhsh: you said you wanted to work on this but that was over a month 
ago, so I presume you've directed your attention elsewhere, and I'd like to 
give this a try.

--
nosy: +BNMetrics -thatiparthy

___
Python tracker 

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



[issue35056] Test leaks of memory not managed by Python allocator

2018-10-23 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Would be nice to add a possibility to test memory leaks if memory is allocated 
not by Python allocators, but inside external libraries. This would allow to 
catch leaks on the bridge between Python and external libraries. See for 
example issue34794.

--
components: Tests
messages: 328336
nosy: serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Test leaks of memory not managed by Python allocator
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



[issue34260] shutil.copy2 is not the same as cp -p

2018-10-23 Thread Zsolt Cserna


Change by Zsolt Cserna :


--
pull_requests: +9401

___
Python tracker 

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



[issue35055] Error when we try to download the epub archive

2018-10-23 Thread Julien Palard


Julien Palard  added the comment:

Looks like the python-docs-theme we're using in production may not be 
up-to-date, I'm bumping it on docsbuild-scripts.

--

___
Python tracker 

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



[issue35055] Error when we try to download the epub archive

2018-10-23 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report. This problem is being tracked here: 
https://github.com/python/pythondotorg/issues/1350

--

___
Python tracker 

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



[issue35047] Better error messages in unittest.mock

2018-10-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
title: Better error messages un unittest.mock -> Better error messages in 
unittest.mock

___
Python tracker 

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



[issue35055] Error when we try to download the epub archive

2018-10-23 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

same issue with 3.6

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



[issue35055] Error when we try to download the epub archive

2018-10-23 Thread Stéphane Wirtel

New submission from Stéphane Wirtel :

On this page https://docs.python.org/3/download.html, there is a link for the 
epub archive but we can not download it because there is 404 Not Found.

https://docs.python.org/3/archives/python-3.7.1-docs.epub

--
messages: 328332
nosy: matrixise, mdk, ned.deily
priority: normal
severity: normal
status: open
title: Error when we try to download the epub archive
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



[issue35051] Fix pep8 on Lib/turtledemo module

2018-10-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

We don't usually do formatting changes like this. We try to make a new code 
conforming PEP 8, but do not rewrite old code.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Agree, this looks like a bug.

Do you mind to create a PR Charalampos?

--
components: +XML
keywords: +easy
nosy: +serhiy.storchaka
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue33015] Fix function cast warning in thread_pthread.h

2018-10-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-23 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-23 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

The proposed PR adds index entries for all operators, syntax elements and 
keywords. It also adds index entries for symbols in related minilanguages:

* escape sequences in string literals
* metacharacters and escape sequences in regular expressions
* symbols in printf-style formatting, string formatting, f-strings and template 
strings
* special symbols for OS (pathnames and interpolation)
* special symbols in doctests
* and others

Also fixed several errors in formatting.

--
assignee: docs@python
components: Documentation
messages: 328329
nosy: docs@python, eric.araujo, ezio.melotti, georg.brandl, serhiy.storchaka, 
willingc
priority: normal
severity: normal
status: open
title: Add more index entries for symbols
type: enhancement
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



[issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False

2018-10-23 Thread Steve Dower


Steve Dower  added the comment:

Agreed, it no longer matches os.normpath()'s declared behavior by not trimming 
the end separator.

It's obviously too late for the current release (I'd hope Django is one of the 
projects running tests against RC's, but I guess not :( ), but I think we can 
fix it for the next updates on all versions.

Patches welcome.

--
assignee: steve.dower -> 
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:

00170-gc-assertions.patch is used in the Fedora package of Python.

I converted the patch to a pull request: PR 10062.

My PR only uses the new assertion macro once. I plan to write more changes to 
use the new assertion macros in more places, once the first PR is merged.

--

___
Python tracker 

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



[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-23 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue35053] Enhance tracemalloc to trace properly free lists

2018-10-23 Thread STINNER Victor


New submission from STINNER Victor :

CPython uses many "free lists": list of "deallocated" objects which are kept 
alive to optimize allocation of new objects. For example, the builtin list type 
has a free list.

Problem: tracemalloc only traces the memory allocation when the object is 
created, but it doesn't update the traceback when the "free object" is reused 
to create "a new object".

Attached PR modifies _Py_NewReference() to update the Python traceback in the 
tracemalloc trace.

--
components: Library (Lib)
messages: 328326
nosy: vstinner
priority: normal
severity: normal
status: open
title: Enhance tracemalloc to trace properly free lists
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



[issue33015] Fix function cast warning in thread_pthread.h

2018-10-23 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

Such casts will also trigger a CFI violation if somebody tries to build Python 
(and the libc, in this case) with a signature-based CFI [1, 2]. It checks that 
the compile-time callee signature matches the signature of the actually called 
function in runtime. 

[1] https://clang.llvm.org/docs/ControlFlowIntegrity.html
[2] 
https://android-developers.googleblog.com/2018/10/control-flow-integrity-in-android-kernel.html

--
nosy: +izbyshev

___
Python tracker 

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



[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-23 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Please revert in 2.7.

--

___
Python tracker 

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



[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9398

___
Python tracker 

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



[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 82af0b63b07aa8d92b50098e382b458143cfc677 by Victor Stinner in 
branch 'master':
bpo-9263: _PyObject_Dump() detects freed memory (GH-10061)
https://github.com/python/cpython/commit/82af0b63b07aa8d92b50098e382b458143cfc677


--
nosy: +vstinner

___
Python tracker 

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



[issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False

2018-10-23 Thread Tim Graham


Tim Graham  added the comment:

I think this caused a behavior change:

Before (Python 3.6.6):
>>> from os.path import abspath
>>> abspath('/abc/')
'C:\\abc'

After (Python 3.6.7):
>>> abspath('/abc/')
'C:\\abc\\'

This causes a test failure in Django's safe_join() function: 
https://github.com/django/django/blob/10d82c85aa5f8bd6adff0db49798dd368455cdcf/django/utils/_os.py#L24-L47

https://github.com/django/django/blob/10d82c85aa5f8bd6adff0db49798dd368455cdcf/tests/utils_tests/test_os_utils.py#L10

Traceback (most recent call last):
  File 
"C:\Jenkins\workspace\django-windows\database\sqlite3\label\windows\python\Python36\tests\utils_tests\test_os_utils.py",
 line 10, in test_base_path_ends_with_sep
drive, path = os.path.splitdrive(safe_join("/abc/", "abc"))
  File 
"C:\Jenkins\workspace\django-windows\database\sqlite3\label\windows\python\Python36\django\utils\_os.py",
 line 46, in safe_join
'component ({})'.format(final_path, base_path))
django.core.exceptions.SuspiciousFileOperation: The joined path (C:\abc\abc) is 
located outside of the base path component (C:\abc\)

--
nosy: +Tim.Graham

___
Python tracker 

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



[issue35052] Coverity scan: copy/paste error in Lib/xml/dom/minidom.py

2018-10-23 Thread Charalampos Stratakis


New submission from Charalampos Stratakis :

Analyzing some coverity scan results I stumbled upon this issue:

Python-3.6.5/Lib/xml/dom/minidom.py:1914: original: 
"n._call_user_data_handler(operation, n, notation)" looks like the original 
copy.
Python-3.6.5/Lib/xml/dom/minidom.py:1924: copy_paste_error: "n" in 
"e._call_user_data_handler(operation, n, entity)" looks like a copy-paste error.
Python-3.6.5/Lib/xml/dom/minidom.py:1924: remediation: Should it say "e" 
instead?
# 1922|   clone.entities._seq.append(entity)
# 1923|   if hasattr(e, '_call_user_data_handler'):
# 1924|-> e._call_user_data_handler(operation, n, entity)
# 1925|   else:
# 1926|   # Note the cloning of Document and DocumentType nodes is

It seems that the warning is indeed a bug, and the code in question was 
basically merged into python from pyxml 16 years ago.

--
components: Library (Lib)
messages: 328321
nosy: cstratak
priority: normal
severity: normal
status: open
title: Coverity scan: copy/paste error in Lib/xml/dom/minidom.py
versions: Python 2.7, 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



[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9397

___
Python tracker 

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



[issue34980] KillPython target doesn't detect 64-bit processes

2018-10-23 Thread Jeremy Kloth


Jeremy Kloth  added the comment:

The changed succeeded in killing the actively stuck process, so I say its all 
good!  Thanks for the merge.

--
resolution:  -> fixed
stage: commit 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



[issue34947] inspect.getclosurevars() does not get all globals

2018-10-23 Thread Jan Hermann

Jan Hermann  added the comment:

Ok, that’s fair. But then the inspect module currently doesn’t provide tools to 
the user to construct the recursive identification without duplicating code 
already in stdlib. For that, one would need to refactor getclosurevars() to two 
parts: getcode() and getclosurevars_from_code(). Then one could do:

clvars = ClosureVars({}, {}, {}, set())
codes = [getcode(func)]
while codes:
   code = codes.pop()
   for const in code.co_consts:
   if iscode(const):
   codes.append(const)
   lclvars = getclosurevars_from_code(code)
   for v, lv in zip(clvars, lclvars):
   v.update(lv)

--

___
Python tracker 

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



[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-23 Thread Ned Deily


Ned Deily  added the comment:

I don't have a strong opinion about 2.7 here.  Ultimately, it's Benjamin's 
call.  But it might make sense to revert for 2.7 since it hasn't been released 
yet.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue35051] Fix pep8 on Lib/turtledemo module

2018-10-23 Thread Emmanuel Arias


Change by Emmanuel Arias :


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

___
Python tracker 

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



[issue11024] imaplib: Time2Internaldate() returns localized strings

2018-10-23 Thread Florian Kisser


Florian Kisser  added the comment:

imaplib_Time2Internaldate_locale_fix.patch was never applied to Python 2.7. 
Regarding the comments I found no reason why, so this is still an issue, I 
guess.

--
nosy: +Florian Kisser

___
Python tracker 

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



[issue35051] Fix pep8 on Lib/turtledemo module

2018-10-23 Thread Emmanuel Arias


New submission from Emmanuel Arias :

This issue is related to #35039
Fix pep8.

See comments on https://github.com/python/cpython/pull/10044

--
components: Library (Lib)
messages: 328316
nosy: eamanu, thatiparthy
priority: normal
severity: normal
status: open
title: Fix pep8 on  Lib/turtledemo module
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



[issue35050] Off-by-one bug in AF_ALG

2018-10-23 Thread Christian Heimes


Christian Heimes  added the comment:

> The Python code does not create buffer overflow, it's just that the Linux 
> kernel will always reject names which are too long.

The Kernel doesn't have a direct length restriction. It just ensures that type 
and name are NULL terminated. Other code inside the Kernel rejects unknown type 
and name values.

--

___
Python tracker 

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



[issue34980] KillPython target doesn't detect 64-bit processes

2018-10-23 Thread Steve Dower


Steve Dower  added the comment:

Jeremy - feel free to close this when you're happy with the buildbot results.

--
stage: patch review -> commit review

___
Python tracker 

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



[issue35050] Off-by-one bug in AF_ALG

2018-10-23 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue33015] Fix function cast warning in thread_pthread.h

2018-10-23 Thread Steve Dower


Steve Dower  added the comment:

Unfortunately, this isn't really a safe cast, as we're going from void to 
non-void return value.

On x86 with current calling conventions, this is okay, since the return value 
is in a register that does not change or require cleanup by the caller. 
However, I wouldn't want to assume that all future calling conventions on other 
architectures would also permit this - returning a pointer value on the stack 
or in some way that requires cleanup is entirely possible, and is the sort of 
problem that would likely only be detectable by this warning or very careful 
memory measurements (or possibly a very confusing crash due to invalid stack 
modifications). 

It's also possible that returning an invalid pointer could cause a compiler to 
one day invoke its undefined behavior clause. Even though *we* don't use the 
return value, it still gets returned somewhere.

I'm not thrilled about the memory allocation here either, but there isn't 
really much of an option in my opinion.

--

___
Python tracker 

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



[issue35050] Off-by-one bug in AF_ALG

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:

Christian and me created a bug report at the same time :-) My message:

I found two interesting warnings on socketmodule.c in the Coverity report:

Error: BUFFER_SIZE_WARNING (CWE-120): [#def12]
Python-3.6.5/Modules/socketmodule.c:2069: buffer_size_warning: Calling strncpy 
with a maximum size argument of 14 bytes on destination array "sa->salg_type" 
of size 14 bytes might leave the destination string unterminated.
# 2067|   return 0;
# 2068|   }
# 2069|-> strncpy((char *)sa->salg_type, type, sizeof(sa->salg_type));
# 2070|   if (strlen(name) > sizeof(sa->salg_name)) {
# 2071|   PyErr_SetString(PyExc_ValueError, "AF_ALG name too 
long.");

Error: BUFFER_SIZE_WARNING (CWE-120): [#def13]
Python-3.6.5/Modules/socketmodule.c:2074: buffer_size_warning: Calling strncpy 
with a maximum size argument of 64 bytes on destination array "sa->salg_name" 
of size 64 bytes might leave the destination string unterminated.
# 2072|   return 0;
# 2073|   }
# 2074|-> strncpy((char *)sa->salg_name, name, sizeof(sa->salg_name));
# 2075|   
# 2076|   *len_ret = sizeof(*sa);


It seems like the Linux kernel always write a terminating NUL byte for AF_ALG:
https://elixir.bootlin.com/linux/latest/source/crypto/af_alg.c#L171

The Python code does not create buffer overflow, it's just that the Linux 
kernel will always reject names which are too long. Python should reject them 
as well.

--
nosy: +vstinner

___
Python tracker 

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



[issue35050] Off-by-one bug in AF_ALG

2018-10-23 Thread Christian Heimes


New submission from Christian Heimes :

The error checking code for salg_name and salg_type have an off-by-one bug. It 
should check that both strings are NUL terminated strings. It's not a security 
bug, because the Linux kernel ensures that the last byte is a NULL byte.

--
components: Extension Modules
messages: 328311
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Off-by-one bug in AF_ALG
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



[issue33015] Fix function cast warning in thread_pthread.h

2018-10-23 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Right, so one PR is a real fix, the other PR is a workaround (avoids the 
warning without fixing the underlying problem).

The underlying problem is: if a platform has incompatible ABIs for the two 
function types, casting one function type to another may produce bugs (memory 
corruptions, crashes, etc).  We can however decide to consider those platforms 
unlikely, as the current code has been working for years or decades.

It would be nice to have an opinion from C specialists.

--
nosy: +gregory.p.smith, skrah

___
Python tracker 

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



[issue35030] Python 2.7 OrderedDict creates circular references

2018-10-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I see, so basically this would be a problem only if the root 
> object had a __del__ method and then the GC wouldn't reclaim it ?

Yes.  That's exactly it.

--

___
Python tracker 

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



[issue35047] Better error messages un unittest.mock

2018-10-23 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



[issue33015] Fix function cast warning in thread_pthread.h

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote a different fix for the compiler warning using a temporary cast to 
"void*": PR 10057.

--

___
Python tracker 

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



[issue33015] Fix function cast warning in thread_pthread.h

2018-10-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9394

___
Python tracker 

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



[issue34980] KillPython target doesn't detect 64-bit processes

2018-10-23 Thread miss-islington


miss-islington  added the comment:


New changeset 69d0372fc9c5a600ecdfb7dd80f852b26c6ed087 by Miss Islington (bot) 
in branch '3.6':
bpo-34980: P/Invoke QueryFullProcessImageName to get process names (GH-9901)
https://github.com/python/cpython/commit/69d0372fc9c5a600ecdfb7dd80f852b26c6ed087


--

___
Python tracker 

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



[issue35048] Can't reassign __class__ despite the assigned class having identical slots

2018-10-23 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



[issue34980] KillPython target doesn't detect 64-bit processes

2018-10-23 Thread miss-islington


miss-islington  added the comment:


New changeset 7a253dcd97fa669b8615476b287ef4dd0a935014 by Miss Islington (bot) 
in branch '3.7':
bpo-34980: P/Invoke QueryFullProcessImageName to get process names (GH-9901)
https://github.com/python/cpython/commit/7a253dcd97fa669b8615476b287ef4dd0a935014


--
nosy: +miss-islington

___
Python tracker 

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



[issue2142] difflib.unified_diff(...) produces invalid patches

2018-10-23 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


--
nosy: +thatiparthy

___
Python tracker 

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



[issue29341] Missing accepting path-like object in docstrings of os module functions

2018-10-23 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


--
nosy: +thatiparthy

___
Python tracker 

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



[issue34980] KillPython target doesn't detect 64-bit processes

2018-10-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9392

___
Python tracker 

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



[issue34980] KillPython target doesn't detect 64-bit processes

2018-10-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9393

___
Python tracker 

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



[issue34980] KillPython target doesn't detect 64-bit processes

2018-10-23 Thread Steve Dower


Steve Dower  added the comment:


New changeset fa5329424f4206630c34f75629fa78738db647f0 by Steve Dower (Jeremy 
Kloth) in branch 'master':
bpo-34980: P/Invoke QueryFullProcessImageName to get process names (GH-9901)
https://github.com/python/cpython/commit/fa5329424f4206630c34f75629fa78738db647f0


--

___
Python tracker 

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



[issue35048] Can't reassign __class__ despite the assigned class having identical slots

2018-10-23 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


--
nosy: +thatiparthy

___
Python tracker 

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



[issue35028] Off by one error in cgi.FieldStorage(max_num_fields)

2018-10-23 Thread miss-islington


miss-islington  added the comment:


New changeset 178bf58e798d3ef63f18b314056efbc3c33dd48b by Miss Islington (bot) 
in branch '3.7':
bpo-35028: cgi: Fix max_num_fields off by one error (GH-9973)
https://github.com/python/cpython/commit/178bf58e798d3ef63f18b314056efbc3c33dd48b


--

___
Python tracker 

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



[issue35028] Off by one error in cgi.FieldStorage(max_num_fields)

2018-10-23 Thread miss-islington


miss-islington  added the comment:


New changeset 58b614a327991f4baad4d2795a50027f75411450 by Miss Islington (bot) 
in branch '3.6':
bpo-35028: cgi: Fix max_num_fields off by one error (GH-9973)
https://github.com/python/cpython/commit/58b614a327991f4baad4d2795a50027f75411450


--

___
Python tracker 

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



[issue33015] Fix function cast warning in thread_pthread.h

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:

The GCC warning is:

func_cast.c:34:30: warning: cast between incompatible function types from 
'python_callback' {aka 'void (*)(void *)'} to 'void * (*)(void *)' 
[-Wcast-function-type]
 pthread_callback func2 = (pthread_callback)func;
  ^

--

___
Python tracker 

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



[issue33015] Fix function cast warning in thread_pthread.h

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:

func_cast.c: C program reproducing the issue. Using an additional (void*) cast, 
it's possible to workaround the cast warning.

/* Test GCC 8.1 -Wcast-function-type for https://bugs.python.org/issue33015
 *
 * Compiled on Linux with:
 * gcc x.c -o x -Wall -Wextra -lpthread
 *
 * Workaround the cast:
 * gcc x.c -o x -Wall -Wextra -lpthread -D UGLY_CAST
 */


/* No result value */
typedef void (*python_callback) (void *);

/* Result type: "void*" (untyped pointer) */
typedef void* (*pthread_callback) (void *);

int test_cast(python_callback func)
{
...
#ifdef UGLY_CAST
pthread_callback func2 = (pthread_callback)(void *)func;
#else
pthread_callback func2 = (pthread_callback)func;
#endif
...
}

--
Added file: https://bugs.python.org/file47888/func_cast.c

___
Python tracker 

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



[issue33015] Fix function cast warning in thread_pthread.h

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:

"Fix function cast warning in thread_pthread.h"

Can you please paste the warning?

--

___
Python tracker 

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



[issue35049] argparse.ArgumentParser fails on arguments with leading dash and comma

2018-10-23 Thread Lene Preuss


Change by Lene Preuss :


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



[issue35049] argparse.ArgumentParser fails on arguments with leading dash and comma

2018-10-23 Thread Lene Preuss


New submission from Lene Preuss :

Obligatory apologies if this has been reported before, I could not find it. It 
is similar to but different from https://bugs.python.org/issue9334.

>>> from argparse import ArgumentParser
>>> p = ArgumentParser()
>>> p.add_argument('-d')
_StoreAction(option_strings=['-d'], dest='d', nargs=None, const=None, 
default=None, type=None, choices=None, help=None, metavar=None)
>>> p.parse_args(['-d', '12'])
Namespace(d='12')
>>> p.parse_args(['-d', '1,2'])
Namespace(d='1,2')
>>> p.parse_args(['-d', '-12'])
Namespace(d='-12')
>>> p.parse_args(['-d', '-1,2'])
usage: [-h] [-d D]
: error: argument -d: expected one argument

As suggested in issue 9334, passing the argument with an equals sign works:
>>> p.parse_args(['-d=-1,2'])
Namespace(d='-1,2')

But I don't think that this is the intended behavior.

--
messages: 328299
nosy: lene
priority: normal
severity: normal
status: open
title: argparse.ArgumentParser fails on arguments with leading dash and comma
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



[issue33015] Fix function cast warning in thread_pthread.h

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:

> gcc8.1 throws this warning irrespective of the cast since converting function 
> pointers may result in undefined behaviour unless it is cast back to its 
> original type.

Do you have a reference explaining this issue? I dislike adding a memory 
allocation to call a function just to fix a compiler warning. From my point of 
view, at the end, the function pointer is just an integer. I don't understand 
how an additional memory allocation solves the issue.

--
nosy: +vstinner

___
Python tracker 

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



[issue34260] shutil.copy2 is not the same as cp -p

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4f399be0e70d8b5516b6213568b7665765bb3114 by Victor Stinner (Zsolt 
Cserna) in branch 'master':
bpo-34260, shutil: fix copy2 and copystat documentation (GH-8523)
https://github.com/python/cpython/commit/4f399be0e70d8b5516b6213568b7665765bb3114


--
nosy: +vstinner

___
Python tracker 

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



[issue35046] logging.StreamHandler performs two syscalls when one would do

2018-10-23 Thread Vinay Sajip


Change by Vinay Sajip :


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



[issue35048] Can't reassign __class__ despite the assigned class having identical slots

2018-10-23 Thread Dan Snider


New submission from Dan Snider :

>>> class a(dict): __slots__ = '__dict__', 'x'

>>> class b(dict): __slots__ = '__dict__', 'x'

>>> self = a(); self.__class__ = b
Traceback (most recent call last):
  File "", line 1, in 
self=a(); self.__class__ = b
TypeError: __class__ assignment: 'b' object layout differs from 'a'

This always occurs when __dict__ and/or __weakref__ are defined as slots, even 
when both classes have otherwise identical slots. This behavior appears to 
contradict what the docs say wrt to __class__ assignment, which is (in its 
entirety):

"__class__ assignment works only if both classes have the same __slots__. "

Not sure if this is just a case of ambiguous documentation and intentional 
behavior or not. Since two classes with identical slots will always have 
identical internal struct layouts, I can't see a reason for this error.

--
messages: 328296
nosy: bup
priority: normal
severity: normal
status: open
title: Can't reassign __class__ despite the assigned class having identical 
slots
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



[issue35046] logging.StreamHandler performs two syscalls when one would do

2018-10-23 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset d730719b094cb006711b1cd546927b863c173b31 by Vinay Sajip (Miss 
Islington (bot)) in branch '3.7':
bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042) 
(GH-10050)
https://github.com/python/cpython/commit/d730719b094cb006711b1cd546927b863c173b31


--

___
Python tracker 

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



[issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure

2018-10-23 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Paul Ganssle for your fixes!

--

___
Python tracker 

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



[issue31722] _io.IncrementalNewlineDecoder doesn't inherit codecs.IncrementalDecoder

2018-10-23 Thread Xiang Zhang


Xiang Zhang  added the comment:

Just find the same problem while investigating io.

--
nosy: +xiang.zhang
stage: patch review -> needs patch
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



[issue35047] Better error messages un unittest.mock

2018-10-23 Thread Petter S


New submission from Petter S :

When developing unit tests with `unittest.mock`, it is common to see error 
messages like this:

AssertionError: Expected 'info' to not have been called. Called 3 times.

It would be really helpful if those 3 calls were listed in the assertion error.

I am happy to add this if people agree it is a good thing.

--
components: Library (Lib)
messages: 328292
nosy: Petter S
priority: normal
severity: normal
status: open
title: Better error messages un unittest.mock
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



[issue35028] Off by one error in cgi.FieldStorage(max_num_fields)

2018-10-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9391

___
Python tracker 

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



[issue35028] Off by one error in cgi.FieldStorage(max_num_fields)

2018-10-23 Thread miss-islington


miss-islington  added the comment:


New changeset b79b5c09493e98374e48fa122d82dab528fc6e72 by Miss Islington (bot) 
(matthewbelisle-wf) in branch 'master':
bpo-35028: cgi: Fix max_num_fields off by one error (GH-9973)
https://github.com/python/cpython/commit/b79b5c09493e98374e48fa122d82dab528fc6e72


--
nosy: +miss-islington

___
Python tracker 

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



[issue35028] Off by one error in cgi.FieldStorage(max_num_fields)

2018-10-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9390

___
Python tracker 

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



[issue31553] Extend json.tool to handle jsonlines (with a flag)

2018-10-23 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The output is not a valid JSON format, and is not a valid JSON Lines format. 
What you are going to do with it?

--

___
Python tracker 

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



[issue31553] Extend json.tool to handle jsonlines (with a flag)

2018-10-23 Thread hongweipeng


Change by hongweipeng :


--
pull_requests: +9389

___
Python tracker 

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



[issue34454] datetime: NULL dereference in fromisoformat() on PyUnicode_AsUTF8AndSize() failure

2018-10-23 Thread Tal Einat


Change by Tal Einat :


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



[issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings

2018-10-23 Thread Tal Einat


Tal Einat  added the comment:

Thanks for the PR, Alexey!

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



[issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings

2018-10-23 Thread miss-islington


miss-islington  added the comment:


New changeset 313e5015d258778737bff766a8ccf997a0cc20c7 by Miss Islington (bot) 
in branch '3.7':
bpo-34482: test datetime classes' handling of non-UTF-8-encodable strings 
(GH-8878)
https://github.com/python/cpython/commit/313e5015d258778737bff766a8ccf997a0cc20c7


--
nosy: +miss-islington

___
Python tracker 

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



[issue35043] functools.reduce doesn't work properly with itertools.chain

2018-10-23 Thread Vasantha Ganesh Kanniappan


Vasantha Ganesh Kanniappan  added the comment:

You are right. It works now. I'm sorry for wasting your time.

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



[issue35046] logging.StreamHandler performs two syscalls when one would do

2018-10-23 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset b7d62050e7d5fc208ae7673613da4f1f2bc565c4 by Vinay Sajip (Josh 
Snyder) in branch 'master':
bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042)
https://github.com/python/cpython/commit/b7d62050e7d5fc208ae7673613da4f1f2bc565c4


--

___
Python tracker 

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



[issue35046] logging.StreamHandler performs two syscalls when one would do

2018-10-23 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9388

___
Python tracker 

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



[issue34748] Incorrect HTML link in functools.partial

2018-10-23 Thread Xiang Zhang


Xiang Zhang  added the comment:

Thanks all. :-)

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

___
Python tracker 

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



  1   2   >