Commit Graph

19297 Commits

Author SHA1 Message Date
Martin v. Löwis 287eca658d Fix struct sizes. Drop -1, since the resulting string was actually the largest one
that could be allocated.
2011-09-28 10:03:28 +02:00
Martin v. Löwis f02aa65acb Use compile() instead of eval(). 2011-09-28 09:22:13 +02:00
Martin v. Löwis 0c9fe4d109 Use eval instead of codecs.lookup to trigger UTF-8 generation. 2011-09-28 09:15:11 +02:00
Martin v. Löwis d63a3b8beb Implement PEP 393. 2011-09-28 07:41:54 +02:00
Charles-François Natali dc863ddf79 Issue #12981: rewrite multiprocessing_{sendfd,recvfd} in Python. 2011-09-24 20:04:29 +02:00
Mark Dickinson 0d5f6adbb3 Issue #13012: Allow 'keepends' to be passed as a keyword argument in str.splitlines, bytes.splitlines and bytearray.splitlines. 2011-09-24 09:14:39 +01:00
Victor Stinner a1fe1f8dcf Merge 3.2: Issue #7732: Don't open a directory as a file anymore while
importing a module. Ignore the direcotry if its name matchs the module name
(e.g.  "__init__.py") and raise a ImportError instead.
2011-09-23 18:59:08 +02:00
Victor Stinner 53ffdc53bf Issue #7732: Don't open a directory as a file anymore while importing a
module. Ignore the direcotry if its name matchs the module name (e.g.
"__init__.py") and raise a ImportError instead.
2011-09-23 18:54:40 +02:00
Victor Stinner 92c144ee72 Merge 3.2: Issue #12931: Add a test with Unicode URI to test_xmlrpc 2011-09-23 01:31:04 +02:00
Victor Stinner da6eb5305f Issue #12931: Add a test with Unicode URI to test_xmlrpc 2011-09-23 01:29:44 +02:00
Charles-François Natali 9089b7956b Fix a race condition in test_socket.ThreadableTest: the client is reported
ready before having been set up.
2011-09-21 22:05:01 +02:00
Charles-François Natali a49ed7650a Fix a race condition in test_socket.ThreadableTest: the client is reported as
ready before having been set up.
2011-09-21 22:03:58 +02:00
Charles-François Natali fba2b6b454 Issue #12981: test_multiprocessing: catch ImportError when importing
multiprocessing.reduction, which may not be available (e.g. if the OS doesn't
support FD passing over Unix domain sockets).
2011-09-21 18:49:18 +02:00
Charles-François Natali e51c8dad1a Issue #12981: test_multiprocessing: catch ImportError when importing
multiprocessing.reduction, which may not be available (e.g. if the OS doesn't
support FD passing over Unix domain sockets).
2011-09-21 18:48:21 +02:00
Éric Araujo 9c0cccf363 Branch merge 2011-09-21 16:36:08 +02:00
Éric Araujo dd2d55c8a1 Remove two unneeded attributes in packaging 2011-09-21 16:28:03 +02:00
Jesus Cea 41c98a3207 Close #13022: _multiprocessing.recvfd() doesn't check that file descriptor was actually received 2011-09-21 03:56:05 +02:00
Jesus Cea 4507e6456e Close #13022: _multiprocessing.recvfd() doesn't check that file descriptor was actually received 2011-09-21 03:53:25 +02:00
Meador Inge 1c9f0c93ad Issue #1172711: Add 'long long' support to the array module.
Initial patch by Oren Tirosh and Hirokazu Yamamoto.
2011-09-20 19:55:51 -05:00
Victor Stinner 4ad6ed7d4d Merge 3.2: test_multiprocessing removes temporary files 2011-09-21 01:12:59 +02:00
Victor Stinner d0b10a6435 test_multiprocessing removes temporary files 2011-09-21 01:10:29 +02:00
Victor Stinner c61fae04f6 Merge 3.2: test_httplib removes temporary files 2011-09-21 01:09:29 +02:00
Victor Stinner 18d15cb665 test_httplib removes temporary files 2011-09-21 01:09:04 +02:00
Charles-François Natali bc8f08216e Issue #12981: test_multiprocessing: catch ImportError when importing
multiprocessing.reduction, which may not be available (e.g. if the OS doesn't
support FD passing over Unix domain sockets).
2011-09-20 20:36:51 +02:00
Charles-François Natali 225aa4f8ec Issue #12996: multiprocessing.connection: transmit the header in network byte
order (endpoints machines can have different endianness).
2011-09-20 19:27:39 +02:00
Éric Araujo 4c0b7070ce Squash last tempdir leak in packaging tests.
Sweet taste of victory!  Alexis, you can fix the threads leaks :)
2011-09-19 20:57:52 +02:00
Jesus Cea a372de8408 Close #13007: whichdb should recognize gdbm 1.9 magic numbers 2011-09-19 17:11:26 +02:00
Jesus Cea bc566b00ad Close #13007: whichdb should recognize gdbm 1.9 magic numbers 2011-09-19 17:08:18 +02:00
Éric Araujo 1cbd2ab404 Avoid matching '' or 'yn' when asking for 'y' or 'n' in interactive code 2011-09-19 16:21:37 +02:00
Éric Araujo becf1c5857 Branch merge 2011-09-19 16:10:26 +02:00
Nick Coghlan 2496f331a7 Close issue 12958 by flagging expected failures in test_socket on Mac OS X 2011-09-19 20:26:31 +10:00
Éric Araujo 28df8de6af Make regrtest look at internal dicts in sysconfig.
This reveals problems in the packaging test suite, which I’ll look
into after the regrtest checks are made more usable (see #12314).
2011-09-19 05:10:45 +02:00
Éric Araujo 505f0ebf88 Final bag of small changes coming from distutils2.
- minor cleanup in Metadata
- trigger creation of the sysconfig._CONFIG_VARS dict
- home_page is used over home-page: it’s not a compound word, it’s an
  escaped space

Distutils2 is now synchronized with Packaging.
2011-09-19 15:12:23 +02:00
Éric Araujo c1b7e7f8bb A few style changes originally done in the distutils2 repo 2011-09-18 23:12:30 +02:00
Éric Araujo f30b5ae6fd Replace cmp function with key function 2011-09-18 21:03:24 +02:00
Éric Araujo cc06ad187d Fix typo and wording 2011-09-18 20:36:19 +02:00
Éric Araujo cc95dd81f3 Branch merge 2011-09-18 20:24:27 +02:00
Éric Araujo 229011d949 Make a number of small changes to ease the backport to distutils2 2011-09-18 20:11:48 +02:00
Éric Araujo 41479450ec Fix fallback base class when tests run without threading 2011-09-18 17:00:38 +02:00
Éric Araujo 0cfb81d13f Use a local name (it was intended to be used but overlooked).
This was caught in the distutils2 repo by pyflakes.
2011-09-17 03:35:57 +02:00
Éric Araujo 7724a6c10c Packaging cleanup: remove conditionals for < 2.6 support.
PEP 370 features and sys.dont_write_bytecode are always available
in 3.3; the distutils2 backport still has the conditionals.

I also renamed an internal misnamed method and fixed a few things
(“packaging2” name, stray print, unused import, fd leak).
2011-09-17 03:31:51 +02:00
Ned Deily e30186bf4b Issue #12765: Fix packaging.test.test_database failures on OS X due
to unwarranted assumption about absolute paths: on OS X /var is a
symlink to /private/var.  (Also true for /etc and /tmp).
2011-09-15 15:09:23 -07:00
Éric Araujo 37ccd6f794 Fix packaging.database.Distribution.list_distinfo_files (#12785).
This method was supposed to return only the file under the dist-info
directory, but it actually returned all installed files.

The tests didn’t catch this because they were flawed; I updated them.
Thanks to Nadeem Vawda and Jeremy Kloth for testing.

As a bonus, the removal of os.path.relpath use should also fix the
Windows buildbots.
2011-09-15 18:18:51 +02:00
Ned Deily 86ca04ccc7 Issue #9871: Prevent IDLE 3 crash when given byte stings
with invalid hex escape sequences, like b'\x0'.
(Original patch by Claudiu Popa.)
2011-09-14 14:56:32 -07:00
Ned Deily 79746426c4 Issue #9871: Prevent IDLE 3 crash when given byte stings
with invalid hex escape sequences, like b'\x0'.
(Original patch by Claudiu Popa.)
2011-09-14 14:49:14 -07:00
Jeremy Kloth 3ac4f59a82 The value is the dotted module name to the command class. 2011-09-13 08:26:25 -06:00
Senthil Kumaran e012c02a5c merge from 3.2 2011-09-13 07:14:39 +08:00
Senthil Kumaran d71bbf9fd5 Fix issue12938 - Update the docstring of html.escape. Include the information on single quote. 2011-09-13 07:14:13 +08:00
Senthil Kumaran b7a690aeb4 merge from 3.2 - Add the missing quote_plus call. Fix closes Issue12924 2011-09-13 06:41:43 +08:00
Senthil Kumaran 305a68eb4a Add the quote_plus call in the test. 2011-09-13 06:40:27 +08:00
Amaury Forgeot d'Arc 88354ed8e3 Remove trailing spaces 2011-09-12 21:17:09 +02:00
Amaury Forgeot d'Arc 65604b51e0 Merge 3.2: Issue #12483: ctypes: Fix a crash when the destruction of a callback
object triggers the garbage collector.
2011-09-12 21:09:12 +02:00
Amaury Forgeot d'Arc bbe46d63ee Issue #12483: ctypes: Fix a crash when the destruction of a callback
object triggers the garbage collector.
2011-09-12 21:03:36 +02:00
Jeremy Kloth aa2b442bdc Factor out the distribution file-system safe name functions from install_distinfo to allow all metadata consumers access to them. 2011-09-12 11:12:42 -06:00
Éric Araujo 4c3124c2b9 Merge 3.2 2011-09-12 17:41:24 +02:00
Éric Araujo faabef548d Branch merge 2011-09-12 17:34:40 +02:00
Éric Araujo 1d7deafeea Branch merge 2011-09-12 17:15:26 +02:00
Éric Araujo cde6576820 Remove unneeded --all option of “pysetup list”.
The command without arguments already prints all installed distributions
found.

In addition, change “releases” for “projects” in the description of the
list action.  Strictly speaking, one installed distribution satisfies
the requirement for a release (i.e. version) of a project, but as
currently only one release per project can be installed at a time, the
two are somewhat equivalent, and “project” is more understandable in
help texts (which call their argument “dist”, by the way..)
2011-09-12 16:45:38 +02:00
Nadeem Vawda 64d25ddb9c Issue #12306: Add ZLIB_RUNTIME_VERSION to the zlib module.
While we're at it, also document ZLIB_VERSION.

Patch by Torsten Landschoff.
2011-09-12 00:04:13 +02:00
Nadeem Vawda 249ab5e8d1 BZ2File now uses the compresslevel argument given by the caller,
instead of ignoring it and always using a compression level of 9.
2011-09-11 22:38:11 +02:00
Benjamin Peterson c92f6226d7 add ChainMap to __all__ (closes #12959)
Thanks July Tikhonov.
2011-09-11 12:55:34 -04:00
Éric Araujo 647ef8cd68 Wrap pydoc output under 80 characters 2011-09-11 00:43:20 +02:00
Éric Araujo fb7d24492f Remove obsolete comment (yes, build_ext supports C++) 2011-09-10 18:22:31 +02:00
Éric Araujo 1f2bcd35bb Don’t let invalid line in setup.cfg pass silently 2011-09-10 18:22:04 +02:00
Éric Araujo c6d52eddaa Fix usage of bytes in packaging's bdist_wininst.
This is copied from the namesake distutils command; there is no
automated test, so buildbots won’t call for my head this time, but it
should be okay as Python 3 users have tested the distutils command.
2011-09-10 18:14:08 +02:00
Éric Araujo 030cfe26a3 Use bytes regex instead of decoding whole pages 2011-09-10 18:10:58 +02:00
Éric Araujo c8f9c81cfa Fix usage of dry-run in packaging bdist_wininst and install_distinfo.
In dry-run mode, packaging commands should log the same info as in real
operation and should collect the same files in self.outputs, so that
users can run a command in verbose and dry-run mode to see exactly what
operations will be done in the real run.
2011-09-10 18:10:23 +02:00
Éric Araujo e6db7a3a29 Fix determination of Metadata version in packaging (#8933).
Original patch by Filip Gruszczyński.
2011-09-10 05:22:48 +02:00
Éric Araujo 6bbd775377 Consolidate tests for packaging.metadata.
New tests were added in test_metadata and old tests inherited from
distutils were still in test_dist, so I moved them into test_metadata
(except for one which was more at home in test_run) and merged
duplicates.

I also added some skips to lure contributors <wink>, optimized the
Metadata.update method a trifle, and added notes about a number of
issues.

A note: The tests in test_dist used to dump the Metadata objects to a
file in the METADATA format and look for strings in its contents; I
updated them to use the mapping API of Metadata instead.  For some
fields with special writing rules, I have added tests to ensure my
conversion did not lose anything.
2011-09-10 05:18:20 +02:00
Éric Araujo 92ffc500d1 Merge fix for #8933 from 3.2 2011-09-10 04:56:44 +02:00
Éric Araujo 13e8c8e721 Fix determination of Metadata version (#8933). Patch by Filip Gruszczyński. 2011-09-10 01:51:40 +02:00
Éric Araujo fce67fcd84 Slight cleanup in distutils test_dist.
I have tests to add in this file and it’s always nice to start from a
clean base.
2011-09-10 01:34:44 +02:00
Jesus Cea ceb5d169e9 Better fix for #12763: test_posix failure on OpenIndiana 2011-09-10 01:16:55 +02:00
Jesus Cea 1e1c8f4913 Fix issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 22:16:57 +02:00
Jesus Cea da752d80c8 Fix issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 22:15:16 +02:00
Jesus Cea 440b3834e2 Close issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 20:29:01 +02:00
Jesus Cea 94f964f810 Close issue #12948: multiprocessing test failures can hang the buildbots 2011-09-09 20:26:57 +02:00
Charles-François Natali ea0d5fcb4a Issue #12871: sched_get_priority_(min|max) might not be defined even though
<sched.h> is available (most notably on OpenBSD when built without pthread):
add an explicit configure check.
2011-09-06 19:03:35 +02:00
Victor Stinner 900c292c6b Issue #12567: Fix curses.unget_wch() tests
Skip the test if the function is missing. Use U+0061 (a) instead of U+00E9 (é)
because U+00E9 raises a _curses.error('unget_wch() returned ERR') on some
buildbots. It's maybe because of the locale encoding.
2011-09-06 10:08:28 +02:00
Victor Stinner 71e44cb97f Issue #12567: Add curses.unget_wch() function
Push a character so the next get_wch() will return it.
2011-09-06 01:53:03 +02:00
Victor Stinner d4d8ae5a42 Issue #9561: packaging now writes egg-info files using UTF-8
instead of the locale encoding
2011-09-06 00:11:13 +02:00
Victor Stinner e01aa53ea6 Merge 3.2: Issue #9561: distutils now reads and writes egg-info files using UTF-8
instead of the locale encoding.
2011-09-05 23:46:05 +02:00
Victor Stinner a1bea6e10c Issue #9561: distutils now reads and writes egg-info files using UTF-8
instead of the locale encoding.
2011-09-05 23:44:56 +02:00
Victor Stinner a404b49321 Issue #12326: Remove plat-linux3 directory
sys.platform is now always 'linux2' on Linux (even on Linux 3)
2011-09-05 21:38:42 +02:00
Éric Araujo b22d148065 Branch merge 2011-09-05 17:44:47 +02:00
Éric Araujo bcf99ac665 Branch merge 2011-09-05 17:44:07 +02:00
Lars Gustäbel 24757851b7 Merge with 3.2: Issue #12841: Fix tarfile extraction of non-existent uids/gids. 2011-09-05 16:59:44 +02:00
Lars Gustäbel 2e7ddd374b Issue #12841: Fix tarfile extraction of non-existent uids/gids.
tarfile unnecessarily checked the existence of numerical user and group ids on
extraction. If one of them did not exist the respective id of the current user
(i.e. root) was used for the file and ownership information was lost. (Patch
by Sebastien Luttringer)
2011-09-05 16:58:14 +02:00
Ezio Melotti 6a8c8a80a1 #12888: merge with 3.2. 2011-09-05 17:15:32 +03:00
Ezio Melotti d9e0b068af #12888: Fix a bug in HTMLParser.unescape that prevented it to escape more than 128 entities. Patch by Peter Otten. 2011-09-05 17:11:06 +03:00
Éric Araujo 0df628511a Branch merge 2011-09-05 01:55:54 +02:00
Éric Araujo 17b288cdab Branch merge 2011-09-05 01:53:52 +02:00
Georg Brandl 3484a8771c Merge with release clone. 2011-09-04 08:35:54 +02:00
Benjamin Peterson 9fd5374d4e merge 3.2 (#12878) 2011-09-03 09:32:24 -04:00
Benjamin Peterson f6f3a35447 add a __dict__ descr for IOBase (closes #12878) 2011-09-03 09:26:20 -04:00
Éric Araujo 564fbac7cd Merge fix for #8286 from 3.2 2011-09-03 00:48:17 +02:00
Éric Araujo cfbd630a27 Warn instead of crashing because of invalid path in MANIFEST.in (#8286).
sdist used to crash with a full traceback dump instead of printing a
nice warning with the faulty line number.
2011-09-03 00:42:04 +02:00
Éric Araujo 32e2915da5 Enable catching WARN-level logging messages in distutils' test_sdist 2011-09-03 00:28:43 +02:00
Amaury Forgeot d'Arc 9b20e27c01 Merge from 3.2: Issue #12764: Fix a crash in ctypes when the name of a
Structure field is not a string.
2011-09-02 20:43:59 +02:00
Amaury Forgeot d'Arc 02dd539dbb Issue #12764: Fix a crash in ctypes when the name of a Structure field is not
a string.
2011-09-02 20:39:40 +02:00