[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 01885f78b299 by Martin Panter in branch '2.7': Issue #26439: Document that RTLD_NOW is always added https://hg.python.org/cpython/rev/01885f78b299 New changeset 0db4403e62c4 by Martin Panter in branch '3.5': Issue #26439: Document that RTLD_NOW is

[issue28207] Use pkg-config to find dependencies

2016-09-26 Thread Kubilay Kocak
Kubilay Kocak added the comment: This (adding support for pkg-config) should be done in tandem with adding --with-foo-{include,library} arguments for each *external* dependency, which can be used for: libffi, readline, libintl, openssl, sqlite, db*, among others. Values obtained from

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch LGTM except tests. But we should at least document the behavior of itermonthdates(), monthdatescalendar() and yeardatescalendar() at corner cases. -- ___ Python tracker

[issue28207] Use pkg-config to find dependencies

2016-09-26 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Yes pkg-config is not ubiquitous. My idea is using it as a fallback, so that non-standard paths can be picked up easily. > Note the bootstrap issue with that idea though; you'll need to make sure > _posixsubprocess is built before importing subprocess.

[issue18844] allow weights in random.choice

2016-09-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: ### # Flipping a biased coin from collections import Counter from random import choices print(Counter(choices(range(2), [0.9, 0.1], k=1000)))

[issue18844] allow weights in random.choice

2016-09-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Equidistributed examples: choices(c.execute('SELECT name FROM Employees').fetchall(), k=20) choices(['hearts', 'diamonds', 'spades', 'clubs'], k=5) choices(list(product(card_facevalues, suits)), k=5) Weighted selection examples:

[issue18844] allow weights in random.choice

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 39a4be5e003d by Raymond Hettinger in branch '3.6': Issue #18844: Make the number of selections a keyword-only argument for random.choices(). https://hg.python.org/cpython/rev/39a4be5e003d -- ___ Python

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Xiang Zhang
Xiang Zhang added the comment: Patch LGTM. > I would rather not mess up with itermonthdates(), particularly in a bugfix > release. We can postpone the discussion of a better way to handle date > over/underflow in itermonthdates() until 3.7. Before finally find a better way, can we at least

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2016-09-26 Thread Bert JW Regeer
Bert JW Regeer added the comment: Updated versions this applies to. -- versions: +Python 3.3, Python 3.4, Python 3.6, Python 3.7 ___ Python tracker ___

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2016-09-26 Thread Bert JW Regeer
Changes by Bert JW Regeer : -- nosy: +berker.peksag ___ Python tracker ___ ___

[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2016-09-26 Thread Bert JW Regeer
Bert JW Regeer added the comment: On line #890 in self.make_file() the check for _binary_file should be changed to also check for self.length >= 0. https://github.com/python/cpython/blob/3.4/Lib/cgi.py#L890 becomes: if self._binary_file or self.length >= 0: _binary_file is only ever set if

[issue27308] Inconsistency in cgi.FieldStorage() causes unicode/byte TypeError.

2016-09-26 Thread Bert JW Regeer
Bert JW Regeer added the comment: This is not a duplicate of https://bugs.python.org/issue24764 -- nosy: +X-Istence ___ Python tracker ___

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2016-09-26 Thread Martin Panter
Martin Panter added the comment: The purpose of the test seems to be to check that finding and loading works for widely-available libraries. However I suspect find_library("c") can fail on other platforms as well. Presumably that is why there is the special case for Cygwin at the top of the

[issue28282] find_library("c") defers to find_msvcrt()

2016-09-26 Thread Martin Panter
New submission from Martin Panter: Issue 1793 added ctypes.util.find_msvcrt(), and special cases that map find_library("c") and "m" to the new function. However this contradicts the documentation : ‘On Windows, . . . a

[issue27873] multiprocessing.pool.Pool.map should take more than one iterable

2016-09-26 Thread naught101
naught101 added the comment: It would be helpful if the docs at https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.map and in `help(Pool.map)` mentioned starmap in a "see also" section at the bottom. -- nosy: +naught101

[issue28147] Unbounded memory growth resizing split-table dicts

2016-09-26 Thread INADA Naoki
Changes by INADA Naoki : -- versions: +Python 3.5 ___ Python tracker ___ ___

[issue26650] calendar: OverflowErrors for year == 1 and firstweekday > 0

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: My patch for issue 28253 fixes this problem for itermonthdays2() and itermonthdays() methods. As discussed there, fixing itermonthdates() would require changing a documented public interface. -- assignee: -> belopolsky nosy: +belopolsky

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue28253-4.diff is issue28253-3.diff with tests. -- Added file: http://bugs.python.org/file44837/issue28253-4.diff ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue28253-3.diff uses itertools.repeat(). -- Added file: http://bugs.python.org/file44836/issue28253-3.diff ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue28253-2.diff is a small performance improvement over issue28253.diff -- Added file: http://bugs.python.org/file44835/issue28253-2.diff ___ Python tracker

[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-26 Thread STINNER Victor
STINNER Victor added the comment: I dislike this change. Python is not responsible to check parameters of OS syscalls, this function should be a thin wrapper to the OS function. Linux may add new flags in the future. Le lundi 26 septembre 2016, Roundup Robot a écrit :

[issue28281] Remove year limits from calendar

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +doerwalter ___ Python tracker ___ ___

[issue8957] strptime(.., '%c') fails to parse output of strftime('%c', ..) in some locales

2016-09-26 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- versions: +Python 3.7 -Python 3.5 ___ Python tracker ___

[issue27897] Avoid possible crash in pysqlite_connection_create_collation

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Thank you for your patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27897] Avoid possible crash in pysqlite_connection_create_collation

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1aae9b7ff321 by Serhiy Storchaka in branch '2.7': Issue #27897: Backported tests. https://hg.python.org/cpython/rev/1aae9b7ff321 -- ___ Python tracker

[issue27897] Avoid possible crash in pysqlite_connection_create_collation

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset c739660489c1 by Serhiy Storchaka in branch '3.5': Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation() https://hg.python.org/cpython/rev/c739660489c1 New changeset c2eb90422aec by Serhiy Storchaka in branch '3.6': Issue

[issue28279] setuptools failing to read from setup.cfg only in Python 3.6

2016-09-26 Thread Roy Williams
Changes by Roy Williams : -- type: -> behavior ___ Python tracker ___ ___

[issue24098] Multiple use after frees in obj2ast_* methods

2016-09-26 Thread Berker Peksag
Berker Peksag added the comment: Please note that Python/Python-ast.c is automatically generated by Parser/asdl_c.py. -- nosy: +benjamin.peterson, berker.peksag ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > unless we remove all date limits that is much harder issue I don't think this is too hard. I think the original implementation did not have date limits. I've opened a separate issue for this. See #28281. --

[issue28281] Remove year limits from calendar

2016-09-26 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: The calendar module currently relies on datetime for some calculations and is therefore restricted to years 1 through . With exception to some public methods that are documented to return datetime.date instances, this dependence on the datetime

[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac24e5c2fd3e by Berker Peksag in branch 'default': Issue #20100: Simplify newPyEpoll_Object() https://hg.python.org/cpython/rev/ac24e5c2fd3e -- ___ Python tracker

[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-26 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: > Jim ask for a backport. Sorry Jim, was replying from my email client, didn't see all messages. > This is arguably a security issue because it's a DoS vector. Yeah, I can see why. I can commit this to 3.4 in a week. Christian, feel free to commit this if

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am attaching the proposed reimplementation of itermonthdays2() and itermonthdays(). It does not use itermonthdates() and is not that complicated. It passes test_calendar, but I did not test it further than that. I would rather not mess up with

[issue27897] Avoid possible crash in pysqlite_connection_create_collation

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka stage: -> patch review versions: +Python 3.7 ___ Python tracker

[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 112060f8abe8 by Berker Peksag in branch '3.5': Issue #10673: Document that Process.exitcode can be used to determine timeout https://hg.python.org/cpython/rev/112060f8abe8 New changeset 0414ce8a3b5c by Berker Peksag in branch '3.6': Issue #10673:

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-09-26 Thread Jim Fulton
Jim Fulton added the comment: This is arguably a security issue because it's a DoS vector. I don't feel strongly about it though. -- ___ Python tracker

[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2016-09-26 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Tom. -- components: -Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: Jim ask for a backport. In case the problem is not a security issue that needs to be backported, feel free to close the ticket. -- ___ Python tracker

[issue27914] Incorrect comment in PyModule_ExcDef

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! -- nosy: +serhiy.storchaka resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 -Python 3.5 ___ Python tracker

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: Isn't 3.4 in security fixes only mode? -- status: pending -> open ___ Python tracker ___

[issue27914] Incorrect comment in PyModule_ExcDef

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2cf16c627c17 by Serhiy Storchaka in branch '3.6': Issue #27914: Fixed a comment in PyModule_ExcDef. https://hg.python.org/cpython/rev/2cf16c627c17 New changeset a944b08d1ac7 by Serhiy Storchaka in branch 'default': Issue #27914: Fixed a comment in

[issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py

2016-09-26 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset e9f34d382eda by Berker Peksag in branch '3.5': Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py https://hg.python.org/cpython/rev/e9f34d382eda New changeset 708337cd8e6a by Berker Peksag in branch '3.6': Issue #18893:

[issue28144] Decrease empty_keys_struct's dk_refcnt

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5d80a8e16edd by Serhiy Storchaka in branch '3.6': issue #28144: Decrease empty_keys_struct's dk_refcnt https://hg.python.org/cpython/rev/5d80a8e16edd New changeset a579a0354d85 by Serhiy Storchaka in branch 'default': issue #28144: Decrease

[issue28144] Decrease empty_keys_struct's dk_refcnt

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch Xiang Zhang! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28144] Decrease empty_keys_struct's dk_refcnt

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka components: +Interpreter Core nosy: +serhiy.storchaka stage: -> patch review type: -> enhancement versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue28222] test_distutils fails

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Distutils nosy: +dstufft, eric.araujo stage: -> needs patch ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, the current documentation is an impossibility (unless we remove all date limits that is much harder issue). Raisin OverflowError will make the implementation of itermonthdays2() and itermonthdays() more complex. Yielding dummy instances or None

[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-09-26 Thread Christian Heimes
Changes by Christian Heimes : -- assignee: christian.heimes -> versions: -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___

[issue28255] TextCalendar.prweek/month/year outputs an extra whitespace character

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually the behavior of the print statement in Python 2 is more complex. "print x," doesn't output a space after x, but sets the softspace attribute of the file to true (unless x is a string ending with non-space whitespace character like \n or \t). print

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: Yuri, are you going to backport the fix to 3.4? -- assignee: -> yselivanov nosy: +christian.heimes status: open -> pending versions: -Python 3.5 ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > itermonthdates() is documented public method The current documentation is an impossibility: "The iterator will yield datetime.date values and will always iterate through complete weeks, so it will yield dates outside the specified month." The current

[issue28182] Expose OpenSSL verification results in SSLError

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: For hostname verification it might be a good idea to add a replacement for ssl.CertificateError. -- ___ Python tracker

[issue27141] Fix collections.UserList shallow copy

2016-09-26 Thread Bar Harel
Bar Harel added the comment: I personally prefer the __copy__ mechanism as I think a bugfix shouldn't be 10% backwards compatible, chances of issues are low, and it's cleaner, more efficient and how things should be. -- ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Note that the stop on date.max behavior was introduced in #15421. -- ___ Python tracker ___

[issue27141] Fix collections.UserList shallow copy

2016-09-26 Thread Bar Harel
Changes by Bar Harel : Added file: http://bugs.python.org/file44833/issue27141_patch_rev1_opt2.patch ___ Python tracker ___

[issue27141] Fix collections.UserList shallow copy

2016-09-26 Thread Bar Harel
Bar Harel added the comment: Alright. 2 patches are available. opt_1 makes the use of __copy__. Advantages: - Clean - Does not affect pickling at all - More memory efficient Disadvantages: - Might be missing something from the normal copy mechanism (e.g. UserList doesn't implement

[issue28194] Clean up some checks in dict implementation

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28194] Clean up some checks in dict implementation

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1d41d741bb5b by Serhiy Storchaka in branch '3.6': Issue #28194: Clean up some checks in dict implementation. https://hg.python.org/cpython/rev/1d41d741bb5b New changeset b83a70afca39 by Serhiy Storchaka in branch 'default': Issue #28194: Clean up

[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2016-09-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyMapping_Keys(), PyMapping_Values() and PyMapping_Items() can return a list or tuple (because they use PySequence_Fast). But end users of this API often work only with lists and raise an exception if corresponding mapping methods return an instance of

[issue28278] Make `weakref.WeakKeyDictionary.__repr__` meaningful

2016-09-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: Well, I could see a "friendly" repr being avoided to: 1. Save work (iterating safely involves iteration guards and explicitly acquiring strong references to every key) 2. Avoid pretending the state is stable (the repr at time X could be different at time

[issue28211] Wrong return value type in the doc of PyMapping_Keys/Values/Items

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report and patch Xiang Zhang! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue28211] Wrong return value type in the doc of PyMapping_Keys/Values/Items

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 68fc808bed9f by Serhiy Storchaka in branch '3.5': Issues #25909, #28211: Restored correct documentation of PyMapping_Items, https://hg.python.org/cpython/rev/68fc808bed9f New changeset 21336392a680 by Serhiy Storchaka in branch '3.6': Issues

[issue25909] Incorrect documentation for PyMapping_Items and like

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 68fc808bed9f by Serhiy Storchaka in branch '3.5': Issues #25909, #28211: Restored correct documentation of PyMapping_Items, https://hg.python.org/cpython/rev/68fc808bed9f New changeset 21336392a680 by Serhiy Storchaka in branch '3.6': Issues

[issue28207] Use pkg-config to find dependencies

2016-09-26 Thread Ned Deily
Ned Deily added the comment: Any solution using pkg-config would need to take into account that pkg-config may not be available (by default) on platforms we support; for example, AFAIK, Apple does not ship pkg-config in the base OS or any of its developer tools. And the solution would need

[issue25909] Incorrect documentation for PyMapping_Items and like

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems I was wrong. PyDict_Keys/PyDict_Values/PyDict_Items return a list in Python 3. Thus comments in Include/abstract.h were correct. Xiang Zhang noticed this in issue28211. -- ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: itermonthdates() is documented public method. We should do something with it. Maybe emitting dummy data instances is the simplest way to solve this issue. -- ___ Python tracker

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On the second thought, I don't see why itermonthdays2() and itermonthdays() need to use itermonthdates() at all. It looks like it is easy to implement those using monthrange() and some simple integer arithmetics. --

[issue28279] setuptools failing to read from setup.cfg only in Python 3.6

2016-09-26 Thread Roy Williams
New submission from Roy Williams: Howdy, I'm attempting to make a change to the mock package in Python (related to http://bugs.python.org/issue28260), and it appears their CI is broken in Python 3.6 only. The problem appears to originate from setuptools, but this only fails in Python 3.6

[issue28253] calendar.prcal(9999) output has a problem

2016-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would leave itermonthdates() alone and just fix itermonthdays2() (and itermonthdays() for consistency) as Xiang suggested. The fix can be implemented by breaking on date.month != month and adding something like for wd in range(date.weekday(), 7):

[issue23591] enum: Add Flags and IntFlags

2016-09-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: The "What’s New In Python 3.6" page should really get an update to mention Flag, IntFlag and auto as enhancements to the enum module. Right now, the ssl module update docs mentions (but does not properly link for some reason) IntFlag, but otherwise, there is

[issue28278] Make `weakref.WeakKeyDictionary.__repr__` meaningful

2016-09-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +fdrake, pitrou versions: +Python 3.7 -Python 3.6 ___ Python tracker ___

[issue28278] Make `weakref.WeakKeyDictionary.__repr__` meaningful

2016-09-26 Thread Ram Rachum
New submission from Ram Rachum: Both `WeakKeyDictionary` and `WeakValueDictionary` have opaque `__repr__` methods: >>> x = weakref.WeakKeyDictionary({object: 2, type: 4,}) >>> x >>> dict(x) {: 4, : 2} This makes it annoying to view them at a glance. Is there a reason for it? (I don't know,

[issue28190] Detect curses headers correctly for cross-compiling

2016-09-26 Thread Matthias Klose
Matthias Klose added the comment: looks good to me, thanks for working on this. -- ___ Python tracker ___ ___

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-09-26 Thread Michael Felt
Michael Felt added the comment: Sigh - missed the feature cutoff that would have made this easier to get into python... Anyway - have learned a few new things about python def: syntax and removed some bits that I thought were suitable for variable "initialization" - but tend to be static

[issue24933] socket.recv(size, MSG_TRUNC) returns more than size bytes

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: Ah, I misunderstood MSG_TRUNC. It's not a buffer overflow. MSG_TRUNC does not write beyond the end of the buffer. In this example the libc function recv() writes two bytes into the buffer but returns a larger value than 2. --- import socket a, b =

[issue24933] socket.recv(size, MSG_TRUNC) returns more than size bytes

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: MSG_TRUNC literally causes a buffer overflow. In the example sock_recv() and friends only allocate a buffer of size 1 on the heap. With MSG_TRUNC recv() ignores the maximum size and writes beyond the buffer. We cannot recover from a buffer overflow because

[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2016-09-26 Thread SpaceOne
SpaceOne added the comment: Nice that you investigate again into this issue. Could you please test if this still happens on python 2.7.10 as I unfortunately have no environment with that version. This would be very kind of you! -- ___ Python

[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2016-09-26 Thread R. David Murray
R. David Murray added the comment: Christian: it looks like, unlike the original report, this one involves only stdlib code. So maybe there really is a bug here. -- ___ Python tracker

[issue28207] Use pkg-config to find dependencies

2016-09-26 Thread Zachary Ware
Zachary Ware added the comment: Note the bootstrap issue with that idea though; you'll need to make sure _posixsubprocess is built before importing subprocess. -- ___ Python tracker

[issue28275] LZMADecompressor.decompress Use After Free

2016-09-26 Thread Christian Heimes
Changes by Christian Heimes : -- priority: normal -> critical versions: +Python 3.6, Python 3.7 ___ Python tracker ___

[issue18880] ssl.SSLSocket shutdown doesn't behave like socket.shutdown

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: Sounds fine, but it's not a security issue. I'm re-targeting the bug for 3.7. -- assignee: christian.heimes -> nosy: -giampaolo.rodola stage: -> patch review type: security -> behavior versions: +Python 3.7 -Python 2.7, Python 3.2, Python 3.3,

[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: You get advice on the Python user mailing list, https://mail.python.org/mailman/listinfo/python-list . The bug tracker is not a support/help forum. -- nosy: +christian.heimes stage: -> resolved ___ Python

[issue23245] urllib2: urlopen() gets exception(kwargs bug?)

2016-09-26 Thread SpaceOne
SpaceOne added the comment: Hello, The resolution of this bug is "not a bug". If that is the case can you please add information how to fix/workaround this. I have got the following valid-seeming code: """ import cookielib import urllib import urllib2 cookie = cookielib.CookieJar() opener =

[issue17305] IDNA2008 encoding missing

2016-09-26 Thread Christian Heimes
Changes by Christian Heimes : -- assignee: christian.heimes -> ___ Python tracker ___ ___

[issue24201] _winreg PyHKEY Type Confusion

2016-09-26 Thread Steve Dower
Steve Dower added the comment: Agreed. -- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue17305] IDNA2008 encoding missing

2016-09-26 Thread Christian Heimes
Changes by Christian Heimes : -- assignee: -> christian.heimes components: +SSL priority: normal -> high versions: +Python 3.7 -Python 3.5 ___ Python tracker

[issue24098] Multiple use after frees in obj2ast_* methods

2016-09-26 Thread Christian Heimes
Changes by Christian Heimes : -- priority: normal -> high stage: needs patch -> patch review versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue24098] Multiple use after frees in obj2ast_* methods

2016-09-26 Thread paul
paul added the comment: Fix by replacing static 'len' in loops with a macro, so that mutations of size of the containter do not casue OOB reads. -- keywords: +patch Added file: http://bugs.python.org/file44830/issue24098.patch ___ Python tracker

[issue28272] a redundant check in maybe_small_long

2016-09-26 Thread Oren Milman
Oren Milman added the comment: my build (release): Python 3.7.0a0 (default:da2c96cf2ce6, Sep 26 2016, 13:08:47) [MSC v.1900 32 bit (Intel)] on win32 ISTM we can close this issue. -- ___ Python tracker

[issue28272] a redundant check in maybe_small_long

2016-09-26 Thread Antti Haapala
Antti Haapala added the comment: Totally inlined when built with GCC, release mode, there is no trace of the maybe_small_long symbol, I couldn't even really decipher where it was being done in the disassembly of longobject.c. Was this the Windows release build? -- nosy: +ztane

[issue28277] ./Modules/_io/_iomodule.c build failure on AIX (beta1) while (a2) was fine.

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: Michael, does the fix work for you? -- nosy: +christian.heimes ___ Python tracker ___

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2016-09-26 Thread Michael Felt
Michael Felt added the comment: The assert to be added is much more simple: i.e., self.assertTrue(lib) And then you get something like: root@x064:[/data/prj/python/python-3.6.0.177/Lib/ctypes/test]../../../python -m unittest test_loading.py libc_name is libc.a(shr.o) sslib is None F.sss

[issue28277] ./Modules/_io/_iomodule.c build failure on AIX (beta1) while (a2) was fine.

2016-09-26 Thread Christian Heimes
Changes by Christian Heimes : -- stage: -> commit review versions: +Python 3.7 ___ Python tracker ___

[issue28277] ./Modules/_io/_iomodule.c build failure on AIX (beta1) while (a2) was fine.

2016-09-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 26c73ee77fbb by Christian Heimes in branch '3.6': Issue #28277: remove linefeed character from iomodule.h. Patch by Michael Felt https://hg.python.org/cpython/rev/26c73ee77fbb New changeset b77bd401f08a by Christian Heimes in branch 'default':

[issue28207] Use pkg-config to find dependencies

2016-09-26 Thread Christian Heimes
Christian Heimes added the comment: Simple implementation idea: * add a pkg_config option to Extension() * run subprocess.call(["pkg-config", self.pkg_config, "--exists"]) * if return value is 0, extend self.extra_compile_args with ["pkg-config", self.pkg_config, "--cflags"] and

[issue28277] ./Modules/_io/_iomodule.c build failure on AIX (beta1) while (a2) was fine.

2016-09-26 Thread Michael Felt
New submission from Michael Felt: Python-3.6.0.a2 (a2 == 162) root@x064:[/data/prj/python/python-3.6.0.162]xlc -DNDEBUG -O -I/opt/include -qmaxmem=-1 -qarch=pwr4 -O3 -I/opt/buildaix/includes -O -I. -IInclude -I./Include -I/opt/include -I/opt/buildaix/inclu de -DPy_BUILD_CORE

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2016-09-26 Thread Michael Felt
Changes by Michael Felt : -- components: +ctypes ___ Python tracker ___ ___

[issue28276] test_loading.py - false positive result for "def test_find" when find_library() is not functional or the (shared) library does not exist

2016-09-26 Thread Michael Felt
New submission from Michael Felt: in Lib/ctypes/test/test_loading.py there is the following test def test_find(self): for name in ("c", "m"): lib = find_library(name) if lib: cdll.LoadLibrary(lib) CDLL(lib) 1. on AIX, the

  1   2   >