1
0
Fork 0
mirror of synced 2024-12-22 22:18:59 -05:00
Commit graph

7 commits

Author SHA1 Message Date
Kurt McKee
33f5390a62
Stop patches in the reverse order they were started
Because some functions are patched twice (like `os.rename()`),
stopping the patches in the same order they were started
can result in restoration of one of the patches.

For example:

```
fn = os.rename

# Patch nesting order: 1 then 2
os.rename = patch_1(fn)
os.rename = patch_2(patch_1(fn))

# Unpatch 1 then 2: A still-patched function is restored
os.rename = fn
os.rename = patch_1(fn)

# Unpatch 2 then 1: The original function is restored
os.rename = patch_1(fn)
os.rename = fn
```

Fixes #365
2024-12-18 08:31:31 -06:00
Kurt McKee
eba0b24331
Resolve a Python 3.12 DeprecationWarning 2023-09-10 10:27:54 -05:00
Anish Athalye
81d4a434ef Drop support for Python 2 and Python < 3.6
This patch also deletes all of the compatibility code that we no longer
need.
2023-09-09 20:57:01 -04:00
Kurt McKee
59b1b85d07 Account for MacOS and Windows temp directory issues 2022-05-18 06:37:48 -05:00
Kurt McKee
ea98e5eafc Add isort as a tox environment, and run it 2022-05-13 10:44:29 -05:00
Kurt McKee
566ba0b853 Add black as tox environment, and run it 2022-05-13 10:44:29 -05:00
Kurt McKee
c015f7bce8 Add a test framework for all supported Python versions 2022-05-13 10:44:29 -05:00