Commit Graph

26 Commits

Author SHA1 Message Date
Pradyun Gedam 6fa4a9a0a7 Clean up code style changes
Toward minimizing style changes in the overall PR diff, or toward
consistency with the future use of black (in cases where I wasn't sure
of a good way to minimize the diff).
2020-07-17 14:33:19 +07:00
Nguyễn Gia Phong f8b06a3906 Enable flake8-logging-format 2020-07-17 14:33:19 +07:00
Tzu-ping Chung 1056681686 Non-ASCII names are not weird 2020-05-19 16:03:51 +08:00
Tzu-ping Chung dc4171c213 Python 2 works but not tested 2020-05-19 16:03:51 +08:00
Chris Hunt 63743fcc30 Make ephem-wheel-cache tempdir name globally accessible 2020-02-04 23:01:24 -05:00
Chris Hunt bdde27bfd8 Add BuildEnvironment._temp_dir to tempdir registry
Similar to the InstallRequirement temp build dir, now we'll be able to
refactor this to be globally managed.
2020-02-04 20:31:34 -05:00
Chris Hunt 2f4bfc3efc Add InstallRequirement._temp_build_dir to tempdir registry
Now we can refactor this to be globally managed, and it will have the
same behavior as it does currently (if there is any
PreviousBuildDirError it will not be cleaned up).
2020-02-04 20:29:26 -05:00
Chris Hunt 45991bcc1e Use explicit default value for TempDirectory delete flag
Now we can opt-in to globally-managed + globally-configured file
deletion for pre-existing directories by passing an explicit `None`.
2020-01-29 23:04:14 -05:00
Tzu-ping Chung ffa6d9d3d0 Delay TempDirectory.delete resolution to cleanup 2020-01-17 21:06:13 +08:00
Chris Hunt 0a57e4e9f2 Manage temp directory deletion centrally
This gives us a global toggle that we can use to control whether
temporary directories get deleted from one place (ideally, in the
commands taking --no-clean).
2020-01-10 11:08:05 +01:00
Maxim Kurnikov 3cb30385d8 remove disallow_untyped_defs=False for more modules 2019-12-13 10:22:21 +03:00
Chris Hunt 0457826bd0 Add global TempDirectory manager
In cases where there is not a clear scope, or where enforcing a scope
and passing a temp directory to callees creates unnecessary coupling
between components, this will let us tie the lifetime of temporary
directories to the lifetime of the application without using e.g.
atexit or finalizers.

This has the benefit of being easier to test and reason about.
2019-12-09 06:06:37 +08:00
Maxim Kurnikov 3692097cca add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
Chris Hunt e6bde63620 Assert TempDirectory.path has not been cleaned up on access 2019-09-23 20:09:04 -04:00
Chris Hunt 97ec73881e Switch TempDirectory.path to property 2019-09-23 18:41:31 -04:00
Chris Hunt ebd286ebec Add types to TempDirectory 2019-09-22 00:02:46 -04:00
Chris Hunt 85dcaa74bb Unconditionally create TempDirectory.path 2019-09-22 00:02:46 -04:00
Chris Hunt 92e9748147 Make TempDirectory._create return path instead of setting self.path 2019-09-19 22:16:00 -04:00
Steve Dower 53d28bae66 Added more tests and handling for short directory names 2019-02-04 14:48:41 -08:00
Steve Dower c31f19fcae Fixes #6169: AdjacentTempDirectory should fail on unwritable directory 2019-02-04 11:11:53 -08:00
Steve Dower b5dd2791b7 Make failed uninstalls roll back more reliably and better at avoiding naming conflicts (#6225) 2019-02-03 04:39:06 -08:00
Steve Dower f4bdd28e25 Fix linting issues 2018-11-21 14:13:45 -08:00
Steve Dower 1bf93a78cb Adds test for AdjacentTempDirectory._generate_names 2018-11-21 13:53:49 -08:00
Steve Dower 85f9cdf866 Remove makedirs call 2018-11-21 13:25:49 -08:00
Steve Dower c7ae06c798 Fixes #3055 Uninstall causes paths to exceed MAX_PATH limit 2018-11-21 13:14:36 -08:00
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Renamed from pip/utils/temp_dir.py (Browse further)