cpython/Lib
Martin Panter 3c0d0baf2b Issue #12319: Support for chunked encoding of HTTP request bodies
When the body object is a file, its size is no longer determined with
fstat(), since that can report the wrong result (e.g. reading from a pipe).
Instead, determine the size using seek(), or fall back to chunked encoding
for unseekable files.

Also, change the logic for detecting text files to check for TextIOBase
inheritance, rather than inspecting the “mode” attribute, which may not
exist (e.g. BytesIO and StringIO).  The Content-Length for text files is no
longer determined ahead of time, because the original logic could have been
wrong depending on the codec and newline translation settings.

Patch by Demian Brecht and Rolf Krahl, with a few tweaks by me.
2016-08-24 06:33:33 +00:00
..
asyncio In asyncio.locks.Lock.acquire(): Avoid deadlock when a cancelled future is in self._waiters. (Merge 3.5->3.6) 2016-08-23 09:39:26 -07:00
collections Remove main section that was only used during testing and development 2016-08-21 20:52:26 -07:00
concurrent Issue #27664: Add to concurrent.futures.thread.ThreadPoolExecutor() 2016-08-07 10:19:20 -07:00
ctypes Closes #9998: Allowed find_library to search additional locations for libraries. 2016-08-17 16:20:07 +01:00
curses Issue #27294: Numerical state in the repr for Tkinter event objects is now 2016-06-18 22:08:11 +03:00
dbm Issue #21708: Deprecated dbm.dumb behavior that differs from common dbm 2016-07-06 12:21:58 +03:00
distutils Issue #27819: Simply default to gztar for sdist formats by default on all platforms. 2016-08-20 17:31:07 -04:00
email Correct misspellings of ISO-8859 2016-08-10 05:25:16 +00:00
encodings Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
ensurepip Update setuptools/pip to 25.2.0/8.1.2 2016-08-14 16:09:56 -04:00
html Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
http Issue #12319: Support for chunked encoding of HTTP request bodies 2016-08-24 06:33:33 +00:00
idlelib Fix typo in IDLE News. 2016-08-21 00:20:35 -04:00
importlib Merge for #27083 2016-07-16 10:45:16 -07:00
json Issue #4945: Improved the documenting of boolean arguments in the json module. 2016-06-30 14:03:21 +03:00
lib2to3 Issue #27095: Simplified MAKE_FUNCTION and removed MAKE_CLOSURE opcodes. 2016-06-12 17:36:24 +03:00
logging Closes #27650: Implemented repr methods for logging objects. 2016-08-06 10:28:31 +01:00
msilib Issue #27076: Merge spelling from 3.5 2016-05-26 06:03:19 +00:00
multiprocessing Issue #26778: Fixed "a/an/and" typos in code comment, documentation and error 2016-04-17 09:39:28 +03:00
plat-aix4
plat-darwin
plat-freebsd4
plat-freebsd5
plat-freebsd6
plat-freebsd7
plat-freebsd8
plat-generic
plat-linux - Issue #23968: Rename the platform directory from plat-$(MACHDEP) to 2016-06-14 08:55:19 +02:00
plat-netbsd1
plat-next3
plat-sunos5
plat-unixware7
pydoc_data Update pydoc topics for 3.6.0a4 2016-08-15 16:12:59 -04:00
site-packages
sqlite3 Issue #21718: Merge from 3.5 2016-08-21 19:41:38 +03:00
test Issue #12319: Support for chunked encoding of HTTP request bodies 2016-08-24 06:33:33 +00:00
tkinter Merge with 3.5 2016-08-16 01:44:31 -04:00
turtledemo Issue #27117: Make ColorDelegator htest and turtledemo work with dark theme. 2016-05-29 01:40:30 -04:00
unittest Issue #26750: use inspect.isdatadescriptor instead of our own 2016-08-15 23:56:32 -07:00
urllib Issue #12319: Support for chunked encoding of HTTP request bodies 2016-08-24 06:33:33 +00:00
venv Closes #22829: Added --prompt option to venv. 2016-08-06 10:43:44 +01:00
wsgiref Issue #26721: Change StreamRequestHandler.wfile to BufferedIOBase 2016-06-29 10:12:22 +00:00
xml Issue #23804: Merge spelling and NEWS fixes from 3.5 2016-07-11 12:54:44 +00:00
xmlrpc Issue #23804: Merge spelling and NEWS fixes from 3.5 2016-07-11 12:54:44 +00:00
__future__.py
__phello__.foo.py
_bootlocale.py
_collections_abc.py Issue 27598: Add Collections to collections.abc. 2016-08-23 10:47:07 -07:00
_compat_pickle.py Issue #26013: Added compatibility with broken protocol 2 pickles created 2016-01-18 21:35:22 +02:00
_compression.py
_dummy_thread.py
_markupbase.py
_osx_support.py Issue #27171: Fix typos in documentation, comments, and test function names 2016-06-02 10:07:09 +00:00
_pydecimal.py merge 2016-08-13 11:15:59 -07:00
_pyio.py Drop unused import 2016-06-12 01:56:50 +00:00
_sitebuiltins.py
_strptime.py Issue #23718: Fixed parsing time in week 0 before Jan 1. Original patch by 2016-03-12 10:53:09 +02:00
_threading_local.py
_weakrefset.py
abc.py
aifc.py
antigravity.py
argparse.py Issue #12713: reverted fix pending further discussion. 2016-08-23 08:43:16 +01:00
ast.py Add ast.Constant 2016-01-26 00:40:57 +01:00
asynchat.py Issue #27034: Removed deprecated class asynchat.fifo. 2016-05-16 09:10:43 +03:00
asyncore.py Add a source parameter to warnings.warn() 2016-03-23 00:28:08 +01:00
base64.py Issue #25913: Leading <~ is optional now in base64.a85decode() with adobe=True. 2016-02-24 12:08:11 +02:00
bdb.py
binhex.py
bisect.py
bz2.py
cProfile.py
calendar.py Issue #23883: Add missing APIs to calendar.__all__ 2016-01-16 06:49:30 +00:00
cgi.py Issue #27105: Add cgi.test() to __all__, based on Jacek Kołodziej’s patch 2016-06-06 01:53:28 +00:00
cgitb.py
chunk.py
cmd.py
code.py Issue #27573 make the exit message configurable. 2016-08-24 01:42:15 +10:00
codecs.py
codeop.py
colorsys.py
compileall.py Issue #25768: Make compileall functions return booleans and document 2015-12-27 13:17:04 -08:00
configparser.py
contextlib.py Issue #27123: When an exception is raised within the context being 2016-06-14 09:24:31 -07:00
copy.py Issue #26167: Minimized overhead in copy.copy() and copy.deepcopy(). 2016-03-06 14:56:57 +02:00
copyreg.py
crypt.py
csv.py
datetime.py Closes #27710: Disallow fold not in [0, 1] in time and datetime constructors. 2016-08-08 17:05:40 -04:00
decimal.py
difflib.py
dis.py Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
doctest.py doctest now supports packages 2016-03-30 01:29:05 +02:00
dummy_threading.py
enum.py issue26981: add _order_ compatibility shim to enum.Enum 2016-08-20 07:19:31 -07:00
filecmp.py
fileinput.py Issue #25788: fileinput.hook_encoded() now supports an "errors" argument 2016-04-27 23:13:46 +03:00
fnmatch.py
formatter.py
fractions.py Issue #27832: Make _normalize parameter to Fraction.__init__ keyword-only. 2016-08-23 16:16:52 +01:00
ftplib.py Removed unused imports. 2016-04-25 00:12:32 +03:00
functools.py
genericpath.py
getopt.py
getpass.py
gettext.py
glob.py
gzip.py Fix spelling (inital), grammar (may translates) in documentation, comments 2016-04-19 04:03:41 +00:00
hashlib.py
heapq.py Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc 2016-04-15 02:14:19 +00:00
hmac.py
imaplib.py #21815: violate IMAP RFC to be compatible with, e.g., gmail 2016-01-02 17:18:34 -05:00
imghdr.py
imp.py Merge for #26844 2016-07-15 10:59:11 -07:00
inspect.py Issue #19611: handle implicit parameters in inspect.signature 2016-06-04 14:40:03 -07:00
io.py
ipaddress.py Issue #20508: Improve exception message of IPv{4,6}Network.__getitem__ 2016-06-11 22:30:05 +03:00
keyword.py
linecache.py
locale.py Issue #27076: Merge spelling from 3.5 2016-05-26 06:03:19 +00:00
lzma.py Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
macpath.py
macurl2path.py
mailbox.py Issue #27107: Add exception classes to mailbox.__all__, by Jacek Kołodziej 2016-06-06 01:56:09 +00:00
mailcap.py
mimetypes.py Issue #27108: Add missing names to mimetypes.__all__, by Jacek Kołodziej 2016-06-06 01:59:19 +00:00
modulefinder.py Issue #26881: Restored the name of scan_opcodes_25(). 2016-05-11 22:19:49 +03:00
netrc.py
nntplib.py Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc 2016-04-15 02:14:19 +00:00
ntpath.py Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc 2016-04-15 02:14:19 +00:00
nturl2path.py
numbers.py
opcode.py Issue #27095: Simplified MAKE_FUNCTION and removed MAKE_CLOSURE opcodes. 2016-06-12 17:36:24 +03:00
operator.py
optparse.py Merge doc and comment fixes from 3.5 2016-04-19 23:23:16 +00:00
os.py Issue #27186: Update os.fspath()/PyOS_FSPath() to check the return 2016-06-24 12:03:43 -07:00
pathlib.py Issue #27186: Add os.PathLike support to pathlib. 2016-06-10 12:20:49 -07:00
pdb.py Issue #27171: Fix typos in documentation, comments, and test function names 2016-06-02 10:07:09 +00:00
pickle.py Issue #17711: Fixed unpickling by the persistent ID with protocol 0. 2016-07-17 11:35:35 +03:00
pickletools.py Merge typo fixes from 3.5 2016-05-08 14:02:35 +00:00
pipes.py
pkgutil.py Issue #26896: Disambiguate uses of "importer" with "finder". 2016-07-08 11:00:00 -07:00
platform.py Issue #27626: Spelling fixes in docs, comments and internal names 2016-07-28 01:11:04 +00:00
plistlib.py Issue #27109: Add InvalidFileException to __all__, by Jacek Kołodziej 2016-06-06 02:00:50 +00:00
poplib.py
posixpath.py #2466: ismount now recognizes mount points user can't access. 2016-08-18 21:27:48 -04:00
pprint.py Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
profile.py
pstats.py Issue #27241: Catch exception when running pstats as main. 2016-08-02 22:30:24 +02:00
pty.py
py_compile.py
pyclbr.py Removed unused imports. 2016-04-25 00:12:32 +03:00
pydoc.py - Issue #8637: Honor a pager set by the env var MANPAGER (in preference to 2016-06-14 09:03:52 +02:00
queue.py
quopri.py
random.py Minor beautification 2016-06-25 05:36:42 +03:00
re.py Removed unused imports. 2016-04-25 00:12:32 +03:00
reprlib.py Issue #26634: recursive_repr() now sets __qualname__ of wrapper. 2016-04-26 09:30:44 +03:00
rlcompleter.py Merge 3.5 2016-02-04 14:08:23 -05:00
runpy.py Issue #27487: Merge runpy warning from 3.5 2016-08-21 05:07:35 +00:00
sched.py
secrets.py Shorten secrets module docstring, add function docstrings. 2016-04-17 13:13:36 +10:00
selectors.py Sync selectors.py with upstream asyncio 2016-03-02 10:43:45 -05:00
shelve.py
shlex.py Closes #21999: Handled empty strings correctly when in POSIX mode. 2016-08-09 15:04:49 +01:00
shutil.py Issue #27626: Merge spelling fixes from 3.5 2016-07-28 01:30:58 +00:00
signal.py
site.py Issue #27171: Merge typo fixes from 3.5 2016-06-02 10:11:18 +00:00
smtpd.py Issue #27110: Add smtpd.SMTPChannel to __all__, by Jacek Kołodziej 2016-06-06 02:03:11 +00:00
smtplib.py Issue #27430: Fix typos, patch by scop. 2016-07-01 12:17:05 +03:00
sndhdr.py
socket.py Issue #27698: Add socketpair to socket.__all__ on Windows 2016-08-17 14:40:08 +02:00
socketserver.py Issue #26721: Change StreamRequestHandler.wfile to BufferedIOBase 2016-06-29 10:12:22 +00:00
sre_compile.py
sre_constants.py
sre_parse.py Issue #27030: Unknown escapes consisting of ``'\'`` and ASCII letter in 2016-06-11 19:15:00 +03:00
ssl.py Issue #27114: Fix SSLContext._load_windows_store_certs fails with PermissionError 2016-05-26 12:19:42 -07:00
stat.py
statistics.py Remove support for nth root of negative numbers with odd powers. 2016-08-24 12:48:12 +10:00
string.py Closes #26809: Merge with 3.5 2016-06-04 14:41:42 -05:00
stringprep.py
struct.py
subprocess.py subprocess: enhance ResourceWarning message 2016-06-14 16:42:59 +02:00
sunau.py
symbol.py
symtable.py
sysconfig.py - Issue #23968: Rename the platform directory from plat-$(MACHDEP) to 2016-06-14 08:55:19 +02:00
tabnanny.py
tarfile.py Merge 3.5, issue #27194 2016-06-11 16:56:18 -07:00
telnetlib.py #25485: Add context manager support to Telnet class. 2015-11-28 12:24:52 -05:00
tempfile.py Add a source parameter to warnings.warn() 2016-03-23 00:28:08 +01:00
textwrap.py
this.py
threading.py Merge spelling and grammar fixes from 3.5 2016-08-05 01:51:39 +00:00
timeit.py Issue6422 add autorange method to timeit.Timer 2016-08-15 01:27:03 +10:00
token.py
tokenize.py Issue #26581: Use the first coding cookie on a line, not the last one. 2016-03-20 23:47:48 +02:00
trace.py More typo fixes for 3.6 2016-06-04 05:06:25 +00:00
traceback.py Issue #26823: Abbreviate recursive tracebacks 2016-08-15 13:11:34 +10:00
tracemalloc.py tracemalloc now supports domains 2016-03-22 12:58:23 +01:00
tty.py
turtle.py Issue #27238: Got rid of bare excepts in the turtle module. Original patch 2016-06-14 22:52:04 +03:00
types.py
typing.py A new version of typing.py from https://github.com/python/typing. 2016-08-23 11:01:50 -07:00
uu.py
uuid.py Removed unused imports. 2016-04-25 00:12:32 +03:00
warnings.py Issue #18383: Merge warnings fix from 3.5 2016-05-26 09:39:41 +00:00
wave.py
weakref.py
webbrowser.py
xdrlib.py
zipapp.py Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
zipfile.py Issue #27029: Removed deprecated support of universal newlines mode from ZipFile.open(). 2016-06-11 19:32:44 +03:00