Commit Graph

19630 Commits

Author SHA1 Message Date
Florent Xicluna a011e2b2fa fileinput: replace this last occurence of codecs.open with builtins.open. 2011-11-07 19:43:07 +01:00
Florent Xicluna 5252f9faee logging: replace codecs.open with builtins.open, remove '_encoded' sort, add some tests. 2011-11-07 19:43:05 +01:00
Éric Araujo 1cdbf57c7c Merge 3.2 2011-11-07 18:11:27 +01:00
Éric Araujo b1c6f59d71 Branch merge 2011-11-07 18:11:12 +01:00
Vinay Sajip e2618f34be Closes #13361: Merge fix from 3.2. 2011-11-07 10:15:55 +00:00
Vinay Sajip 3bd5638736 Closes #13361: Raise correct exception type. 2011-11-07 10:15:08 +00:00
Vinay Sajip 39b53c50c4 Merged fix for #13361 from 3.2. 2011-11-07 08:53:58 +00:00
Vinay Sajip 61b787e6dd Closes #13661: Check added for type of logger name. 2011-11-07 08:53:03 +00:00
Éric Araujo 2a7cc5343d Remove unnecessary version check 2011-11-07 09:18:30 +01:00
Brian Curtin 0277aa3b24 Oops. Update a placeholder comment with the issue number. 2011-11-06 13:50:15 -06:00
Brian Curtin 52fbea1d87 Fix #13327. Remove the need for an explicit None as the second argument to
os.utime in order to update to the current time. The second argument is now
optional.
2011-11-06 13:41:17 -06:00
Petri Lehtinen 9589ab1745 Revert "Accept None as start and stop parameters for list.index() and tuple.index()"
Issue #13340.
2011-11-06 21:06:10 +02:00
Petri Lehtinen ebfaabd663 Revert "Accept None as start and stop parameters for list.index() and tuple.index()"
Issue #13340.
2011-11-06 21:02:39 +02:00
Éric Araujo 438f21a406 Use more standard name for one option of packaging’s install_distinfo 2011-11-06 11:52:30 +01:00
Éric Araujo ca9460324a Remove redundant __main__ blocks from packaging modules.
The one interface we commit to maintain is the run module
(a.k.a. the pysetup script).
2011-11-06 11:38:58 +01:00
Éric Araujo fad46e19b4 Clean up mocking of stdout and stdin in packaging tests.
Running with regrtest does not show spurious output or unrestored
sys.std* objects; sometimes running with make test is different, I’ll
watch the buildbots.

In addition, update the create module to use logging.
2011-11-06 11:32:47 +01:00
Éric Araujo 261ccdce48 Minor tweak to packaging tests.
When an option is changed on a command object, calling ensure_finalized
for a second time will not run finalize_options again, because
ensure_finalized is a no-op the second time.  By resetting the finalized
attribute, we can be sure that whatever computation takes place in
finalize_options will happen again.

(In test_command_clean, I removed two lines that were a no-op.)
2011-11-06 10:48:55 +01:00
Éric Araujo a963e0d917 Undo potentially confusing name change in packaging.
This method was named reinitialize_command in distutils and accompanied
by a comment suggesting to change it to get_reinitialized_command.
Following that, I did the change for distutils2, but it proved
confusing: The Distribution object has an internal cache of command
objects, to make sure only one instance is ever used, and the name
get_reinitialized_command could suggest that the object returned was
independent of that cache, which it was not.  I’m reverting the name
change to make code clearer.
2011-11-06 06:54:05 +01:00
Éric Araujo 4e377f215d Make sure packaging tests that register custom commands also clear them 2011-11-06 07:01:18 +01:00
Ned Deily 55f87578a1 Issue #13300: Fix IDLE Restart Shell command failure introduced by
3a5a0943b201.  Do not close listening socket on subprocess restart.
2011-11-05 22:36:44 -07:00
Antoine Pitrou deb925fc14 Skip early if stdin and stdout are not ttys 2011-11-06 03:04:12 +01:00
Antoine Pitrou 1ce4b14c4d Skip early if stdin and stdout are not ttys 2011-11-06 03:03:18 +01:00
Antoine Pitrou 413d497247 Backport robustness fix for test_builtin 2011-11-06 02:51:25 +01:00
Antoine Pitrou 772add7e1a Try to make the tty input() tests more robust 2011-11-06 02:37:42 +01:00
Antoine Pitrou 5ee9d8a8a2 Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode
error handler in interactive mode (when calling into PyOS_Readline()).
2011-11-06 00:38:45 +01:00
Antoine Pitrou 0d776b1ce8 Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode
error handler in interactive mode (when calling into PyOS_Readline()).
2011-11-06 00:34:26 +01:00
Petri Lehtinen 8e9f6c4251 Accept None as start and stop parameters for list.index() and tuple.index().
Closes #13340.
2011-11-05 23:25:34 +02:00
Petri Lehtinen c2f0a46111 Accept None as start and stop parameters for list.index() and tuple.index()
Closes #13340.
2011-11-05 23:24:31 +02:00
Raymond Hettinger 68fb89fdb7 Fix whitespace 2011-11-05 13:43:01 -07:00
Raymond Hettinger f1182cd4db Merge 2011-11-05 13:39:57 -07:00
Raymond Hettinger 4e6bf41934 Improve Counter.__repr__() to not fail with unorderable values 2011-11-05 13:35:26 -07:00
Benjamin Peterson 878ce389a0 add introspection to range objects (closes #9896)
Patch by Daniel Urban.
2011-11-05 15:17:52 -04:00
Éric Araujo 03b0819389 Try to fix buildbot failures from #13193 2011-11-05 17:51:52 +01:00
Charles-François Natali 88c2e45367 asyncore: POLLERR, POLLHUP and POLLNVAL are ignored when passed as input flag
to poll(2): don't set them.
2011-11-05 14:16:01 +01:00
Petri Lehtinen 064e39330d Issue #3067: Enhance the documentation and docstring of locale.setlocale() 2011-11-05 10:22:03 +02:00
Petri Lehtinen 395ca72380 Issue #3067: Enhance the documentation and docstring of locale.setlocale() 2011-11-05 10:21:16 +02:00
Petri Lehtinen 8c481b6212 Fix Maildir initialization so that maildir contents are read correctly.
Closes #13254.
2011-11-05 09:46:10 +02:00
Petri Lehtinen 8c482ee955 Fix Maildir initialization so that maildir contents are read correctly.
Closes #13254.
2011-11-05 09:44:59 +02:00
Amaury Forgeot d'Arc 9028a10144 Issue #13343: Fix a SystemError when a lambda expression uses a global
variable in the default value of a keyword-only argument:
(lambda *, arg=GLOBAL_NAME: None)
2011-11-04 22:29:24 +01:00
Amaury Forgeot d'Arc 97c1bef6a4 Issue #13343: Fix a SystemError when a lambda expression uses a global
variable in the default value of a keyword-only argument:
(lambda *, arg=GLOBAL_NAME: None)
2011-11-04 22:17:45 +01:00
Florent Xicluna 3dbb1f17cb Fix test_urllib2 error on Windows in relation with issue #13287. 2011-11-04 22:15:37 +01:00
Petri Lehtinen c9f38462ee Issue #3067: Fix the error raised by locale.setlocale() 2011-11-04 22:22:03 +02:00
Petri Lehtinen 3c85fe07f4 Issue #3067: Fix the error raised by locale.setlocale() 2011-11-04 22:21:07 +02:00
Martin v. Löwis 3d325191bf Port code page codec to Unicode API. 2011-11-04 18:23:06 +01:00
Florent Xicluna 495dcbd5c1 Merge 3.2: issue #13140 2011-11-04 10:22:57 +01:00
Florent Xicluna 12b66b5217 Closes #13140: Fix the daemon_threads attribute of ThreadingMixIn. 2011-11-04 10:16:28 +01:00
Florent Xicluna 54540ec917 Remove redundant imports. 2011-11-04 08:29:17 +01:00
Florent Xicluna c53ae58954 Drop unused import in unittest package. 2011-11-04 08:25:54 +01:00
Victor Stinner 76a31a6bff Cleanup decode_code_page_stateful() and encode_code_page()
* Fix decode_code_page_errors() result
 * Inline decode_code_page() and encode_code_page_chunk()
 * Replace the PyUnicodeObject type by PyObject
2011-11-04 00:05:13 +01:00
Florent Xicluna a9e73640bf Oversight in previous commit for test_pep277. 2011-11-03 23:44:15 +01:00
Florent Xicluna 65eb453d28 Use PEP-3151 exceptions for test_pep277. 2011-11-03 23:11:14 +01:00
Victor Stinner 65f51bb150 (Merge 3.2) Issue #10570: curses.putp() is now expecting a byte string, instead
of a Unicode string.

This is an incompatible change, but putp() is used to emit terminfo commands,
which are bytes strings, not Unicode strings.
2011-11-03 20:36:55 +01:00
Victor Stinner b3bc7e764d Issue #10570: curses.putp() is now expecting a byte string, instead of a
Unicode string.

This is an incompatible change, but putp() is used to emit terminfo commands,
which are bytes strings, not Unicode strings.
2011-11-03 20:35:40 +01:00
Éric Araujo 6fc41dd1e3 Merge 3.2 2011-11-03 16:45:33 +01:00
Éric Araujo 146f870916 Branch merge 2011-11-03 16:44:13 +01:00
Éric Araujo 9c2f42f253 Branch merge 2011-11-03 16:27:57 +01:00
Éric Araujo 7855a1abec Actually check the contents of the file created by packaging’s bdist_dumb 2011-11-03 06:00:02 +01:00
Éric Araujo e64052176d Merge follow-up for #11254 and other changes from 3.2 2011-11-03 05:17:11 +01:00
Éric Araujo 880801501b Improve byte-compilation in packaging to be independent of -O or -B.
The code I fixed to comply with PEP 3147 still had one bug: When run
under python -O, some paths for pyc files would be pyo, because I called
imp.cache_from_source without explicit debug_override argument in some
places, and under -O that would return .pyo (this is well explained in
the imp docs).  Now all code (util.byte_compile, build_py, install_lib)
can create .pyo files according to options given by users,
without interference from the calling Python’s own optimize mode.

On a related topic, I also removed the code that prevented byte
compilation under python -B.  The rationale is that packaging gives
control over the creation of pyc files to the user with its own explicit
option, and the behavior should not be changed if the calling Python
happens to run with -B for whatever reason.  I will argue that this is a
bug fix and ask to be allowed to backport this change to distutils.

Finally, I moved one nugget of information about the --compile and
--optimize options from the source into the doc.  It clears up a
misunderstanding that I (and maybe other people) had.
2011-11-03 05:08:28 +01:00
Éric Araujo e2544bc909 Fix incorrect docstring I changed a while back.
New wording is taken straight from the PEP, so this time should be good
:)
2011-11-03 04:34:09 +01:00
Éric Araujo c465b2f843 More fixes for PEP 3147 compliance in distutils (#11254) 2011-11-03 03:45:33 +01:00
Antoine Pitrou ef297a8a35 Issue #13307: fix bdist_rpm test failures 2011-11-03 02:46:52 +01:00
Antoine Pitrou cb2f84a218 Issue #13307: fix bdist_rpm test failures 2011-11-03 02:45:46 +01:00
Éric Araujo dfd232898d Minor code reorganization in one packaging test file 2011-11-03 00:20:03 +01:00
Éric Araujo 9ad81a3591 Fix typo “seperate” 2011-11-03 00:13:05 +01:00
Éric Araujo 3924230498 Fix typo 2011-11-03 00:08:48 +01:00
Victor Stinner df5bccc8a3 (Merge 3.2) Issue #10570: curses.tigetstr() is now expecting a byte string,
instead of a Unicode string.

This is an incompatible change, but the previous behaviour was completly wrong.
2011-11-02 23:47:58 +01:00
Victor Stinner 2662133a05 Issue #10570: curses.tigetstr() is now expecting a byte string, instead of a
Unicode string.

This is an incompatible change, but the previous behaviour was completly wrong.
2011-11-02 23:45:29 +01:00
Charles-François Natali cf85c300cf test_asyncore: Actually try to received OOB data. 2011-11-02 20:30:59 +01:00
Charles-François Natali b2cca00c14 Issue #13308: Fix test_httpservers failures when run as root. 2011-11-02 19:36:02 +01:00
Charles-François Natali f7ed9fc063 Issue #13308: Fix test_httpservers failures when run as root. 2011-11-02 19:35:14 +01:00
Ezio Melotti ca897e960a #13295: http.server now produces valid HTML 4.01 strict. 2011-11-02 19:33:29 +02:00
Éric Araujo af2ffd75cf Cleanups in distutils tests.
- Actually check the contents of the file created by bdist_dumb.
- Don’t use “RECORD” as filename for non-PEP 376 record file
- Don’t start method name with “_test”, it smells like a disabled test
  method instead of an helper method
- Fix some idioms (assertIn, addCleanup)
2011-11-02 18:05:41 +01:00
Florent Xicluna 2fbc185209 Issue #13312: skip the failing negative years for now. 2011-11-02 08:13:43 +01:00
Florent Xicluna dfee6c8dee Actually, there's more than one failing value. (changeset 9cb1b85237a9, issue #13312). 2011-11-02 03:22:15 +01:00
Florent Xicluna e2a732e706 Issue #13312: skip the single failing value for now. 2011-11-02 01:28:17 +01:00
Florent Xicluna 91d5193b3a Closes #2892: preserve iterparse events in case of SyntaxError. 2011-11-01 23:31:09 +01:00
Florent Xicluna d1bd7f7730 Additional tests for negative years. 2011-11-01 23:42:05 +01:00
Florent Xicluna f24e7e6c41 Merge 3.2: issue #2892 2011-11-01 23:33:14 +01:00
Ezio Melotti f588dd60cc Merge test improvements from 3.2. 2011-11-01 18:58:19 +02:00
Ezio Melotti c1e73c30e9 Make sure that the tolerant parser still parses valid HTML correctly. 2011-11-01 18:57:15 +02:00
Florent Xicluna 725af4dc1d Lowercase the test name, to run last. 2011-11-01 17:42:24 +01:00
Florent Xicluna 050c7e64cd Replace temporary tests with the real test case for issue #13309 on Gentoo. 2011-11-01 16:58:54 +01:00
Senthil Kumaran 4c875a986f 'HTTPSHandler' and not the type. 2011-11-01 23:57:57 +08:00
Senthil Kumaran 0d54eb9bdc Append HTTPSHandler to __all__ when it is available. 2011-11-01 23:49:46 +08:00
Senthil Kumaran 6c5bd40a3e issue13287 - Define __all__ for urllib.request and urllib.error and expose only
the relevant module. Other cleanup improvements. Patch by flox.
2011-11-01 23:20:31 +08:00
Florent Xicluna 712b14fc2a Troubleshoot issue #13309 on Gentoo buildbot. 2011-11-01 16:07:23 +01:00
Florent Xicluna 752c1d4c02 Add temporary tests to troubleshoot issue #13309 on Gentoo buildbot. 2011-11-01 15:12:34 +01:00
Florent Xicluna bceb528af5 Test the year range supported by time.strftime() and time.asctime(). 2011-11-01 14:11:34 +01:00
Ezio Melotti 629a2c336e Merge test fixes from 3.2. 2011-11-01 15:02:16 +02:00
Ezio Melotti b9a48f7144 Avoid reusing the same collector in the tests. 2011-11-01 15:00:59 +02:00
Ezio Melotti 829c3dac3b #12008: merge with 3.2. 2011-11-01 14:43:51 +02:00
Ezio Melotti 18b0e5b79b #12008: add a test. 2011-11-01 14:42:54 +02:00
Ezio Melotti 7de56f6a04 #670664: Fix HTMLParser to correctly handle the content of ``<script>...</script>`` and ``<style>...</style>``. 2011-11-01 14:12:22 +02:00
Ned Deily 316f573d9c Issue #13304: Skip test case if user site-packages disabled (-s or
PYTHONNOUSERSITE).  (Patch by Carl Meyer)
2011-10-31 16:16:35 -07:00
Senthil Kumaran ce260142c6 Fix issue 10817 - Fix urlretrieve function to raise ContentTooShortError
even when reporthook is None. Patch by Jyrki Pulliainen.
2011-11-01 01:35:17 +08:00
Jesus Cea 5032292f9e Closes #13283: removal of two unused variable in locale.py 2011-10-31 16:03:34 +01:00
Ned Deily 7aff451728 Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart.
(Patch by Roger Serwy)
2011-10-30 20:01:35 -07:00
Raymond Hettinger e584457e24 Issue 13274: Make the pure python code for heapq more closely match the C implementation for an undefined corner case. 2011-10-30 14:32:54 -07:00
Florent Xicluna 93dfee1dfc Issue #13293: Better error message when trying to marshal bytes using xmlrpc.client. 2011-10-30 20:22:25 +01:00