Commit Graph

49848 Commits

Author SHA1 Message Date
Éric Araujo 2b612220e4 Clean up extra environment variable after packaging tests.
packaging.util.check_environ will define HOME and PLAT if they don’t exist; for
some reason, it does not define PLAT when running the tests from a checkout (so
no regrtest warning) but does when running from an installed Python.

Cleaning up the envvar in test_dist fixes the warning on my machine, but I
suspect that a test runner using a different order to run files or running them
in parallel may have PLAT defined in its environment because of another test.
Quite a lot of code ends up calling check_environ; maybe we should just clean
up PLAT in every test.  For now I’m doing this simple fix, we’ll see if we get
bug reports.
2011-06-10 04:29:43 +02:00
Éric Araujo f53cd89006 Fix omission in test for packaging install_distinfo command.
The code does not write checksum or file length for .pyc and .pyo in the RECORD
file, in compliance with PEP 376, but the test forgot to take .pyo into
account.  This was not caught because there were no .pyo in the checkout, but
after installing there are .pyo files created by compileall, and the test picks
them up.
2011-06-10 03:53:49 +02:00
Éric Araujo edd95dd3cb Remove *.egg-info from Makefile.pre.in (follow-up to d615eb7bce33, #12218) 2011-06-10 03:48:04 +02:00
Éric Araujo 5c6684f314 Packaging: use repr to display projects name (3ebabfbf6fe3 followup) 2011-06-10 03:10:53 +02:00
Éric Araujo 577a6af8e6 Merge doc fixes from 3.2 2011-06-09 16:28:19 +02:00
Éric Araujo f5949b5e47 The change done for #10645 deserves a NEWS entry 2011-06-09 14:10:07 +02:00
Éric Araujo e00a6703e8 Branch merge 2011-06-09 14:07:46 +02:00
Éric Araujo e6792c1e77 Stop creating a Python-X.Y.Z-pyX.Y.egg-info file on install (#10645) 2011-06-09 14:07:02 +02:00
Éric Araujo ebc991c0ce Branch merge 2011-06-09 13:13:24 +02:00
Éric Araujo c7f9f2bfc7 Document how to define extension modules in setup.cfg 2011-06-09 08:18:17 +02:00
Éric Araujo a462a80722 Fix incorrect nesting of sections in setup.cfg specification 2011-06-09 08:15:47 +02:00
Éric Araujo 0a975f957d Fix example in packaging test_config.
The example C extension used the “three.fast_taunt” name, but no “three” parent
was defined in the setup.cfg.  This did not cause a failure nor even print a
warning, we may want to change that.
2011-06-09 07:47:25 +02:00
Brian Curtin 9a82eaade3 Fix #11583. Changed os.path.isdir to use GetFileAttributes instead of os.stat.
By changing to the Windows GetFileAttributes API in nt._isdir we can figure
out if the path is a directory without opening the file via os.stat. This has
the minor benefit of speeding up os.path.isdir by at least 2x for regular
files and 10-15x improvements were seen on symbolic links (which opened the
file multiple times during os.stat). Since os.path.isdir is used in
several places on interpreter startup, we get a minor speedup in startup time.
2011-06-08 18:43:57 -05:00
Brian Curtin 9c669ccc77 Fix #11583. Changed os.path.isdir to use GetFileAttributes instead of os.stat.
By changing to the Windows GetFileAttributes API in nt._isdir we can figure
out if the path is a directory without opening the file via os.stat. This has
the minor benefit of speeding up os.path.isdir by at least 2x for regular
files and 10-15x improvements were seen on symbolic links (which opened the
file multiple times during os.stat). Since os.path.isdir is used in
several places on interpreter startup, we get a minor speedup in startup time.
2011-06-08 18:17:18 -05:00
Charles-François Natali 4dd453c6aa Issue #12021: Make mmap's read() method argument optional. Patch by Petri
Lehtinen.
2011-06-08 19:18:14 +02:00
Antoine Pitrou dd69649660 Issue #9205: concurrent.futures.ProcessPoolExecutor now detects killed
children and raises BrokenProcessPool in such a situation.  Previously it
would reliably freeze/deadlock.
2011-06-08 17:21:55 +02:00
Éric Araujo d2f8cec885 Fix a few misuses of :option: I missed in r86521.
Extract of the commit message:

  Fix usage of :option: in the docs (#9312).

  :option: is used to create a link to an option of python, not to mark
  up any instance of any arbitrary command-line option.  These were
  changed to ````.
2011-06-08 05:29:39 +02:00
Brett Cannon 4a5e5de03f Revert a reversed comparison order introduced in r70695. 2011-06-07 20:09:32 -07:00
Éric Araujo 96deb7550e Add links from builtins module docs to built-in functions and constants docs 2011-06-08 04:53:20 +02:00
Éric Araujo df8ef02488 Style change in packaging: use “not in” over “not x in”.
Such tests are IMO easier to read if both operators are grouped.
2011-06-08 04:47:13 +02:00
Éric Araujo 46bdcf7d4b Packaging: always use repr to display project names.
This helps debugging in case of trailing blanks and such things.
2011-06-08 04:40:13 +02:00
Éric Araujo ea888e038b Fix misunderstanding of how booleans work 2011-06-08 04:31:18 +02:00
Éric Araujo 3cab2f150c Packaging cleanup: normalize print calls.
Namely: use default arguments instead of explicit empty string; use multiple
arguments instead of building strings.
2011-06-08 04:10:57 +02:00
Éric Araujo 04fc999c05 Packaging cleanup: remove use of script_name where obsolete 2011-06-08 04:06:50 +02:00
Éric Araujo b805c47138 Add examples that work on Windows to distutils docs (#1626300) 2011-06-08 01:11:36 +02:00
Éric Araujo b8f2ad0380 Remove outdated bit of advice (584f9c213a6d follow-up) 2011-06-08 00:47:49 +02:00
Éric Araujo ef3062f7af Kill dead code in importlib.test.__main__ (#12019, reviewed by Brett Cannon) 2011-06-07 17:58:50 +02:00
Éric Araujo 313570a185 Branch merge: packaging fixes 2011-06-07 17:31:39 +02:00
Łukasz Langa 1752468d39 #12274: use proper escaping for % in IDLE config (merged from 3.2). 2011-06-07 15:20:51 +02:00
Łukasz Langa 41c1910bb3 #12274: use proper escaping for % in IDLE config. 2011-06-07 15:19:44 +02:00
Victor Stinner 3adba1ff81 (Merge 3.2) test.support: don't catch OSError when can_symlink() removes the
temporary symbolic link.
2011-06-07 12:19:34 +02:00
Victor Stinner 62ec61fb6a test.support: can_symlink() removes the temporary symbolic link 2011-06-07 12:17:15 +02:00
Brett Cannon eb175c473d Remove a redundant assignment.
Found by LLVM/clang 2.9.
2011-06-06 20:24:11 -07:00
Brett Cannon 5fac8af22c Checking if an unsigned long is < 0 is pointless.
Found by LLVM/clang 2.9.
2011-06-06 20:22:56 -07:00
Brett Cannon a0b1ff5844 Remove some extraneous parentheses and swap the comparison order to
prevent accidental assignment.

Silences a warning from LLVM/clang 2.9.
2011-06-06 20:20:36 -07:00
Brett Cannon c5011fe227 When building sqlite3, the directory where sqlite.h was found was
always appended to the include directories regardless of whether it
was already in the list of directories. This could cause issue if
sqlite was installed in the same location as another install of
Python. Now a check is done to make sure the directory is not included
twice.
2011-06-06 20:09:10 -07:00
Victor Stinner 149b1c7797 Use a sleep for test_subprocess timeout test
instead of an active loop (while True: pass) to limit race conditions.
2011-06-06 23:43:02 +02:00
Éric Araujo 69cdf9294f Fix UnboundLocalError in a finally block of one packaging test 2011-06-06 22:24:19 +02:00
Éric Araujo 7373fccd50 Fix sdist to always include setup.cfg (#11092), to comply with the spec 2011-06-06 21:55:43 +02:00
Éric Araujo 078368fe4d Use strings instead of sets of lines in packaging.create tests.
Using sets in tests did not check whether the values were written in the right
section or with the right key.
2011-06-06 20:59:56 +02:00
Éric Araujo de7563bd3c Fix comment 2011-06-06 20:28:13 +02:00
Éric Araujo 9808dac192 Update comments in sysconfig.cfg 2011-06-06 20:07:04 +02:00
Éric Araujo fdeb8bf292 Fix documentation of requires-python field in setup.cfg (#11041) 2011-06-06 19:57:02 +02:00
Charles-François Natali 368f34bb4b Issue #12196: Make os.pipe2() flags argument mandatory. 2011-06-06 19:49:47 +02:00
Antoine Pitrou 34b312e33d Whitespace normalization 2011-06-06 19:36:01 +02:00
Antoine Pitrou 176f07dadf Issue #12040: Expose a new attribute `sentinel` on instances of
:class:`multiprocessing.Process`.  Also, fix Process.join() to not use
polling anymore, when given a timeout.
2011-06-06 19:35:31 +02:00
Antoine Pitrou f068ab8304 Issue #11893: Remove obsolete internal wrapper class `SSLFakeFile` in the smtplib module.
Patch by Catalin Iacob.
2011-06-06 19:17:09 +02:00
Éric Araujo e67b1eab32 Merge 3.2 2011-06-06 17:13:08 +02:00
Éric Araujo e77535c90b Branch merge 2011-06-06 17:12:29 +02:00
Éric Araujo 5b52f95797 Branch merge 2011-06-06 17:11:47 +02:00