Martijn Pieters added the comment:
This changes causes printing BeautifulSoup NavigableString objects to fail; the
code actually could never work as `unicode.__getslice__` insists on getting
passed in integers, not None.
To reproduce, create a new file in IDLE and paste in:
from bs4 import
Martijn Pieters added the comment:
Created a new issue: http://bugs.python.org/issue23583
--
___
Python tracker
<http://bugs.python.org/issue19481>
___
___
Pytho
New submission from Martijn Pieters:
This is a regression or recurrence of issue #19481.
To reproduce, create a subclass of unicode and try and print an instance of
that class:
class Foo(unicode): pass
print Foo()
results in a traceback:
Traceback (most recent call last):
File "&q
Changes by Martijn Pieters :
--
components: +IDLE
___
Python tracker
<http://bugs.python.org/issue23583>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martijn Pieters added the comment:
Proposed fix, replace line 1352-1353 in PseudoOutputFile.write():
if isinstance(s, unicode):
s = unicode.__getslice__(s, None, None)
with
if isinstance(s, unicode):
s = unicode.__getslice__(s, 0, len(s
Martijn Pieters added the comment:
I like the unicode.__getitem__(s, slice(None)) approach, it has the advantage
of not having to rely on len(s).
--
___
Python tracker
<http://bugs.python.org/issue23
New submission from Martijn Pieters:
The documentation for zipfile.ZipFile.extract() doesn't mention at all that it
returns the local path created, either for the directory that the member
represents, or the new file created from the zipped data.
*Returns the full local path creat
New submission from Martijn Pieters:
The collections.abc documentation implies that *any* of the container ABCs can
be used in an issubclass test against a class that implements all abstract
methods:
> These ABCs allow us to ask classes or instances if they provide particular
> functio
Martijn Pieters added the comment:
I should have added the mixin methods for the Sequence implementation; the more
complete demonstration is:
>>> from collections.abc import Sequence, Container, Sized
>>> class MySequence(object):
... def __contains__(self, item): pass
.
Martijn Pieters added the comment:
I'd be happy to provide a patch for the DictWriter.writerows code; I was
naively counting on it accepting an iterable and that it would not pull the
whole sequence into memory (while feeding it gigabytes of CSV data).
--
nosy: +mjpi
New submission from Martijn Pieters:
The `BINARY_MODULO` operator hardcodes a test for `PyUnicode`:
TARGET(BINARY_MODULO) {
PyObject *divisor = POP();
PyObject *dividend = TOP();
PyObject *res = PyUnicode_CheckExact(dividend
Martijn Pieters added the comment:
Here's a proposed patch for tip; what versions would it be worth backporting
this to?
(Note, there's no NEWS update in this patch).
--
keywords: +patch
Added file: http://bugs.python.org/file45338/issue2
Martijn Pieters added the comment:
This bug affects all use of `file.__iter__` and interrupts (EINTR), not just
sys.stdin.
You can reproduce the issue by reading from a (slow) pipe in a terminal window
and resizing that window, for example; the interrupt is not handled and a
future call ends
Martijn Pieters added the comment:
The Python 2.7 issue (using fread without checking for interrupts) looks like a
duplicate of http://bugs.python.org/issue1633941
--
nosy: +mjpieters
___
Python tracker
<http://bugs.python.org/issue21
Martijn Pieters added the comment:
It looks like readahead was missed when http://bugs.python.org/issue12268 was
fixed.
--
___
Python tracker
<http://bugs.python.org/issue1633
Martijn Pieters added the comment:
Follow-up bug, readahead was missed: http://bugs.python.org/issue1633941
--
nosy: +mjpieters
___
Python tracker
<http://bugs.python.org/issue12
101 - 116 of 116 matches
Mail list logo