[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

2016-06-05 Thread SilentGhost

Changes by SilentGhost :


--
components: +Extension Modules -Interpreter Core
nosy: +larry

___
Python tracker 

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



[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-05 Thread Susumu Koshiba

Susumu Koshiba added the comment:

Ah yes, you are right. I didn't think about the cases where it will send HEAD 
for codes like 204(No Content). I've created a patch for 3.6 to see if this 
looks reasonable, if review passes, I'll create patches for the rest of the 
releases.

Thanks a lot for pointing this out.

--
Added file: 
http://bugs.python.org/file43255/issue25738_http_reset_content_06.patch

___
Python tracker 

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



[issue27233] Missing documentation for PyOS_FSPath

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

I haven’t really been following the FS-path stuff, but I guess this also needs

.. versionadded:: 3.6

--
nosy: +martin.panter
stage:  -> patch review

___
Python tracker 

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



[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

2016-06-05 Thread Rustemzade Mehemmed

Changes by Rustemzade Mehemmed :


--
components: +Interpreter Core
versions: +Python 2.7

___
Python tracker 

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



[issue27107] mailbox.__all__ list is incomplete

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

FTR the closest thing I could find discussing reap_children() is Issue 16968.

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



[issue27105] cgi.__all__ is incomplete

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

Thanks for the patches Jacek. This one I committed after moving the test into 
CgiTests.

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



[issue27239] Make idlelib.macosx self-contained.

2016-06-05 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Lib/idlelib/macosx.py:8 initializes _tk_type to None.  It next defines private 
function _initializeTkVariantTests, which in called in setupApp and which 
initializes _tk_type.  Then follow 4 isXyzTk functins, which "assert _tk_type 
is not None".  This is fine for IDLE because IDLE call setupApp on startup.

This is not fine for testing.  In general, tests do not and should not call 
setupApp. If a test happens to exercise one of the 11 (for now) isXyzTk calls 
occurring outside of macosx, the assert is triggered.  The test writer must 
then discover to import and call the supposedly private 
_initializeTkVariantTests.

I would prefer instead that maxosx be more self-contained, and initialize 
_tk_type as needed.  _initializeTkVariantTests needs a Tk instance for this 
line.
ws = root.tk.call('tk', 'windowingsystem')
I would like to wrap that with root = tkinter.Tk() and root.destroy.  If that 
cannot be done on import, then instead of deleting the asserts, replace them 
with conditional calls to the initialization function.

--
assignee: terry.reedy
messages: 267513
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: Make idlelib.macosx self-contained.
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



[issue27109] plistlib.__all__ list is incomplete

2016-06-05 Thread Martin Panter

Changes by Martin Panter :


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



[issue27110] smtpd.__all__ list is incomplete

2016-06-05 Thread Martin Panter

Changes by Martin Panter :


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



[issue27108] mimetypes.__all__ list is incomplete

2016-06-05 Thread Martin Panter

Changes by Martin Panter :


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



[issue27107] mailbox.__all__ list is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d62e57958e7c by Martin Panter in branch 'default':
Issue #27107: mailbox.fcntl = None on Windows
https://hg.python.org/cpython/rev/d62e57958e7c

--

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

Maybe an alternative would be to add a special PYTHONHASHSEED=best-effort (or 
whatever) value that says if there is no entropy available, use a predictable 
hash seed. That would force whoever starts the Python process to be aware of 
the problem.

--

___
Python tracker 

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



[issue23883] __all__ lists are incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a36c7f87eba9 by Martin Panter in branch 'default':
Issue #23883: News updates for __all__ attributes
https://hg.python.org/cpython/rev/a36c7f87eba9

--

___
Python tracker 

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



[issue27108] mimetypes.__all__ list is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2057b0af1c52 by Martin Panter in branch 'default':
Issue #27108: Add missing names to mimetypes.__all__, by Jacek Kołodziej
https://hg.python.org/cpython/rev/2057b0af1c52

--
nosy: +python-dev

___
Python tracker 

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



[issue27105] cgi.__all__ is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 74ed6f3fb8d2 by Martin Panter in branch 'default':
Issue #27105: Add cgi.test() to __all__, based on Jacek Kołodziej’s patch
https://hg.python.org/cpython/rev/74ed6f3fb8d2

--
nosy: +python-dev

___
Python tracker 

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



[issue27109] plistlib.__all__ list is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 450171f53e81 by Martin Panter in branch 'default':
Issue #27109: Add InvalidFileException to __all__, by Jacek Kołodziej
https://hg.python.org/cpython/rev/450171f53e81

--
nosy: +python-dev

___
Python tracker 

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



[issue27107] mailbox.__all__ list is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4705b7597c86 by Martin Panter in branch 'default':
Issue #27107: Add exception classes to mailbox.__all__, by Jacek Kołodziej
https://hg.python.org/cpython/rev/4705b7597c86

--
nosy: +python-dev

___
Python tracker 

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



[issue27110] smtpd.__all__ list is incomplete

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bcc0c3fd4a40 by Martin Panter in branch 'default':
Issue #27110: Add smtpd.SMTPChannel to __all__, by Jacek Kołodziej
https://hg.python.org/cpython/rev/bcc0c3fd4a40

--
nosy: +python-dev

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

Minor thing: the patch has tabbed intentation in places rather than spaces.

As I understand it, if there is no entropy initialized, this patch will fall 
back to reading /dev/urandom, which will return predictable data (opposite of 
“random” data!). But since we take this non-strict fallback in other cases 
(e.g. no OS support), there is a decent argument for also taking the 
predictable fallback path when entropy is uninitialized.

--
nosy: +martin.panter

___
Python tracker 

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



[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-05 Thread Xiang Zhang

Xiang Zhang added the comment:

@skip_if_broken_ubuntu_ssl doesn't work in this case. `hasattr(ssl, 
'PROTOCOL_SSLv2')` returns False.

--

___
Python tracker 

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



[issue24759] Idle: require tk 8.5 and ttk widgets, and drop unneeded code.

2016-06-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Fixed whitespace and added comment.

--
Added file: http://bugs.python.org/file43254/require85-v3.diff

___
Python tracker 

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



[issue24790] Idle: improve stack viewer

2016-06-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Deleted .keys in 8.6.

--
versions:  -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue27164] zlib can't decompress DEFLATE using shared dictionary

2016-06-05 Thread Martin Panter

Changes by Martin Panter :


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



[issue27156] IDLE: remove unused code

2016-06-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

3 and 4 removed. Closing at least until I find something else that is not part 
of a refactoring but needs at least a question answered.

--
components: +IDLE
nosy:  -python-dev
resolution:  -> fixed
stage: needs patch -> 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



[issue27156] IDLE: remove unused code

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 166784c40be8 by Terry Jan Reedy in branch 'default':
Issue #27156: Remove more unused idlelib code.
https://hg.python.org/cpython/rev/166784c40be8

--

___
Python tracker 

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



[issue17598] mingw: init system calls

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

Part of this patch is superceded by revision c7adad17f663 (Issue 22579). Here 
is a patch of the remaining significant changes. But I don’t know enough about 
Modules/Setup.config.in and Modules/Setup.dist to give it a proper review.

--
nosy: +martin.panter
stage:  -> patch review
versions: +Python 3.6 -Python 3.4
Added file: http://bugs.python.org/file43253/MINGW-INITSYS.v2.patch

___
Python tracker 

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



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

I was a little concerned that Alex’s patch used “test A -ef B”, which is not 
specified by Posix. But it is apparently widely supported (and consider we 
would only need it for cross compilation). Anyway, I was going to suggest test 
"$(srcdir)" == "." instead, but maybe Xavier’s solution is slightly better 
again.

I say go with vpath.patch, perhaps with a brief comment explaining that the cp 
+ mv dance avoids copying the file onto itself when doing an in-tree build.

--
stage:  -> commit review
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue26014] Guide users to the newer package install instructions

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

Thanks, Susan, for your suggested patch.  I expanded on it to address all of 
the issues Nick brought up and then some, such as also updating to the changed 
setuptools doc link.  Pushed for release in 2.7.12, 3.5.2, and 3.6.0.

--
nosy: +ned.deily
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions: +Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-05 Thread Yoni Lavi

Yoni Lavi added the comment:

Thank you very much for the detailed review, Nathan. Attached is a new patch 
that resolves the merge issues, and some of the other issues you mentioned. 

Concerning the index reference in marshal.rst , ah, yes, I missed that it only 
related to a single paragraph. I reverted that change.

Concerning versionadded in unittest.mock-examples.rst, you're right, I saw that 
this was already available elsewhere and removed it for consistency with other 
similar intro files. I'll revert if you tell me.

I think I fixed all the smaller issues you mentioned, too. I wasn't sure about 
the fuzz; I didn't see any issue, so I assume it was automatically resolved by 
`hg update`. 

I don't have any input to give concerning the 'subjective' issues and will be 
happy to wait for a decision.

--
Added file: http://bugs.python.org/file43252/mywork3.patch

___
Python tracker 

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



[issue26014] Guide users to the newer package install instructions

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 71fc5b246f5b by Ned Deily in branch '2.7':
Issue #26014: Guide 2.7 users to the new packaging documentation:
https://hg.python.org/cpython/rev/71fc5b246f5b

New changeset f5fd646b265b by Ned Deily in branch '3.5':
Issue #26014: Update 3.x packaging documentation:
https://hg.python.org/cpython/rev/f5fd646b265b

New changeset 7583d65da2ad by Ned Deily in branch 'default':
Issue #26014: merge from 3.5
https://hg.python.org/cpython/rev/7583d65da2ad

--
nosy: +python-dev

___
Python tracker 

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



[issue27238] Bare except: usages in turtle.py

2016-06-05 Thread Jelle Zijlstra

New submission from Jelle Zijlstra:

Will add a patch

--
assignee: Jelle Zijlstra
components: Library (Lib)
messages: 267493
nosy: Jelle Zijlstra, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Bare except: usages in turtle.py
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



[issue27072] random.getrandbits is limited to 2**31-1 bits on 64-bit Windows

2016-06-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sorry Steven, I'm going to mark this as rejected on the grounds that it is 
likely to do more harm than good.  We could in fact make the range larger but 
it easily creates terrible effects (encouraging bad design and creating a 
non-interruptable, long-running, total-memory-filling call).  

While we do allow ``2 ** 50 ** 50``, that call is more deliberately asking for 
trouble than getrandbits(2**60).  If someone really needed that number of bits, 
it isn't hard to multiple calls to getrandbits() and combine the results, 
deliberately and interruptably.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue27236] Add CHAINED_COMPARE_OP opcode

2016-06-05 Thread Demur Rumed

Demur Rumed added the comment:

@rhettinger can you clarify your opinion in relation to #27140 with #27095 & 
#27213 in mind?

I agree that CHAINED_COMPARE_OP is unnecessary

--

___
Python tracker 

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



[issue27237] Kafka Python Consumer Messages gets truncated

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

Sorry, kafka is a third-party package, not part of the Python Standard Library. 
 Suggest you pursue this with the Kafka project:

http://kafka-python.readthedocs.io/en/master/support.html

--
nosy: +ned.deily
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



[issue27215] Docstrings of Sequence and MutableSequence seems not right

2016-06-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I think you're reading too much into the docs.  Most useful classes provide a 
__new__ or __init__ to put data into instances.  The docs are simply saying 
that that responsibility lies with the implementer rather than with the ABC.

IMO, the docs are more useful as-is.  Were we to accept the patch, it wouldn't 
be long before another user reported a bug saying that the implemented the 
other methods but the class didn't do anything useful.

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



[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

I just spoke with @doko about this here at PyCon.  I think we came to the 
conclusion it might be time to consider removing the old 
@skip_if_broken_ubuntu_ssl decorator and focus on making the tests work with 
the most recent releases since pretty much every distributor and current Python 
releases have moved to disabling the old compromised ssl/tls versions.

--

___
Python tracker 

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



[issue27237] Kafka Python Consumer Messages gets truncated

2016-06-05 Thread Rahul

New submission from Rahul:

Snippet code is below:
from kafka import KafkaConsumer
from kafka.client import KafkaClient
from kafka.consumer import SimpleConsumer

consumer = KafkaConsumer('eventdetails_ingestion' , 
group_id='1',bootstrap_servers=‘:9092', max_partition_fetch_bytes=1055)
for msg in consumer:
try:
jValue = json.loads(str(msg.value))
   except ValueError:
fileErr.write(str(msg.value)+"\n")

Steps:
We send/produce large sets of messages to Kafka of around 20 to 30 KB size each 
messages in JSON format and producing around 200 messages / sec for 1 hour 
duration. We have 3 Kafka Brokers running and I am trying to consume the 
messages from these 3 Kafka Brokers from the same topic using the above code. 
The problem is that sometimes some of the messages gets truncated, I am not 
sure why it happen ?

--
components: Library (Lib)
messages: 267487
nosy: rgo...@threatmetrix.com
priority: normal
severity: normal
status: open
title: Kafka Python Consumer Messages gets truncated
type: performance
versions: Python 2.7

___
Python tracker 

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



[issue23401] Add pickle support of Mapping views

2016-06-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> Raymond, what is your opinion?

Whether and how to pickle should be at the discretion of a concrete class 
rather than a requirement for being a mapping.  For example, it may not make 
any sense for a persistent dictionary such as a FileDict or an SQLDict.  Also, 
my mental model of a mapping view is something that is transparent, a window to 
the world rather than the world itself.

--

___
Python tracker 

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



[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-05 Thread Martin Panter

Martin Panter added the comment:

This test is already decorated with @skip_if_broken_ubuntu_ssl. I’m not sure 
Python should go too far out of its way to handle downstream patches, but it 
seems there is a precedent here.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27236] Add CHAINED_COMPARE_OP opcode

2016-06-05 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Please stop adding new opcodes for rare use cases.  That represents a sharp 
departure from our entire history of adding opcodes.

Code like "x = a < b > c < d" almost never comes up.

--
nosy: +rhettinger

___
Python tracker 

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



[issue26336] Expose regex bytecode as attribute of compiled pattern object

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Yes, you can get at it with ctypes. I released a small (and virtually untested) 
library at https://github.com/JelleZijlstra/regdis that provides dis-like 
capabilities.

--

___
Python tracker 

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



[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-06-05 Thread Jack McCracken

Jack McCracken added the comment:

Don't know how useful this will be, but here's a crash report from Mac OS X 
10.11 with Klamann's example (Python 3.5).

--
nosy: +Jack.McCracken
Added file: http://bugs.python.org/file43251/coredump_macosx10.11.5.crash

___
Python tracker 

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



[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Jack McCracken

Jack McCracken added the comment:

Here's the patch I made.

--
keywords: +patch
Added file: http://bugs.python.org/file43250/add-many-slash-path-note.patch

___
Python tracker 

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



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-05 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Yes, those changes incorrectly assume that the source directory and the build 
directory are always different (using VPATH). Alex patch LGTM, this other patch 
overwrites the graminit.[ch] files, not sure if this is better.

--
Added file: http://bugs.python.org/file43249/vpath.patch

___
Python tracker 

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



[issue26467] Add async magic method support to unittest.mock.Mock

2016-06-05 Thread Yusuke Tsutsumi

Yusuke Tsutsumi added the comment:

Taking a look at the code, this may require a bit more discussion.

Mock's classes create copies of themselves when an attribute is accessed. As 
such, I can't just add __aexit__ and have it generate a different mock type 
entirely, unless I know exactly what an async variant of this mock is.

If there was a way to specifically provide a function for asynchronous 
situations, like __acall__, that would make this a lot easier as well.

Anyway, my proposal now is:

create new classes MockAsync and MagicMockAsync, and have MockAsync and 
MagicMockAsync implement the __aexit__ and __aenter__ methods.

How is that as an approach?

--

___
Python tracker 

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



[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Jack McCracken

Jack McCracken added the comment:

Hey all - I would love to write a patch :) Working on it!

--
nosy: +Jack.McCracken

___
Python tracker 

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



[issue26448] dis.findlabels ignores EXTENDED_ARG

2016-06-05 Thread Eric Fahlgren

Eric Fahlgren added the comment:

Thanks, Serhiy.  I sort of figured that it would get fixed with the
wordcode rework, and was going to verify that it was when 3.6 settled down.

On Sun, Jun 5, 2016 at 8:30 AM, Serhiy Storchaka 
wrote:

>
> Serhiy Storchaka added the comment:
>
> This bug was fixed in issue26881 with similar patch. Sorry, I didn't know
> about this issue. Your patches look good. In any case thank you for your
> effort.
>
> --
> nosy: +serhiy.storchaka
> resolution:  -> out of date
> stage:  -> resolved
> status: open -> closed
> superseder:  -> modulefinder should reuse the dis module
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue27127] Never have GET_ITER not followed by FOR_ITER

2016-06-05 Thread Demur Rumed

Demur Rumed added the comment:

I've gotten most tests to past by having FOR_ITER be traced as if the 
instruction index is that of the corresponding FOR_BEGIN. test_sys_settrace 
still fails on test_15_loops because an empty loop body doesn't have the 'pass' 
line traced (ie when FOR_ITER starts the line) which I'm currently pondering 
ways around

The first patch, which only moved GET_ITER into the closure, would still be 
good for list/set/dict comprehensions (to help PREDICT & JITs)

If there's essentially a decision that all loops should have JUMP_ABSOLUTE to 
their beginning for the sake of tracing simplicity, then FOR_BEGIN/FOR_ITER are 
dead

--

___
Python tracker 

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



[issue27052] Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with segfault

2016-06-05 Thread Matthias Klose

Matthias Klose added the comment:

(checked with the recent packages in Debian unstable and Ubuntu yakkety)

--

___
Python tracker 

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



[issue27052] Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with segfault

2016-06-05 Thread Matthias Klose

Changes by Matthias Klose :


--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue27052] Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with segfault

2016-06-05 Thread Matthias Klose

Matthias Klose added the comment:

I'm unable to reproduce this with the 2.7 branch 20160603.

--

___
Python tracker 

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



[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2016-06-05 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +davin
versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue27224] IDLE: editor versus grep line number differ

2016-06-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Yesterday, I grepped three times and got the same wrong result each time, so I 
know I was not crazy.  But today, starting fresh with no IDLE or TortoiseHg 
running, all is well.  Closing as 'heisenbug' ;-).  Lesson: start fresh before 
reporting weird behavior.  (I should have known.  I occasionally have to reboot 
windows to reset its key mappings.)  Thanks, and sorry for the noise.

--
resolution:  -> not a bug
stage: test needed -> 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



[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

Can we close this as an Ubuntu-specific problem?

--
nosy: +doko, ned.deily

___
Python tracker 

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



[issue26329] os.path.normpath("//") returns //

2016-06-05 Thread Arno-Can Uestuensoez

Arno-Can Uestuensoez added the comment:

Hi Serhiy,
I am currently still investigating it for my own project. 

  
https://stackoverflow.com/questions/37646103/posix-path-1003-1-examples-and-behaviour-for-foo-bar

Currently I do not have the build environment, so I can provide the text, but 
because I am a bit under pressure with finishing a larger pack of OpenSource 
projects currently I cannot manage to setup the environment.

So can do this eventually in 2-3Weeks.

--

___
Python tracker 

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



[issue24459] Mention PYTHONFAULTHANDLER in the man page

2016-06-05 Thread Joshua Jay Herman

Joshua Jay Herman added the comment:

I have reviewed the comments on Rietveld and made the changes to the patch. 
Attached is the revised version.

--
Added file: 
http://bugs.python.org/file43248/addMissingEnvironmentVariables-review-1.patch

___
Python tracker 

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



[issue27052] Python2.7.11+ as in Debian testing and Ubuntu 16.04 LTS crashes with segfault

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

FWIW, I am also unable to reproduce the crash on OS X with a current top-of-2.7 
debug build.  Since it doesn't seem to be able to be reproduced with stock 
Python 2.7's, perhaps it is time to close the issue here?

--
nosy: +ned.deily

___
Python tracker 

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



[issue27127] Never have GET_ITER not followed by FOR_ITER

2016-06-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It looks to me this idea is dead.

--

___
Python tracker 

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



[issue26336] Expose regex bytecode as attribute of compiled pattern object

2016-06-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I prefer 'rexcode' for the attribute name.

I share Serhiy's  reservations.  When people write code that depends on CPython 
implementation details, even though documented as such, the existence of such 
code becomes a drag on change, especially when details have been stable for 
awhile.  I just saw this used as an argument against one of the proposed 
bytecode/wordcode changes. "It would break current 3rd party code." It also 
came up a few years ago with randomizing hashes (and dict iteration order).

Jelle, can one access the 'rexcode' via ctypes?  Is so, I think an re 
disassembler with docs would be a good pypi module.  Maybe you could also make 
it work with Barnett's regex module.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue27186] add os.fspath()

2016-06-05 Thread Dusty Phillips

Dusty Phillips added the comment:

Ethan: Can you clarify what you mean by "testing the other classes"? 
PureWindowsPath and PurePosixPath are tested by extension of _BasePurePathTest. 
So I think you mean that _BasePathTest also needs testing, but I don't see 
anything in there that would mirror the constructor testing that is happening 
in PurePath.

--

___
Python tracker 

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



[issue27236] Add CHAINED_COMPARE_OP opcode

2016-06-05 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

For now complex code is generated for chained comparing.

$ echo "x = a < b > c < d" | ./python -m dis
  1   0 LOAD_NAME0 (a)
  2 LOAD_NAME1 (b)
  4 DUP_TOP
  6 ROT_THREE
  8 COMPARE_OP   0 (<)
 10 JUMP_IF_FALSE_OR_POP28
 12 LOAD_NAME2 (c)
 14 DUP_TOP
 16 ROT_THREE
 18 COMPARE_OP   4 (>)
 20 JUMP_IF_FALSE_OR_POP28
 22 LOAD_NAME3 (d)
 24 COMPARE_OP   0 (<)
 26 JUMP_FORWARD 4 (to 32)
>>   28 ROT_TWO
 30 POP_TOP
>>   32 STORE_NAME   4 (x)
 34 LOAD_CONST   0 (None)
 36 RETURN_VALUE

Proposed patch adds CHAINED_COMPARE_OP opcode that does all necessary stack 
manipulatios. Using it the generated code is simpler:

$ echo "x = a < b > c < d" | ./python -m dis
  1   0 LOAD_NAME0 (a)
  2 LOAD_NAME1 (b)
  4 CHAINED_COMPARE_OP   0 (<)
  6 JUMP_IF_FALSE_OR_POP18
  8 LOAD_NAME2 (c)
 10 CHAINED_COMPARE_OP   4 (>)
 12 JUMP_IF_FALSE_OR_POP18
 14 LOAD_NAME3 (d)
 16 COMPARE_OP   0 (<)
>>   18 STORE_NAME   4 (x)
 20 LOAD_CONST   0 (None)
 22 RETURN_VALUE

--
components: Interpreter Core
files: chained_compare_op.patch
keywords: patch
messages: 267466
nosy: Demur Rumed, Mark.Shannon, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add CHAINED_COMPARE_OP opcode
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43247/chained_compare_op.patch

___
Python tracker 

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



[issue26582] asyncio documentation links to wrong CancelledError

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

This patch documents CancelledError in the asyncio documentation.

--
keywords: +patch
nosy: +Jelle Zijlstra
Added file: http://bugs.python.org/file43246/issue26582.patch

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Brett Cannon

Changes by Brett Cannon :


--
versions:  -Python 3.5

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Brett Cannon

Changes by Brett Cannon :


--
type: behavior -> enhancement

___
Python tracker 

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



[issue25941] Add 'How to Review a Patch' section to devguide

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

The revised patch looks good to me (other than some trailing whitespace).  
Camilla, thanks for your contribution.  If you haven't already, please sign a 
contributor form to cover this and future contributions as noted elsewhere in 
the Developer's Guide:

https://docs.python.org/devguide/coredev.html#sign-a-contributor-agreement

--
nosy: +ned.deily
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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Michał Górny

Michał Górny added the comment:

Yes, you could put it like this.

--

___
Python tracker 

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



[issue25941] Add 'How to Review a Patch' section to devguide

2016-06-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8b3f4473432e by Ned Deily in branch 'default':
Issue #25941: Add "How To Review A Patch" section to the devguide.
https://hg.python.org/devguide/rev/8b3f4473432e

--
nosy: +python-dev

___
Python tracker 

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



[issue19489] move quick search box above TOC

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Yes, I don't think we control this, the layout is generated by sphinx.

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue15243] Misleading documentation for __prepare__

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

I think the current documentation is correct and doesn't need changes. There is 
also already an example of a working __prepare__ method.

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Brett Cannon

Brett Cannon added the comment:

But distutils still does the right thing with -O2 and --optimize 2, right? If 
that's the case then this is an enhancement request to add support to distutils 
to compile all bytecode levels and not a regression.

--

___
Python tracker 

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



[issue27182] PEP 519 support in the stdlib

2016-06-05 Thread Brett Cannon

Brett Cannon added the comment:

Functions that only accept file descriptors should not be updated to work with 
__fspath__() as it will never return an int/fd.

As for Ethan's suggestion, are you saying you want to toss the str/bytes check 
from os.fspath()? If so then you will need to go to python-dev and bring that 
up as the PEP clearly specifies that str/bytes is checked for and specifically 
in the order of the Python code. The thinking behind the current design is that 
since __fspath__() has to be explicitly implemented that people will do so 
properly, versus accidentally passing in some type that isn't str/bytes like 
the pre-PEP 519 world (i.e. trust the __fspath__() implementors to do the right 
thing and only protect against someone passing in something wrong from 
complicated code flow).

There has been discussion about using the ``path.__fspath__() if hasattr(path, 
'__fspath__') else path`` idiom in os.path so that the pre-existing type-checks 
can do their thing instead of checking twice, although that's different from 
how os.fspath() works (then again, since this is all new code we could argue 
that going our own route in os.path is acceptable in the name of performance).

--

___
Python tracker 

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



[issue27215] Docstrings of Sequence and MutableSequence seems not right

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

The docstrings (at least in 3.6) say subclasses must override __new__ *or* 
__init__. However, I think this is wrong too. The following is a correct (if 
not very useful) implementation of Sequence:

>>> import collections.abc
>>> class MySequence(collections.abc.Sequence):
... def __getitem__(self, key):
... raise IndexError(key)
... def __len__(self):
... return 0
... 

Other abc docstrings also don't claim that __init__ or __new__ must be 
implemented. The attached patch fixes the docstrings.

--
keywords: +patch
nosy: +Jelle Zijlstra
Added file: http://bugs.python.org/file43245/issue27215.patch

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Ned Deily

Changes by Ned Deily :


--
stage:  -> patch review

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +larry

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

Since 3.5.2 is almost upon us, I'm setting this to "release blocker" status so 
we can make a decision about whether this should be changed for 3.5.2 or not.  
@haypo, do you have an opinion about the patch?

--
nosy: +ned.deily
priority: normal -> release blocker

___
Python tracker 

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



[issue27221] [multiprocessing] Doc is outdated regarding method picklability

2016-06-05 Thread Jelle Zijlstra

Changes by Jelle Zijlstra :


Added file: http://bugs.python.org/file43244/issue27221.patch

___
Python tracker 

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



[issue27221] [multiprocessing] Doc is outdated regarding method picklability

2016-06-05 Thread Jelle Zijlstra

Changes by Jelle Zijlstra :


Removed file: http://bugs.python.org/file43243/issue27233.patch

___
Python tracker 

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



[issue19234] socket.fileno() documentation

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

This looks fixed.

--
nosy: +Jelle Zijlstra
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue27221] [multiprocessing] Doc is outdated regarding method picklability

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Patch attached. I also checked that this case is tested, and it looks like the 
Bunch object in Lib/test/_test_multiprocessing.py uses a method as its target.

--
keywords: +patch
nosy: +Jelle Zijlstra
Added file: http://bugs.python.org/file43243/issue27233.patch

___
Python tracker 

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



[issue26971] python v3.5.1: sys.paths not respecting DESTDIRS and DESTSHARED

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

Sorry, it is no longer clear to me exactly what problem(s) and solution are 
being proposed here.  When dealing with installation problems like this, we 
have to be *very* precise: here's what I started with on what platform, here 
are the contents of the relevant directories and/or files before I start, here 
are exactly the steps I took, here are the results I expected, and here are the 
results I observed.  Using a downloaded tarball and the steps in @yaro-yaro's 
initial message, I see no change in /usr/lib64; note, there *may* have been 
Python .so files installed there by system packages but that should be 
irrelevant to building and installing your own Python.  I also could not 
reproduce @jojo's recipe as best I understand it and don't see how it could 
produce any change in /usr/lib64.  Changing the value of --libdir is a whole 
different matter and not relevant to the original problem.  Also the title of 
the issue refers to DESTDIR and DESTSHARED but nowhere in the body of the issue 
a
 re these variables directly referenced, so I have to assume they aren't being 
explicitly set.

Unless someone can better demonstrate an actual problem here, I'm going to 
close this issue.

--
status: open -> pending

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Michał Górny

Michał Górny added the comment:

Brett, .pyc was controlled by --compile and .pyo by --optimize (either 1 or 2). 
Technically only two variants could be used simultaneously, and distutils 
accounted for that.

Now you have .pyc + .opt-1.pyc + .opt-2.pyc, so three variants instead of two.

--

___
Python tracker 

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



[issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously

2016-06-05 Thread Brett Cannon

Brett Cannon added the comment:

So the reason Python does the right thing at install is because compileall is 
used by the Makefile to do the compilation and it's run twice (it actually 
doesn't use distutils for this).

My question is what did distutils do before PEP 488 since .pyc and .pyo files 
had different names before as well? Did distutils build both previously and so 
this is a regression? Or is this a feature request?

--

___
Python tracker 

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



[issue17500] move PC/icons/source.xar to http://www.python.org/community/logos/

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

LGTM

--
versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

2016-06-05 Thread Rustemzade Mehemmed

Changes by Rustemzade Mehemmed :


--
type:  -> security

___
Python tracker 

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



[issue27111] redundant variables in long_add and long_sub

2016-06-05 Thread Oren Milman

Oren Milman added the comment:

done.
By the way, I am logging in to bugs.python.org through accounts.google.com, but 
I couldn't see any way to do the same in www.python.org, so I have a native 
account there (with the same email address). I hope that won't be an issue...

--

___
Python tracker 

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



[issue27233] Missing documentation for PyOS_FSPath

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Patch adds concise documentation

--
keywords: +patch
Added file: http://bugs.python.org/file43242/issue27233.patch

___
Python tracker 

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



[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

2016-06-05 Thread Rustemzade Mehemmed

Changes by Rustemzade Mehemmed :


--
title: Heap overflow occurred due to the int overflow -> Heap overflow occurred 
due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

___
Python tracker 

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



[issue27235] Heap overflow occurred due to the int overflow

2016-06-05 Thread Rustemzade Mehemmed

New submission from Rustemzade Mehemmed:

I have tested this vulnerability on the Python 2.7 and it absolutely affected 
:). Integer overflow produce in posix_fdopen function. If an attacker sent 
fdopen mode value larger than max integer value (2*32) to fdopen after integer 
overflow occurred. 

int fd;
char *orgmode = "r";
int bufsize = -1;
FILE *fp;
PyObject *f;
char *mode;
if (!PyArg_ParseTuple(args, "i|si", , , ))
return NULL;

/* Sanitize mode.  See fileobject.c */
mode = PyMem_MALLOC(strlen(orgmode)+3);
...
strcpy(mode, orgmode);

 os.fdopen(fd[, mode[, bufsize]])

fo = os.fdopen(fd, "r"*0x)

   0x5e2595 <+86>:  movedi,eax
=> 0x5e2598 <+89>:  call   0x416e50  
(gdb) print /x $eax
$1 = 0x
after does addition of "add" instruction therefore overflow occured and => 
0x5e259d <+94>:  addeax,0x3
(gdb) print /x $eax
$5 = 0x2
and memory allocate after buffer copy== > 
   0x5e25a1 <+98>:  movedi,eax
   0x5e25a4 <+101>: call   0x48f793 <_PyMem_DebugMalloc>
   0x5e25cb <+140>: movesi,edx
   ...
   0x5e25ce <+143>: movedi,eax
   0x5e25d1 <+146>: call   0x416b80 

copy buffer
strcpy(mode, orgmode); <=== overflow


poc:
#!/usr/bin/python

import os, sys

fd = os.open( "foo.txt", os.O_RDWR|os.O_CREAT )
fo = os.fdopen(fd, "r"*0xff)
print "Closed the file successfully!!"

--
messages: 267447
nosy: madness
priority: normal
severity: normal
status: open
title: Heap overflow occurred due to the int overflow

___
Python tracker 

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



[issue27198] Adding an assertClose() method to unittest.TestCase

2016-06-05 Thread Chris Barker

Chris Barker added the comment:

Thanks Raymond.

Damn! I wrote a nice comprehensive note, and my browser lost it somehow :-(.

Here's a shorter version:

"FWIW, I find assertClose easy to misinterpret.  At first, it looks like an 
assertion that a file is closed."

sure -- we can find a new name -- I only used that because it's called 
"isclose" in the math module -- but no one's likely to think a math module 
function is about files...

"we don't need another way to do it"

Yes, we certainly do -- it was added to the math module (even though a large 
fraction of use cases would be testing), and something like this is in numpy, 
Boost, etc, and as the long debate about the PEP indicates -- it's not obvious 
how to do it -- I'd argue this is more necessary in unitest than most of the 
other asserts

(and, sample size 1: a relatively new user offered to proofread the patch for 
me, and immediately said "hey this is great -- I've been needing this!"

Frankly, the objections to adding new aseert methods are really a critique of 
the unittest API -- it is clearly DESIGNED to have specialized asserts for many 
common use cases. So I think we should either:

Embrace the API and add useful asserts like this one.

or

Make a concerted effort (Primarily through documentation) to move toward a 
different API (or a different way to use the current one, anyway). Robert's 
posts about "matches" are a good start.

In the meantime, maybe the way to go with this is to add it to 
assertAlmostEqual -- it gives folks the functionality, makes it discoverable, 
and doesn't add a new name.

Any objections to that before I take the time to code that up?

-Chris

--

___
Python tracker 

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



[issue27151] multiprocessing.Process leaves read pipes open (Process.sentinel)

2016-06-05 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +davin

___
Python tracker 

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



[issue27168] Yury isn't sure comprehensions and await interact correctly

2016-06-05 Thread Ned Deily

Changes by Ned Deily :


--
assignee:  -> yselivanov

___
Python tracker 

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



[issue27231] Support the fspath protocol in the posixpath module

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

This patch adds a number of os.fspath calls to the posixpath.py module. I 
didn't duplicate all tests to check PathLike objects in addition str/bytes, 
because that seemed excessive. Instead I tried to ensure that each function has 
at least one test checking that it accepts PathLike objects.

--
keywords: +patch
Added file: http://bugs.python.org/file43241/issue27231.patch

___
Python tracker 

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



[issue27111] redundant variables in long_add and long_sub

2016-06-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oren, could you please sign a Contributor Licensing Agreement?

http://www.python.org/psf/contrib/contrib-form/
http://www.python.org/psf/contrib/

--

___
Python tracker 

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



[issue27224] IDLE: editor versus grep line number differ

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

FWIW, using an IDLE built from the current top-of-trunk default (on OS X), the 
steps outlined above produce the correct result, 226 and 236, which match up 
with what other tools report.

--
nosy: +ned.deily

___
Python tracker 

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



[issue21130] equivalent functools.partial instances should compare equal

2016-06-05 Thread Emanuel Barry

Emanuel Barry added the comment:

Shakur - Feel free to take over and work on it.

Serhiy - I don't think that partial(func) == func should be, in the same sense 
that (0, 1, 2), [0, 1, 2] and range(3) aren't equal even though they 
fundamentally represent the same thing.

--

___
Python tracker 

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



[issue27188] sqlite3 execute* methods return value not documented

2016-06-05 Thread Berker Peksag

Berker Peksag added the comment:

Could you also change the function signatures from

.. method:: execute(sql, [parameters])

to

.. method:: execute(sql[, parameters])

and document that parameters should be list (or sequence or iterable -- I'm a 
the airport now so I can't check what is the correct term)?

I'm not a native speaker but this sentence sounds a bit weird to me:

This is a nonstandard shortcut that creates a cursor object by calling the 
cursor method, calls the cursor's :meth:`execute ` [...]

Perhaps it can be changed to


This is a nonstandard shortcut that creates a cursor object by calling the 
cursor's :meth:`execute ` method [...]

Also, please change the following usages

:meth:`execute `

with

:meth:`~Cursor.execute`

--
versions: +Python 3.5

___
Python tracker 

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



[issue27156] IDLE: remove unused code

2016-06-05 Thread Ned Deily

Ned Deily added the comment:

> Ned, do you have any objection to removing these now, for 3.6?

No, go right ahead.  Nobody should be using them.  And I concur with keeping 
the others around for the time being.

--

___
Python tracker 

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



[issue27234] tuple - single value with comma is assigned as type tuple

2016-06-05 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Yes, it is intended. Commas create tuples, not parentheses. (With the exception 
of the empty tuple.) The parens are just for grouping and precedence. `1,` is a 
tuple, regardless of whether you use parens around it or not.

--
nosy: +steven.daprano
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



[issue21130] equivalent functools.partial instances should compare equal

2016-06-05 Thread shakur shams Mullick

shakur shams Mullick added the comment:

Emanuel Barry if you want to take it over, I will stop and will not modify my 
patch further. Otherwise please let me know.

--

___
Python tracker 

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



[issue27234] tuple - single value with comma is assigned as type tuple

2016-06-05 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Yes, this is intentional. It is documented in 
https://docs.python.org/3/reference/expressions.html#expression-lists: 

"The trailing comma is required only to create a single tuple"

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



  1   2   >