Commit Graph

20136 Commits

Author SHA1 Message Date
Ned Deily 9937748f0c Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building
Distutils-based packages with C extension modules may fail because
Apple has removed gcc-4.2, the version used to build python.org
64-bit/32-bit Pythons.  If the user does not explicitly override
the default C compiler by setting the CC environment variable,
Distutils will now attempt to compile extension modules with clang
if gcc-4.2 is required but not found. Also as a convenience, if
the user does explicitly set CC, substitute its value as the default
compiler in the Distutils LDSHARED configuration variable for OS X.
(Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u
SDK, neither of which are available in Xcode 4.  This change does not
attempt to override settings to support their use with Xcode 4.)
2012-02-10 13:01:08 +01:00
Ezio Melotti 176630ec19 #13960: merge with 3.2. 2012-02-10 10:50:49 +02:00
Ezio Melotti fa3702dc28 #13960: HTMLParser is now able to handle broken comments when strict=False. 2012-02-10 10:45:44 +02:00
Éric Araujo 9f90a731eb Use sys.version_info instead of sys.version in packaging.
The contents of this attribute are an implementation detail, as
documented for #9442, so we should not parse it, to support non-CPython
VMs with distutils2 in the future.

Unfortunately, one use comes directly from PEP 345, so an edit will have
to be agreed before fixing the code (see comment in p7g.markers).

Other remaining uses are found in p7g.compiler and could be replaced by
the platform module (which also parses sys.version, but then it wouldn’t
be my fault :)
2012-02-10 05:20:53 +01:00
Éric Araujo ea0b1edf45 Branch merge 2012-02-10 05:12:58 +01:00
Éric Araujo 692a49394d Start improving 2to3 code in packaging (#13462).
- Change the fixers used in tests to something not provided by lib2to3
- Test conversion of doctests in text files
- Factor out test boilerplate into a common method
2012-02-09 21:37:14 +01:00
Éric Araujo 1a765f5d9d Synchronize packaging.tests.support with distutils2 2012-02-09 21:30:25 +01:00
Éric Araujo 6e1f564efa More boolean tests for packaging metadata environment markers 2012-02-09 21:18:26 +01:00
Éric Araujo ac03a2b089 Remove unneeded import 2012-02-09 21:17:46 +01:00
Petri Lehtinen bc35bebb45 Undocument and clean up sqlite3.OptimizedUnicode
Closes #13921.
2012-02-09 21:09:03 +02:00
Éric Araujo 5c69b66086 Group commands by topic in “pysetup run --list-commands” output.
This fixes a regression from distutils, where “setup.py --help-commands”
prints out commands grouped by topic (i.e. building vs. installing),
which is more useful than using sorted.
2012-02-09 14:29:11 +01:00
Brett Cannon 4a2e1a0da7 Undo a bad mq management thingy. 2012-02-08 19:11:53 -05:00
Brett Cannon 97771096ab Whitespace normalization. 2012-02-08 18:55:37 -05:00
Brett Cannon b4e63b3177 Use the cwd when the empty string is found in sys.path. This leads to
__file__ being an absolute path when the module is found in the
current directory.
2012-02-08 18:52:56 -05:00
Brett Cannon 354c26ecd6 Move setup code from importlib.__init__ to
importlib._bootstrap._setup().
2012-02-08 18:50:22 -05:00
Brett Cannon 8490fab4ad Don't fail in the face of a lacking attribute when wrapping a
function.
2012-02-08 18:44:14 -05:00
Antoine Pitrou 81a1fa5c77 get_terminal_size() can also fail with ENOTTY if the fd is not connected to a terminal. 2012-02-09 00:11:00 +01:00
Antoine Pitrou cfade36227 Relax tests to fix buildbot failure 2012-02-08 23:48:59 +01:00
Antoine Pitrou bcf2b59fb5 Issue #13609: Add two functions to query the terminal size:
os.get_terminal_size (low level) and shutil.get_terminal_size (high level).
Patch by Zbigniew Jędrzejewski-Szmek.
2012-02-08 23:28:36 +01:00
Victor Stinner 4195b5caea Backout f8409b3d6449: the PEP 410 is not accepted yet 2012-02-08 23:03:19 +01:00
Charles-François Natali b2c9e9ad91 Skip test_threading.test_reinit_tls_after_fork() on platforms where fork()
can't be called reliably from a worker thread.
2012-02-08 21:29:11 +01:00
Victor Stinner ccd5715a14 PEP 410 2012-02-08 14:31:50 +01:00
Charles-François Natali 6f91ce74a0 Skip test_threading.test_reinit_tls_after_fork() on platforms where fork()
can't be called reliably from a worker thread.
2012-02-08 21:30:02 +01:00
Charles-François Natali ed4a8fc095 Issue #8184: multiprocessing: On Windows, don't set SO_REUSEADDR on Connection
sockets, and set FILE_FLAG_FIRST_PIPE_INSTANCE on named pipes, to make sure two
listeners can't bind to the same socket/pipe (or any existing socket/pipe).
2012-02-08 21:15:58 +01:00
Victor Stinner 1aa54a417d Issue #13964: Skip os.*utime*() tests if os.stat() doesn't support timestamp
with a subsecond resolution
2012-02-08 04:09:37 +01:00
Victor Stinner a2f7c00638 Issue #13964: Split os.*utime*() subsecond tests into multiple tests to help
debugging
2012-02-08 03:36:25 +01:00
Victor Stinner 8b6f10dda2 Issue #13964: Test also os.futimesat() 2012-02-08 03:07:25 +01:00
Victor Stinner be557dedf9 Issue #13964: Write tests for new os.*utime*() functions 2012-02-08 03:01:11 +01:00
Victor Stinner 8b30201f7d Issue #13846: Add time.monotonic(), monotonic clock. 2012-02-07 23:29:46 +01:00
Brett Cannon cae1068e82 Re-order importlib benchmarks to be consistent. Also print out what implementation of __import__ is used. 2012-02-07 09:40:33 -05:00
Brett Cannon 3fd6e2b910 Merge 2012-02-07 09:20:20 -05:00
Brett Cannon 466e6a90f2 Have importlib.test.benchmark test with tabnanny as a medium-sized test. 2012-02-07 09:19:12 -05:00
Petri Lehtinen 4a84f58143 Issue #10811: Fix recursive usage of cursors. Instead of crashing, raise a ProgrammingError now. 2012-02-06 22:04:18 +02:00
Charles-François Natali 7794090251 Following Nick's suggestion, rename posix.fdlistdir() to posix.flistdir(), to
be consistent with other functions accepting file descriptors (fdlistdir() was
added in 3.3, so hasn't been released yet).
2012-02-06 19:54:48 +01:00
Éric Araujo 2f8c3f7ed7 Fix typos in comments.
Reported by David-Sarah Hopwood on the Bitbucket bug tracker of
Tarek’s former verlib/distutils.version project.
2012-02-06 16:12:21 +01:00
Ned Deily 6b1aecfdbf Issue #10881: merge 2012-02-06 01:00:05 +01:00
Ned Deily d531b295f2 Issue #10881: Fix test_site failure with OS X framework builds. 2012-02-06 00:58:18 +01:00
Terry Jan Reedy ea4afbb6bc Merge with 3.2 #964437 2012-02-05 15:24:39 -05:00
Terry Jan Reedy e91e7637bb Issue 964437 Make IDLE help window non-modal.
Patch by Guilherme Polo and Roger Serwy.
2012-02-05 15:14:20 -05:00
Terry Jan Reedy d8d2c984d3 Merge with 3.2
#13933 refine patch using 'new' builtin
2012-02-05 14:32:37 -05:00
Terry Jan Reedy a77aa69870 #13933 refine patch using 'new' builtin 2012-02-05 14:31:16 -05:00
Charles-François Natali 7372b06cd7 Issue #13734: Add os.fwalk(), a directory walking function yielding file
descriptors.
2012-02-05 15:15:38 +01:00
Éric Araujo cd0d951a70 Merge edits from 3.2 (#13716, #1040439, #2945, #13770, #6715) 2012-02-05 13:49:59 +01:00
Éric Araujo cd2a6033ac Branch merge 2012-02-05 13:41:47 +01:00
Éric Araujo 89dfd5cf80 Really make bztar support in shutil conditional.
This dict entry is added a few lines after if the bzip2 module is
available, but removing this line was forgotten.
2012-02-05 13:40:08 +01:00
Éric Araujo 04410c05c1 Branch merge 2012-02-05 10:48:52 +01:00
Éric Araujo dcfcb64582 Stop converting package_data to extra_files in pysetup create (#13712).
pysetup create, the setup.cfg creation helper, used to convert
package_data (from an existing setup.py) into extra_files, the
replacement for MANIFEST.in, but these files are only present in sdists,
not installed: they don’t have the same use case at all, so converting
one into the other did not work.
2012-02-05 10:26:16 +01:00
Meador Inge 558880451c Issue #12142: Fixed reference cycle when importing ctypes 2012-02-04 20:38:20 -06:00
Meador Inge 8582bb1ebd Issue #12142: Fixed reference cycle when importing ctypes 2012-02-04 20:36:48 -06:00
Éric Araujo 31aefde876 Allow multiple values for package_data in setup.cfg (#11805).
Even though the resources system obsoletes data_files and package_data
(see bug discussion), package_data still exists to allow compatibility
with distutils and thus an easier transition.  In setup.py, the values
are lists of glob patterns, so the setup.cfg syntax needed a way to
express multiple values too.

Doc for this option will be added later as part of the big packaging doc
patches.  For now, the test serves as example.

Reported by Erik Bray.
2012-02-04 21:53:07 +01:00
Éric Araujo 591f6e82bd Improve one packaging test, remove a setuptoolism in another 2012-02-04 21:43:07 +01:00
Ned Deily 08d052ac5a Issue #13933: merge 2012-02-04 18:38:10 +01:00
Ned Deily ed3b867f33 Issue #13933: IDLE auto-complete did not work with some imported
module, like hashlib.  (Patch by Roger Serwy)
2012-02-04 18:36:43 +01:00
Antoine Pitrou 672b3ac2f0 Fix failing test on big-endian machines (issue #13806). 2012-02-04 16:49:31 +01:00
Antoine Pitrou f99f3339fd Fix failing test on big-endian machines (issue #13806). 2012-02-04 16:44:21 +01:00
Charles-François Natali edc67feaa4 Issue #8184: Fix a potential file descriptor leak when a
multiprocessing.Connection socket can't be bound.
2012-02-04 15:12:08 +01:00
Charles-François Natali 992ca5278e Issue #8184: Fix a potential file descriptor leak when a
multiprocessing.Connection socket can't be bound.
2012-02-04 14:55:53 +01:00
Nadeem Vawda 54d8144bb0 Make BZ2File.__init__()'s fileobj argument keyword-only. 2012-02-04 13:58:07 +02:00
Nadeem Vawda cac8909d0c Update docstring for BZ2File.__init__(). 2012-02-04 13:08:11 +02:00
Benjamin Peterson 7bbb6e8cf9 merge 3.2 2012-02-03 19:09:38 -05:00
Benjamin Peterson 050a05aeef remove unused import 2012-02-03 19:07:30 -05:00
Ned Deily f16d6771c7 Issue #13861: merge 2012-02-03 23:16:11 +01:00
Ned Deily 3429491950 Issue #13861: Prevent test_apropos* test case failures in test_pydoc. 2012-02-03 23:14:37 +01:00
Ned Deily 61c4e10035 Issue #13901: Prevent test_packaging failures on OS X with --enable-shared. 2012-02-03 02:46:37 +01:00
Ned Deily f9b0255db3 merge 2012-02-03 02:45:05 +01:00
Ned Deily cf550dcff8 Issue #13901: Prevent test_distutils failures on OS X with --enable-shared. 2012-02-03 02:42:16 +01:00
Charles-François Natali 3f32fc87ad Merge. 2012-02-02 20:38:10 +01:00
Charles-François Natali 227e377b36 Merge. 2012-02-02 20:37:29 +01:00
Charles-François Natali 6d0d24e359 Issue #13817: After fork(), reinit the ad-hoc TLS implementation earlier to fix
a random deadlock when fork() is called in a multithreaded process in debug
mode, and make PyOS_AfterFork() more robust.
2012-02-02 20:31:42 +01:00
Petri Lehtinen 4b0eab62f0 Merge branch 3.2
Closes #13402.
2012-02-02 21:23:15 +02:00
Petri Lehtinen 9713321f46 Document absoluteness of sys.executable
Closes #13402.
2012-02-02 20:59:50 +02:00
Petri Lehtinen f854799d84 Make sqlite3 tests editable with Emacs
Change the coding declaration from ISO-8859-1 to iso-8859-1. Emacs
doesn't understand the former.
2012-02-02 20:47:59 +02:00
Stefan Krah c317a1c185 Issue #1813: merge changeset that reverts a glibc workaround for the
Fedora buildbot.
2012-02-02 16:50:10 +01:00
Stefan Krah 03c29f90c3 Issue #1813: Revert workaround for a glibc bug on the Fedora buildbot. 2012-02-02 16:40:52 +01:00
Brian Curtin 090ec3c7fc merge. again. 2012-02-01 15:24:10 -06:00
Brian Curtin 97e2008645 merge updates 2012-02-01 15:20:03 -06:00
Brian Curtin 8d132c88c2 merge from 3.2 2012-02-01 15:15:14 -06:00
Brian Curtin 10dda6e029 Add a hint that CSD == Service Pack.
People searcing for the way to get a "service pack" will never find that we
provide it here, and people that find this function won't know what CSD is
until they run the function. On top of this, they won't know what the value
means unless they really have a service pack installed.

CSD, or Customer Service Diagnostics, is apparently no longer used, and was
rarely used term at that. Most references to it online are from
universities making Windows 2000 and XP service packs available to students.
2012-02-01 15:14:00 -06:00
Petri Lehtinen 8940f6242c Merge branch 3.2
Closes #13676.
2012-02-01 22:21:05 +02:00
Petri Lehtinen 023fe334bb sqlite3: Handle strings with embedded zeros correctly
Closes #13676.
2012-02-01 22:18:35 +02:00
Brett Cannon 5ea5b67a0b Fix a minor output typo as found by Terry Reedy. 2012-01-31 17:02:10 -05:00
Brett Cannon cdf1121076 Merge 2012-01-31 14:58:07 -05:00
Terry Jan Reedy 5d605c2861 Merge with 3.2 whitespace 2012-01-31 02:58:39 -05:00
Terry Jan Reedy 4d82ade424 whitespace 2012-01-31 02:57:29 -05:00
Terry Jan Reedy f8672bec68 Merge 3.2
- Issue #13506: Add '' to path for IDLE Shell when started and restarted with Restart Shell.
  Original patches by Marco Scataglini and Roger Serwy.
Merge 3.2 #13506 Add '' to path for interactive interpreter by adding with_cwd
parameter to PyShell.PyShell.transfer_path() and changing elsewhere as needed.
Original patches by Marco Scataglini and Roger Serwy.
2012-01-31 02:42:19 -05:00
Terry Jan Reedy da4c467210 #13506 Add '' to path for interactive interpreter by adding with_cwd parameter
to PyShell.PyShell.transfer_path() and changing elsewhere as needed.
Original patches by Marco Scataglini and Roger Serwy.
2012-01-31 02:26:32 -05:00
Brett Cannon e3a9ae5ece Let importlib.test.benchmark take a specific benchmark name to run. 2012-01-30 19:27:51 -05:00
Brett Cannon 190f33cd2b Allow for the specification of a file to dump importlib benchmark
results to (and to compare against previous runs).
* * *
Move importlib.test.benchmark to argparse.
2012-01-30 19:12:29 -05:00
Antoine Pitrou f3b2d88b67 Issue #8828: Add new function os.replace(), for cross-platform renaming with overwriting. 2012-01-30 22:08:52 +01:00
Brett Cannon 8a8945085f Issue #13890: Also fix for extension module tests for case-insensitivity. 2012-01-30 12:51:49 -05:00
Brett Cannon 01ad3251ae Issue #13890: Fix importlib case-sensitivity tests to not run on Windows.
Thanks to os.environ under Windows only updating the dict and not the
environment itself (as exposed by nt.environ), tests using
PYTHONCASEOK always fail. Now the tests are skipped when os.environ
does not do what is expected.
2012-01-30 12:48:16 -05:00
Victor Stinner 2d6251c7f7 Issue #13847: Fix test_time, time.gmtime() doesn't use localtime()
On Windows, localtime(-1) fails, but not gmtime(1).
2012-01-30 00:23:32 +01:00
Antoine Pitrou 7ab4af0427 Issue #13848: open() and the FileIO constructor now check for NUL characters in the file name.
Patch by Hynek Schlawack.
2012-01-29 18:43:36 +01:00
Antoine Pitrou 1334884ff2 Issue #13848: open() and the FileIO constructor now check for NUL characters in the file name.
Patch by Hynek Schlawack.
2012-01-29 18:36:34 +01:00
Benjamin Peterson df13b5fae1 merge 3.2 2012-01-28 20:33:52 -05:00
Benjamin Peterson 3cd4607176 remove tests from really old regex module 2012-01-28 20:33:21 -05:00
Antoine Pitrou 04d9dd06aa Issue #13806: The size check in audioop decompression functions was too strict and could reject valid compressed data.
Patch by Oleg Plakhotnyuk.
2012-01-28 22:02:47 +01:00
Antoine Pitrou 75ff65ef96 Issue #13806: The size check in audioop decompression functions was too strict and could reject valid compressed data.
Patch by Oleg Plakhotnyuk.
2012-01-28 22:01:59 +01:00
Antoine Pitrou ce816a5111 Issue #13895: fix test_ssl hanging under Ubuntu 2012-01-28 17:40:23 +01:00
Antoine Pitrou eba63c4203 Issue #13895: fix test_ssl hanging under Ubuntu 2012-01-28 17:38:34 +01:00