[issue23364] integer overflow in itertools.product

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 2**16 * 2**16 * sizeof(Py_ssize_t) = 16GiB -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23364] integer overflow in itertools.product

2015-02-01 Thread paul
paul added the comment: Why do you think this test needs 16GiB? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue23099] BytesIO and StringIO values unavailable when closed

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue23375] test_py3kwarn fails on Windows

2015-02-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: http://buildbot.python.org/all/builders/x86%20XP-4%202.7/builds/3092/steps/test/logs/stdio == FAIL: test_optional_module_removals (test.test_py3kwarn.TestStdlibRemovals)

[issue23365] integer overflow in itertools.combinations_with_replacement

2015-02-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue23366] integer overflow in itertools.combinations

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This commit (and three other) causes compiler warnings: ./Modules/itertoolsmodule.c: In function ‘product_new’: ./Modules/itertoolsmodule.c:2025:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (repeat > PY_

[issue23364] integer overflow in itertools.product

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: +with self.assertRaises(OverflowError): +product(["a"]*(2**16), repeat=2**16) The test needs 16GiB. May be use repeat=2**13? -- nosy: +serhiy.storchaka status: closed -> open ___ Python tracker

[issue23363] integer overflow in itertools.permutations

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: An overflow in n * sizeof(Py_ssize_t) is not possible because n is the length of already allocated array of pointers. +with self.assertRaises(OverflowError): +permutations("A", 2**30) The test needs 4GiB. May be use 2**29? +with

[issue12916] Add inspect.splitdoc

2015-02-01 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: On 1 Feb 2015, at 22:03, Martin Panter wrote: > Martin Panter added the comment: > > Yes, this is based on your patch, Stéphane. On top of it I added > support for splitdoc(None), and made the other changes in the bullet > points. Great good news. Hope thes

[issue7434] general pprint rewrite

2015-02-01 Thread Zeke
Changes by Zeke : -- nosy: +Ezekiel.Fairfax ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue23365] integer overflow in itertools.combinations_with_replacement

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The test needs 4GiB. May be use 2**29? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Pytho

[issue23099] BytesIO and StringIO values unavailable when closed

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Here is an option that moves the documentation for discarding the buffer into the class description for both BytesIO and StringIO; what do you think? I would be happy enough with any of the last three patches, so I don’t want to hold this up forever :) ---

[issue23357] pyvenv help shows incorrect usage

2015-02-01 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +vinay.sajip stage: -> patch review versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs

[issue23254] Document how to close the TCPServer listening socket

2015-02-01 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue23363] integer overflow in itertools.permutations

2015-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7133582b6769 by Benjamin Peterson in branch '3.3': check for overflows in permutations() and product() (closes #23363, closes #23364) https://hg.python.org/cpython/rev/7133582b6769 New changeset 9ae055c3db32 by Benjamin Peterson in branch '3.4': me

[issue23364] integer overflow in itertools.product

2015-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7133582b6769 by Benjamin Peterson in branch '3.3': check for overflows in permutations() and product() (closes #23363, closes #23364) https://hg.python.org/cpython/rev/7133582b6769 New changeset 9ae055c3db32 by Benjamin Peterson in branch '3.4': me

[issue23360] Content-Type when sending data with urlopen()

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Updated patch to explain that a Request object is generated internally for urlopen(data=...), and added a test to confirm. Also removed some confusing dead code. -- Added file: http://bugs.python.org/file37972/non-urlencoded.2.patch ___

[issue16632] Enable DEP and ASLR

2015-02-01 Thread Ricky Zhou
Ricky Zhou added the comment: Sorry to revive this old bug, but would it be possible to get ASLR/DEP for windows on the 2.7 branch as well? Also, re Christian's comment about DEP being disabled if a single libray doesn't support it - are you sure that's the case? I'm very new to windows stuff

[issue23365] integer overflow in itertools.combinations_with_replacement

2015-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 93d445cd5f70 by Benjamin Peterson in branch '3.3': check for overflow in combinations_with_replacement (closes #23365) https://hg.python.org/cpython/rev/93d445cd5f70 New changeset 2e7a02e4cf2c by Benjamin Peterson in branch '3.4': merge 3.3 (#23365)

[issue23366] integer overflow in itertools.combinations

2015-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 014886dae5c4 by Benjamin Peterson in branch '3.3': detect overflow in combinations (closes #23366) https://hg.python.org/cpython/rev/014886dae5c4 New changeset 2f73de7ffcf5 by Benjamin Peterson in branch '3.4': merge 3.3 (#23366) https://hg.python.o

[issue23373] curses.textpad crashes in insert mode on wide window

2015-02-01 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. This is a duplicate of issue 13051. The insert_mode parameter was committed in issue 1048820. -- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Infinite recursion in curses

[issue22623] Missing guards for some POSIX functions

2015-02-01 Thread Link Mauve
Link Mauve added the comment: This issue is still present in latest 3.5, all the way down to 2.7. -- components: +Extension Modules -Build versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file37971/guards.diff _

[issue22623] Missing guards for some POSIX functions

2015-02-01 Thread Link Mauve
Changes by Link Mauve : Removed file: http://bugs.python.org/file36898/f3cf19e38efe.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue23369] integer overflow in _json.encode_basestring_ascii

2015-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8699b3085db3 by Benjamin Peterson in branch '3.3': fix possible overflow in encode_basestring_ascii (closes #23369) https://hg.python.org/cpython/rev/8699b3085db3 New changeset 4f47509d7417 by Benjamin Peterson in branch '3.4': merge 3.3 (#23369) ht

[issue23374] pydoc 3.x raises UnicodeEncodeError on sqlite3 package

2015-02-01 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, Martin expressed the same thing better. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: from_buffer() uses a memory buffer of other object. It keeps a reference to the object to prevent deallocation of memory when there will be no more external references. But this doesn't prevent from reallocating of memory of living object (e.g. for resizing

[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-01 Thread Martin Panter
Martin Panter added the comment: _CData.from_buffer() is meant to take a writable buffer, and create a “ctypes” object that shares the same memory. So it should not release the buffer until that “ctypes” object is no longer needed. However I don’t know the insides of memoryview() objects that

[issue22818] Deprecate splitting on possible zero-width re patterns

2015-02-01 Thread Ezio Melotti
Ezio Melotti added the comment: DeprecationWarning: Base class for warnings about deprecated features. UserWarning: Base class for warnings generated by user code. RuntimeWarning: Base class for warnings about dubious runtime behavior. FutureWarning: Base class for warnings about constructs that

[issue23374] pydoc 3.x raises UnicodeEncodeError on sqlite3 package

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Maybe because a pager sends its bytes more-or-less straight throught from input to output, the PYTHONIOENCODING (sys.stdout.encoding?) should be used for the TextIOWrapper to the pager’s input in this case. I’m not so sure this should be assumed in general thou

[issue23369] integer overflow in _json.encode_basestring_ascii

2015-02-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue23368] integer overflow in _PyUnicode_AsKind

2015-02-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue23364] integer overflow in itertools.product

2015-02-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue23366] integer overflow in itertools.combinations

2015-02-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue23367] integer overflow in unicodedata.normalize

2015-02-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue23361] integer overflow in winapi_createprocess

2015-02-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue23365] integer overflow in itertools.combinations_with_replacement

2015-02-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue23363] integer overflow in itertools.permutations

2015-02-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue23362] integer overflow in string translate

2015-02-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue12916] Add inspect.splitdoc

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Yes, this is based on your patch, Stéphane. On top of it I added support for splitdoc(None), and made the other changes in the bullet points. -- ___ Python tracker

[issue23374] pydoc 3.x raises UnicodeEncodeError on sqlite3 package

2015-02-01 Thread Skip Montanaro
Skip Montanaro added the comment: Final note here. Peter also did a bit of digging. Here's his note about what he found on c.l.py: The pager is invoked by os.popen(), and after some digging I find that it uses a io.TestIOWrapper() to write the help text. This in turn uses locale.getpreferredenco

[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-01 Thread Stefan Krah
Stefan Krah added the comment: [Slow internet connection, can't use Rietveld.] CDataType_from_buffer(): I'm not that familiar with ctypes. What is the high level goal here? Allocate a chunk of memory, wrap it in a memoryview and have the memoryview release that memory when its refcount is 0?

[issue23374] pydoc 3.x raises UnicodeEncodeError on sqlite3 package

2015-02-01 Thread Skip Montanaro
Skip Montanaro added the comment: On Sun, Feb 1, 2015 at 2:19 PM, Skip Montanaro wrote: > The issue is that I didn't > mix my case properly when setting LANG: Actually, it's that the hyphen is required in "utf-8" or "UTF-8". -- ___ Python tracker <

[issue23374] pydoc 3.x raises UnicodeEncodeError on sqlite3 package

2015-02-01 Thread Skip Montanaro
Skip Montanaro added the comment: Peter Otten posted a solution on c.l.py. The issue is that I didn't mix my case properly when setting LANG: hgpython% LANG=en_US.UTF-8 python3.5 -c 'import locale; print(locale.getpreferredencoding(False))' UTF-8 hgpython% LANG=en_US.utf8 python3.5 -c 'import lo

[issue23374] pydoc 3.x raises UnicodeEncodeError on sqlite3 package

2015-02-01 Thread Skip Montanaro
Skip Montanaro added the comment: Without setting any environment variables: >>> import sys >>> sys.getfilesystemencoding() 'utf-8' >>> import locale >>> locale.getpreferredencoding(False) 'US-ASCII' >>> import os >>> os.popen('cat', 'w').encoding 'US-ASCII' If I set PYTHONIOENCODING=UTF-8: >>

[issue23374] pydoc 3.x raises UnicodeEncodeError on sqlite3 package

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What are sys.getfilesystemencoding(), locale.getpreferredencoding(False), os.popen('cat', 'w').encoding? -- nosy: +serhiy.storchaka ___ Python tracker __

[issue23374] pydoc 3.x raises UnicodeEncodeError on sqlite3 package

2015-02-01 Thread Skip Montanaro
New submission from Skip Montanaro: I'm probably doing something wrong, but I've tried everything I can think of without any success. In Python 2.7, the pydoc command successfully displays help for the sqlite3 package, though it muffs the output of Gerhard Häring's name, spitting out the origina

[issue23371] mimetypes initialization fails on Windows because of TypeError

2015-02-01 Thread Tim Golden
Tim Golden added the comment: It's right there on my to-do list which is, unfortunately, not getting any shorter. TJG On 01/02/2015 19:10, Steve Dower wrote: > > Steve Dower added the comment: > > Definitely a dup, though I don't have the number handy. There's a patch on > the other issue wai

[issue23371] mimetypes initialization fails on Windows because of TypeError

2015-02-01 Thread Steve Dower
Steve Dower added the comment: Definitely a dup, though I don't have the number handy. There's a patch on the other issue waiting for a mimetypes maintainer to step up. -- ___ Python tracker __

[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please look at the patch Stefan? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23372] defaultdict.fromkeys should accept a callable factory

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It may be written simpler: d = defaultdict(factory) for i in constants: d[i] or d = defaultdict(factory, {i: factory() for i in constants}) I'm inclined to reject this proposition. It serves very special use case. -- nosy: +serh

[issue23352] Document "suboffsets if needed" in 2.7

2015-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset c4c1d68b6301 by Stefan Krah in branch '2.7': Issue #23352: Document that Py_buffer.suboffsets must be NULL if no suboffsets https://hg.python.org/cpython/rev/c4c1d68b6301 New changeset de5c8ee002bf by Stefan Krah in branch '3.4': Issue #23352: Docum

[issue12916] Add inspect.splitdoc

2015-02-01 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Martin, you reused my own patch for this issue? -- ___ Python tracker ___ ___ Python-bugs-list m

[issue23359] Speed-up set_lookkey()

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are more ideas. I would probe to use set_lookkey_dummy_ignored() with following set_find_free_slot() (from set_faster_copy_2.patch in issue23290) if former hadn't find a key. If set hash == -1 for key == NULL, we can use only one comparison for testing

[issue23372] defaultdict.fromkeys should accept a callable factory

2015-02-01 Thread Alec Nikolas Reiter
Alec Nikolas Reiter added the comment: @SilentGhost I was playing with a voting algorithm (Instant Runoff, rather than traditional majority). Ultimately, I ended up using Counter in place of a defaultdict, but that's how I ended up noticing it. Not so much ensuring the content so much as setti

[issue23370] PyBuffer_FromContiguous() off-by-one error for non-contiguous buffers

2015-02-01 Thread Stefan Krah
Changes by Stefan Krah : -- resolution: -> fixed stage: needs patch -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue23370] PyBuffer_FromContiguous() off-by-one error for non-contiguous buffers

2015-02-01 Thread Stefan Krah
Changes by Stefan Krah : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue23372] defaultdict.fromkeys should accept a callable factory

2015-02-01 Thread SilentGhost
SilentGhost added the comment: Raymond, but Alec talks about defaultdict.fromkeys(constants, factory=list) as opposed to current solution d = defaultdict.fromkeys(constants) d.default_factory = list for i in d: d[i] = [] I wouldn't think that the dict.fromkeys should be affecte

[issue23370] PyBuffer_FromContiguous() off-by-one error for non-contiguous buffers

2015-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 209776d49a9a by Stefan Krah in branch '2.7': Issue #23370: Fix off-by-one error for non-contiguous buffers. https://hg.python.org/cpython/rev/209776d49a9a New changeset 4d95956a748e by Stefan Krah in branch '3.4': Issue #23370: Fix off-by-one error

[issue23359] Speed-up set_lookkey()

2015-02-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank Serhiy. No early-out on insertion is possible. For discard and contains, there is still no need for testing dummies and tracking freeslots. -- ___ Python tracker

[issue23371] mimetypes initialization fails on Windows because of TypeError

2015-02-01 Thread Stéphane Lenclud
Stéphane Lenclud added the comment: I don't think so. Here is the traceback btw: File "setup.py", line 18, in exec(init_file.read(), command_ns) File "", line 11, in File "c:\users\sl\appdata\local\temp\tmpoaaddk\setuptools-12.0.5\setuptools\__init__.py", line 11, in from setup

[issue23372] defaultdict.fromkeys should accept a callable factory

2015-02-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: -0 I could see some use cases for this, dict.fromkeys(contestants, factory=list), but it adds complexity to a core container API and it starts to overlap the use cases for collections.defaultdict(). Perhaps set comprehensions should remain the one-obvious-

[issue23371] mimetypes initialization fails on Windows because of TypeError

2015-02-01 Thread R. David Murray
R. David Murray added the comment: Is this a duplicate of issue 9291? -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-

[issue23372] defaultdict.fromkeys should accept a callable factory

2015-02-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue23362] integer overflow in string translate

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you want to provide a patch? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-

[issue23252] Add support of writing to unseekable file in zipfile

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. Mercurial wouldn't need a wrapper in Python 3.5. -- keywords: +patch nosy: +Matt.Mackall stage: needs patch -> patch review Added file: http://bugs.python.org/file37970/zipfile_write_unseekable.patch __

[issue23373] curses.textpad crashes in insert mode on wide window

2015-02-01 Thread Alex Martelli
New submission from Alex Martelli: http://stackoverflow.com/questions/28264353/stack-overflow-in-pythons-curses-is-it-bug-in-the-module/28264823#28264823 for details. a curses.textpad on a wide-enough window, in insert mode, causes a crash by recursion limit exceeded (in _insert_printable_char

[issue14099] ZipFile.open() should not reopen the underlying file

2015-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f96e9a8eee8 by Serhiy Storchaka in branch 'default': Don't seek to the start of the file when open ZipFile with the 'w' mode https://hg.python.org/cpython/rev/4f96e9a8eee8 -- ___ Python tracker

[issue23372] defaultdict.fromkeys should accept a callable factory

2015-02-01 Thread SilentGhost
SilentGhost added the comment: Correct me if I'm wrong but this seem as a very unlikely use case. Why would you need to ensure content of the defaultdict (i.e., why would you ever use its fromkeys method)? And, perhaps, having to implicitly assign default factory is not such a bad tradeoff, co

[issue23372] defaultdict.fromkeys should accept a callable factory

2015-02-01 Thread Alec Nikolas Reiter
New submission from Alec Nikolas Reiter: Not something I've noticed until today, but defaultdict.fromkeys only accepts an iterable of keys and an initial value. To set the default_factory for the newly created collection, you need to prod at the attribute itself. This isn't a huge issue for me

[issue23371] mimetypes initialization fails on Windows because of TypeError

2015-02-01 Thread Stéphane Lenclud
New submission from Stéphane Lenclud: On my Windows 7 installation mimetypes.py in read_windows_registry _winreg.OpenKey can throw a TypeError exception which is not handled and interrupts the execution. To fix it I added: except TypeError: continue To reproduce it I just need to run te f

[issue23370] PyBuffer_FromContiguous() off-by-one error for non-contiguous buffers

2015-02-01 Thread Stefan Krah
Changes by Stefan Krah : -- keywords: +patch Added file: http://bugs.python.org/file37969/issue23370.diff ___ Python tracker ___ ___ P

[issue23370] PyBuffer_FromContiguous() off-by-one error for non-contiguous buffers

2015-02-01 Thread Stefan Krah
New submission from Stefan Krah: Same as #23349. -- messages: 235178 nosy: skrah priority: normal severity: normal stage: needs patch status: open title: PyBuffer_FromContiguous() off-by-one error for non-contiguous buffers type: behavior versions: Python 2.7, Python 3.4, Python 3.5 ___

[issue22445] Memoryviews require more strict contiguous checks then necessary

2015-02-01 Thread Stefan Krah
Changes by Stefan Krah : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue23369] integer overflow in _json.encode_basestring_ascii

2015-02-01 Thread paul
New submission from paul: # static PyObject * # ascii_escape_unicode(PyObject *pystr) # { # ... # # input_chars = PyUnicode_GET_LENGTH(pystr); # input = PyUnicode_DATA(pystr); # kind = PyUnicode_KIND(pystr); # # /* Compute the output size */ # for (i = 0, output_size = 2

[issue23368] integer overflow in _PyUnicode_AsKind

2015-02-01 Thread paul
New submission from paul: # Bug # --- # # void* # _PyUnicode_AsKind(PyObject *s, unsigned int kind) # { # Py_ssize_t len; # ... # len = PyUnicode_GET_LENGTH(s); # ... # switch (kind) { # ... # case PyUnicode_4BYTE_KIND: # 1 result = PyMem_Malloc(len * sizeof(Py_

[issue23367] integer overflow in unicodedata.normalize

2015-02-01 Thread paul
New submission from paul: # Bug # --- # # static PyObject* # unicodedata_normalize(PyObject *self, PyObject *args) # { # ... # if (strcmp(form, "NFKC") == 0) { # if (is_normalized(self, input, 1, 1)) { # Py_INCREF(input); # return input; # } #

[issue23366] integer overflow in itertools.combinations

2015-02-01 Thread paul
New submission from paul: # Bug # --- # # static PyObject * # combinations_new(PyTypeObject *type, PyObject *args, PyObject *kwds) # { # ... # # 1 indices = PyMem_Malloc(r * sizeof(Py_ssize_t)); # ... # # for (i=0 ; i0, so we write well beyond the buffer's end # # Crash # -

[issue23365] integer overflow in itertools.combinations_with_replacement

2015-02-01 Thread paul
New submission from paul: # Bug # --- # # static PyObject * # cwr_new(PyTypeObject *type, PyObject *args, PyObject *kwds) # { # ... # 1 indices = PyMem_Malloc(r * sizeof(Py_ssize_t)); # ... # for (i=0 ; i0, so we write well beyond the buffer's end # # Crash # - # # Breakpoint

[issue22445] Memoryviews require more strict contiguous checks then necessary

2015-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 369300948f3f by Stefan Krah in branch 'default': Issue #22445: PyBuffer_IsContiguous() now implements precise contiguity https://hg.python.org/cpython/rev/369300948f3f -- nosy: +python-dev ___ Python trac

[issue23364] integer overflow in itertools.product

2015-02-01 Thread paul
New submission from paul: # Bug # --- # # static PyObject * # product_new(PyTypeObject *type, PyObject *args, PyObject *kwds) # { # ... # 1 nargs = (repeat == 0) ? 0 : PyTuple_GET_SIZE(args); # 2 npools = nargs * repeat; # # 3 indices = PyMem_Malloc(npools * sizeof(Py_ssize_t)); #

[issue23362] integer overflow in string translate

2015-02-01 Thread paul
New submission from paul: # Bug # --- # # PyObject * # _PyUnicode_TranslateCharmap(PyObject *input, # PyObject *mapping, # const char *errors) # { # ... # size = PyUnicode_GET_LENGTH(input); # ... # osize = size; # 1 outpu

[issue23363] integer overflow in itertools.permutations

2015-02-01 Thread paul
New submission from paul: # Bug # --- # # static PyObject * # permutations_new(PyTypeObject *type, PyObject *args, PyObject *kwds) # { # ... # 1 cycles = PyMem_Malloc(r * sizeof(Py_ssize_t)); # ... # for (i=0 ; i0, so we write well beyond the buffer's end # # Crash # - # # Br

[issue23361] integer overflow in winapi_createprocess

2015-02-01 Thread paul
New submission from paul: winapi_createprocess takes env_mapping dictionary as a parameter, mapping variables to their env. values. Dictionary with pathologically large values will cause an integer overflow during computation of total space required to store all key-value pairs File: Modules

[issue18454] distutils crashes when uploading to PyPI having only the username (no pw) defined

2015-02-01 Thread Geoffrey Spear
Changes by Geoffrey Spear : -- nosy: +geoffreyspear ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue5187] distutils upload should prompt for the user/password too

2015-02-01 Thread Geoffrey Spear
Changes by Geoffrey Spear : -- nosy: +geoffreyspear ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-02-01 Thread Ent
Ent added the comment: @vadmium: Thanks for the suggestion - I opted for the first one. While I wasn't happy with it being called twice, wasn't getting an idea of how to address it. Am I supposed to include your patch as part of my patch? I am not much knowledgeable about the protocol to follo

[issue23360] Content-Type when sending data with urlopen()

2015-02-01 Thread Martin Panter
New submission from Martin Panter: Currently the documentation gives the impression that the “data” parameter to Request() has to be in the application/x-www-form-urlencoded format. However I suspect that you can override the type by supplying a Content-Type header, and I would like to documen

[issue20204] pydocs fails for some C implemented classes

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which adds a warning to PyType_FromSpec and PyType_FromSpecWithBases if type spec name doesn't contain module name. In conjunction with tkinter_typespecs.patch it should fix the issue. -- stage: needs patch -> patch review Added file:

[issue15608] Improve socketserver doc

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Main changes in socketserver-doc.2.patch: * Documented constructor parameters for the server classes * Indented class methods and attributes underneath class headings -- Added file: http://bugs.python.org/file37957/socketserver-doc.2.patch _

[issue12916] Add inspect.splitdoc

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Uploading issue12916-splitdoc-5.patch: * Documented TypeError * Added stacklevel=2 to warning * Test improvements * Dropped the test for pydoc.splitdoc() removal -- Added file: http://bugs.python.org/file37956/issue12916-splitdoc-5.patch ___

[issue22818] Deprecate splitting on possible zero-width re patterns

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be RuntimeWarning or FutureWarning are more appropriate? -- ___ Python tracker ___ ___ Python-

[issue23352] Document "suboffsets if needed" in 2.7

2015-02-01 Thread Stefan Krah
Stefan Krah added the comment: But only Cython does not set suboffsets to NULL and you already have a small patch to fix that. The Python 3 docs say "suboffsets only if needed" and the PEP says the same, so the situation is not completely undocumented. I think your doc patch goes too far. Bu

[issue23055] PyUnicode_FromFormatV crasher

2015-02-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue23321] Crash in str.decode() with special error handler

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you have no enhancements to my quick fix Victor, may be this issue can be closed. -- status: open -> pending ___ Python tracker ___ __

[issue23099] BytesIO and StringIO values unavailable when closed

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it would be good to make the documentation of BytesIO and StringIO consistent. -- ___ Python tracker ___ ___

[issue22818] Deprecate splitting on possible zero-width re patterns

2015-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I hesitate about warning type. Originally I was going to emit a DeprecationWarning in 3.5, may be change it to a UserWarning in 3.6, and raise a ValueError or change behavior in 3.7. What would be better? -- ___ P

[issue19903] Idle: Use inspect.signature for calltips

2015-02-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: An example should make my concern clearer. str(signature(int)) is '()' because int (and all other builtins) has not been converted whereas the Idle calltip is int(x=0) -> integer int(x, base=10) -> integer I do not want to simply add a line with '()' to the

[issue19903] Idle: Use inspect.signature for calltips

2015-02-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: The above suggests that the change might be applied to 3.4. The difference surprises me because #17481 patched getfullargspec() to 'use' signature() 'behind the scenes', so I expected the result to be the same. It seems that 'use' does not mean what I though

[issue23352] PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL

2015-02-01 Thread Richard Hansen
Richard Hansen added the comment: My preference is to apply the patch, of course. There is a legitimate concern that it will break existing code, but I think there are more points in favor of applying the patch: * there exists code that the current behavior is known to break * it's easier

  1   2   >