Commit Graph

34742 Commits

Author SHA1 Message Date
Raymond Hettinger a7364a887c merge 2014-05-12 21:57:19 -07:00
Raymond Hettinger 122541bece Issue 21469: Mitigate risk of false positives with robotparser.
* Repair the broken link to norobots-rfc.txt.

* HTTP response codes >= 500 treated as a failed read rather than as a not
found.  Not found means that we can assume the entire site is allowed.  A 5xx
server error tells us nothing.

* A successful read() or parse() updates the mtime (which is defined to be "the
  time the robots.txt file was last fetched").

* The can_fetch() method returns False unless we've had a read() with a 2xx or
4xx response.  This avoids false positives in the case where a user calls
can_fetch() before calling read().

* I don't see any easy way to test this patch without hitting internet
resources that might change or without use of mock objects that wouldn't
provide must reassurance.
2014-05-12 21:56:33 -07:00
Eric Snow b7f1be309e Merge from 3.4 (for #21226). 2014-05-12 18:25:00 -06:00
Victor Stinner 38d3d22b29 (Merge 3.4) Issue #21398: Fix an unicode error in the pydoc pager when the
documentation contains characters not encodable to the stdout encoding.
2014-05-13 02:06:33 +02:00
Victor Stinner 0cc45baa3d Issue #21398: Fix an unicode error in the pydoc pager when the documentation
contains characters not encodable to the stdout encoding.
2014-05-13 02:05:35 +02:00
Eric Snow 08197a4616 Issue #21226: Set all attrs in PyImport_ExecCodeModuleObject. 2014-05-12 17:54:55 -06:00
Victor Stinner 66113bb74a (Merge 3.4) Issue #21422: Add a test to check that bool << int and bool >> int
return an int
2014-05-12 22:43:07 +02:00
Victor Stinner 7fe1049fcb Issue #21422: Add a test to check that bool << int and bool >> int return an int 2014-05-12 22:35:40 +02:00
Antoine Pitrou 5fb195f854 Issue #16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept an (address, netmask) tuple argument, so as to easily construct network objects from existing addresses. 2014-05-12 20:36:46 +02:00
Guido van Rossum 3b5162d05d Merge 3.4->default: asyncio: Fix upstream issue 168: StreamReader.read(-1) from pipe may hang if data exceeds buffer limit. 2014-05-12 10:05:04 -07:00
Guido van Rossum bf88ffba5e asyncio: Fix upstream issue 168: StreamReader.read(-1) from pipe may hang if data exceeds buffer limit. 2014-05-12 10:04:37 -07:00
Terry Jan Reedy d9ee1f50e5 Merge with 3.4 2014-05-11 23:35:35 -04:00
Terry Jan Reedy 8386fda154 whitespace 2014-05-11 23:35:09 -04:00
Terry Jan Reedy f80c0f6eac Merge with 3.4 2014-05-11 23:32:58 -04:00
Terry Jan Reedy 06313b79d5 Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin
consolidating and improving human-validated tests of Idle. Change other files
as needed to work with htest.  Running the module as __main__ runs all tests.
2014-05-11 23:32:32 -04:00
Raymond Hettinger 234fb2d503 Issue 21424: Apply the nlargest() optimizations to nsmallest() as well. 2014-05-11 14:21:23 -07:00
Antoine Pitrou 5e6b5f2f26 Try to fix issue #21425 workaround for shared library builds 2014-05-11 19:13:43 +02:00
Antoine Pitrou ffef2447ee Try to fix issue #21425 workaround for shared library builds 2014-05-11 19:13:43 +02:00
Antoine Pitrou 5006a56e39 Fix printing out error message when test fails and run with -bb 2014-05-11 19:05:50 +02:00
Antoine Pitrou dab4e8a02d Fix printing out error message when test fails and run with -bb 2014-05-11 19:05:23 +02:00
Antoine Pitrou 4f23472fc2 Remove debugging output 2014-05-11 17:29:57 +02:00
Antoine Pitrou 6b4b8d0722 Try workaround for test issues in #21425 2014-05-11 16:59:16 +02:00
Antoine Pitrou bb62c18ec9 Try workaround for test issues in #21425 2014-05-11 16:59:16 +02:00
Antoine Pitrou ffd72737d3 Fix debugging output to work with -W 2014-05-11 16:36:22 +02:00
Antoine Pitrou c1b22d9c22 Fix debugging output to work with -bb 2014-05-11 16:24:45 +02:00
Antoine Pitrou 0a44a0b827 Add debugging output for #21425 2014-05-11 16:09:15 +02:00
Antoine Pitrou 1c33280c95 Issue #21425: Fix flushing of standard streams in the interactive interpreter. 2014-05-11 13:43:31 +02:00
Antoine Pitrou 9845c7ebc5 Issue #21425: Fix flushing of standard streams in the interactive interpreter. 2014-05-11 13:42:17 +02:00
Raymond Hettinger 277842eff1 Issue #21424: Optimize heaqp.nlargest() to make fewer tuple comparisons.
Consolidates the logic for nlargest() into a single function so that
decoration tuples (elem,order) or (key, order, elem) only need to
be formed when a new element is added to the heap.  Formerly, a tuple
was created for every element regardless of whether it was added to
the heap.

The change reduces the number of tuples created, the number of ordering
integers created, and total number of tuple comparisons.
2014-05-11 01:55:46 -07:00
Guido van Rossum d6a46ae705 Merge 3.4 -> default: asyncio: Upstream issue #167: remove dead code, by Marc Schlaich. 2014-05-10 15:48:03 -07:00
Guido van Rossum 3d1bc608a8 asyncio: Upstream issue #167: remove dead code, by Marc Schlaich. 2014-05-10 15:47:15 -07:00
Jason R. Coombs 09122f84fc Reindent long line 2014-05-10 13:24:58 -04:00
Jason R. Coombs 0375653371 Replace overly-aggressive comparison for type equality with an isinstance check. 2014-05-10 13:24:18 -04:00
Jason R. Coombs a384652d6d Drop support for Python 2.4 in upload command. 2014-05-10 13:22:43 -04:00
Jason R. Coombs 6f71726ecd Replace import * with explicit import 2014-05-10 13:21:02 -04:00
Jason R. Coombs 7ae0fde001 Clean up style in distutils upload command 2014-05-10 13:20:28 -04:00
Eli Bendersky f84866c9af Issue #19655: Add tests for the new asdl parser.
This unit test runs only for source builds of Python, similarly to test_tools.
2014-05-09 19:03:25 -07:00
Brett Cannon 732ac654c8 Issue #19721: Consolidate test_importlib utility code into a single
module.
2014-05-09 14:32:57 -04:00
Brett Cannon 91795c8e34 Issue #20776: Flesh out tests for importlib.machinery.PathFinder. 2014-05-09 13:38:11 -04:00
Brett Cannon 6eaac13c92 Issue #21156: importlib.abc.InspectLoader.source_to_code() is now a
staticmethod.
2014-05-09 12:28:22 -04:00
Tim Peters 983c1065fe Merge from 3.4.
Issue #21435: Segfault in gc with cyclic trash
Changed the iteration logic in finalize_garbage() to tolerate objects vanishing
from the list as a side effect of executing a finalizer.
2014-05-08 17:43:25 -05:00
Tim Peters 5fbc7b12f7 Issue #21435: Segfault in gc with cyclic trash
Changed the iteration logic in finalize_garbage() to tolerate objects vanishing
from the list as a side effect of executing a finalizer.
2014-05-08 17:42:19 -05:00
Antoine Pitrou 38ca5a7b6d Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a flush() on the underlying binary stream.
Patch by akira.
2014-05-09 00:31:32 +02:00
Antoine Pitrou c644e7c39f Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a flush() on the underlying binary stream.
Patch by akira.
2014-05-09 00:24:50 +02:00
doko@ubuntu.com 4ce74dc54c - Issue #17752: Fix distutils tests when run from the installed location. 2014-05-07 13:08:51 +02:00
doko@ubuntu.com e5de66eaa7 - Issue #17752: Fix distutils tests when run from the installed location. 2014-05-07 12:57:44 +02:00
R David Murray 5915505796 Merge: #21300: Clean up the docs for the email "policy" arguments. 2014-05-06 21:33:50 -04:00
R David Murray e25244657c #21300: Clean up the docs for the email "policy" arguments. 2014-05-06 21:33:18 -04:00
Guido van Rossum 5dcad2c8f3 Merge 3.4->default: asyncio: Fix the second half of issue #21447: race in _write_to_self(). 2014-05-06 14:45:39 -07:00
Guido van Rossum 3d139d8ed6 asyncio: Fix the second half of issue #21447: race in _write_to_self(). 2014-05-06 14:42:40 -07:00