Skip to content

Commit b83cac3

Browse files
committed
Remove incorrect call to pdb in backports.http.client (issue #164)
Previously there was a breakpoint triggered when the first two bytes of the data were "b'" for debugging purposes. This was being triggered by real data, e.g. http://data.openaddresses.io/runs/11158/au-queensland.zip. The data was retrieved correctly, however.
1 parent d100404 commit b83cac3

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

docs/whatsnew.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ What's New
88
What's new in version 0.15.1 (in development)
99
=============================================
1010

11-
- ``futurize``: Moved exec fixer to stage1. The forward-compatible ``exec(a, b)`` idiom is supported in Python 2.6 and 2.7. See https://docs.python.org/2/reference/simple_stmts.html#exec.
12-
- Use 3-argument socket.create_connection() backport to restore Py2.6 compatibility in ``urllib.request.urlopen()`` (issue #162)
11+
- ``futurize``: Moved exec fixer to stage1. The forward-compatible ``exec(a,
12+
b)`` idiom is supported in Python 2.6 and 2.7. See
13+
https://docs.python.org/2/reference/simple_stmts.html#exec.
14+
- Use 3-argument socket.create_connection() backport to restore Py2.6
15+
compatibility in ``urllib.request.urlopen()`` (issue #162)
16+
- Remove breakpoint in ``future.backports.http.client`` triggered on certain
17+
data (issue #164)
1318

1419

1520
What's new in version 0.15.0 (2015-07-25)

src/future/backports/http/client.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -554,19 +554,9 @@ def readinto(self, b):
554554
# (for example, reading in 1k chunks)
555555

556556
if PY2:
557-
### Python-Future:
558-
# TODO: debug and fix me!
559557
data = self.fp.read(len(b))
560-
if data[:2] == b"b'":
561-
# Something has gone wrong
562-
import pdb
563-
pdb.set_trace()
564-
#if len(b) != len(data):
565-
# import pdb
566-
# pdb.set_trace()
567558
n = len(data)
568559
b[:n] = data
569-
###
570560
else:
571561
n = self.fp.readinto(b)
572562

0 commit comments

Comments
 (0)