Commit Graph

15 Commits

Author SHA1 Message Date
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
Éric Araujo 95fc53f2b3 Clean up packaging.util: add __all__, remove some unused functions.
This huge module is the heir of six distutils modules, and contains
a number of miscellaneous functions.  I have attempted to help readers
of the source code with an annoted __all__.  Removed or deprecated
functions have been removed from the documentation; I’m working on
another patch to document the remaining public functions.

For the curious:

The unzip_file and untar_file were used by (or intended to be used by)
“pysetup install path/to/archive.tar.gz”, but the code presently used
shutil.unpack_archive and an helper function, so I just deleted them.
They’re still in the repository if we need them in the future.

The find_packages function is not used anymore but I want to discuss
module and package auto-discovery (in “pysetup create”) again before
removing it.

subst_vars now lives in sysconfig; rfc822_escape is inlined in
packaging.metadata.  Other functions are for internal use only, or
deprecated; I have left them out of __all__ and sprinkled TODO notes
for future cleanups.
2011-09-01 05:11:29 +02:00
Éric Araujo ce5fe83878 Factor out code used by packaging commands for HTTP requests (#12169).
We now have one function to prepare multipart POST requests, and we use
CRLF, as recommended by the HTTP spec (#10150).  Initial patch by John
Edmonds.
2011-07-08 16:27:12 +02:00
Éric Araujo ed5d2f1310 Minor tweaks to packaging tests.
- Move a tearDown method right after setUp
- Use assertRaises instead of reinventing it
- Skip a test instead of commenting it out, as a reminder
2011-06-17 15:47:41 +02:00
Éric Araujo 043f5ae697 Specify the encoding of the setup.cfg in one packaging test (#12320) 2011-06-12 22:04:58 +02:00
Éric Araujo 643cb7345f Allow multiple setup hooks in packaging’s setup.cfg files (#12240).
Original patch by Erik Bray.
2011-06-11 00:33:38 +02:00
Éric Araujo 3605030c9b Fix assorted bugs in packaging.util.cfg_to_args (#11595).
Original patch by Erik Bray.
2011-06-10 23:52:26 +02:00
Tarek Ziade b1b6e1384c Cleaned up the installer output behavior.
This change also makes sure the logger handlers are not alterated after an
installation. That also fixes the remaining environment alteration issue in
test_packaging.
2011-05-30 12:07:49 +02:00
Tarek Ziade fabc30833f fixed the cwd cleanup in packaging test_util 2011-05-23 18:47:27 +02:00
Tarek Ziade 94449616da fixed a few mocking/cleanup issues in packaging test_util for win32 2011-05-21 10:37:58 +02:00
Victor Stinner 9904b22b78 Close #12114: fix a potential deadlock in packaging.util._find_exe_version()
Avoid also zombi processes: Popen.communicate() calls its wait() method.
2011-05-21 02:20:36 +02:00
Victor Stinner e1e3b12979 fix packaging tests on Windows: use os.path.join() in glob patterns 2011-05-20 00:33:39 +02:00
Victor Stinner f966803c08 packaging: fix the constructor of FakePopen
packaging.util requires the env keyword.
2011-05-20 00:12:10 +02:00
Victor Stinner 21a9c748aa packaging: use with open() instead of try/finally: close 2011-05-19 15:51:27 +02:00
Tarek Ziade 1231a4e097 initial import of the packaging package in the standard library 2011-05-19 13:07:25 +02:00