Skip to main content

A wrapper around Linux's renameat2 system call

Project description

python-renameat2

This is a Python wrapper (using CFFI) around Linux's renameat2 system call. With renameat2, you can atomically swap two files, choose if existing files are replaced, and create "whiteout" files for overlay filesystems.

Requirements

This package requires Python 3.6. I tried building it for Python 3.5 and got some syntax errors with the type declarations. I don't care about Python 3.5 personally so I didn't bother fixing it. If you care about Python 3.5 and want to write a patch to make it work there too, I would consider merging it.

This package requires Linux, because renameat2 is a Linux-specific system call. Your kernel must be version 3.15.0 or newer to use renameat2; it does not exist in older kernels. Importing this module will raise a RuntimeError if you are not running on Linux or if your kernel is older than 3.15.0.

This package does not have any libc requirements; glibc includes a wrapper for renameat2 in version 2.28 and newer, but this is significantly newer than the glibc in any of the manylinux containers. In order to avoid inflicting any libc requirements on the user, this package brings its own wrapper function that makes the system call directly.

Status

Stableish? It's just a single system call and I can't imagine doing too much more with the interface. I did use this project to brush about 11 years of dust off of my Python packaging techniques, though, so let me know if you see anything amiss. Pull requests are welcome.

Links

License

This package is provided under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

renameat2-0.3.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

renameat2-0.3.1-cp39-cp39-manylinux2014_aarch64.whl (17.7 kB view details)

Uploaded CPython 3.9

renameat2-0.3.1-cp39-cp39-manylinux1_x86_64.whl (17.1 kB view details)

Uploaded CPython 3.9

renameat2-0.3.1-cp39-cp39-manylinux1_i686.whl (16.6 kB view details)

Uploaded CPython 3.9

renameat2-0.3.1-cp38-cp38-manylinux2014_aarch64.whl (18.1 kB view details)

Uploaded CPython 3.8

renameat2-0.3.1-cp38-cp38-manylinux1_x86_64.whl (17.6 kB view details)

Uploaded CPython 3.8

renameat2-0.3.1-cp38-cp38-manylinux1_i686.whl (17.0 kB view details)

Uploaded CPython 3.8

renameat2-0.3.1-cp37-cp37m-manylinux2014_aarch64.whl (17.7 kB view details)

Uploaded CPython 3.7m

renameat2-0.3.1-cp37-cp37m-manylinux1_x86_64.whl (17.1 kB view details)

Uploaded CPython 3.7m

renameat2-0.3.1-cp37-cp37m-manylinux1_i686.whl (16.6 kB view details)

Uploaded CPython 3.7m

renameat2-0.3.1-cp36-cp36m-manylinux2014_aarch64.whl (17.7 kB view details)

Uploaded CPython 3.6m

renameat2-0.3.1-cp36-cp36m-manylinux1_x86_64.whl (17.1 kB view details)

Uploaded CPython 3.6m

renameat2-0.3.1-cp36-cp36m-manylinux1_i686.whl (16.6 kB view details)

Uploaded CPython 3.6m

File details

Details for the file renameat2-0.3.1.tar.gz.

File metadata

  • Download URL: renameat2-0.3.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1.tar.gz
Algorithm Hash digest
SHA256 bf15d0472aea92efc81ee4f1eb576fc4f030634c90c1d776675ead7a74ad07a2
MD5 446585d2efcc24d666b7b31b3bf3bf30
BLAKE2b-256 0213cdfa1349618728deeed9a76a4ea874e6cc31d0e31de81ef5799fd2246504

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp39-cp39-manylinux2014_aarch64.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp39-cp39-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp39-cp39-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b6e1c189f0deebb189945432bad7a066b958642043d3cd2ee4ee5184f4ca5ed6
MD5 94215779be06422a051c93232086e4f5
BLAKE2b-256 d55fff7ada97f9ceee3b85485857caa5f3061c4f3dbfcc4cf72d5496ffe1a8ce

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp39-cp39-manylinux1_x86_64.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f8a3d1829aa6ed2302032575387ca95dd465071ab86fad075a694435107d9753
MD5 b48c83ff552ef8b0cab0433d58608ea0
BLAKE2b-256 ee44f38f02a6b3372351760e19005b133f8c2fce9933dd575fca9bf4a122a170

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp39-cp39-manylinux1_i686.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp39-cp39-manylinux1_i686.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp39-cp39-manylinux1_i686.whl
Algorithm Hash digest
SHA256 da0367d73e26060877215c0605ea7609aff9dd020d41d90c27cb93ebc30402b7
MD5 6f82a86f26cf4afead275cde3ff70c7a
BLAKE2b-256 34a712b509e6d3707428af559b8bb19a1aec7055ef4de59c51bf4a994ec9bbd6

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp38-cp38-manylinux2014_aarch64.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp38-cp38-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp38-cp38-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1e8d3654eeae6dd2c4b2dbd6943e5cd9aa3f93ff796dba3bd2eb59bcb7d880fc
MD5 470b62ac108afb1cef6c6d9194821e52
BLAKE2b-256 f4efd6b1a702940401343b6df33efd186cc20510b22a590487e8c96c66bbda7a

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dc8d315c5388259b07ec7d621867024bbb3f74fb461e41a7b4858ddc5eaf6431
MD5 abe4d679a7489417db3b9b9facb20105
BLAKE2b-256 b140610e12737eda51f59e58777f1436fc5c738bd35cdc8d54fa414a5176bfc1

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp38-cp38-manylinux1_i686.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 d2055debcc494ec292c53010b4e1abdf9933a85f0e2338596240ff089c8fb2bf
MD5 538cda3dc9a5716a880388d4830c09b0
BLAKE2b-256 e2f835701bc3ec0b0807b689c20e2008680a10a7bf33bb915a12a2db9aa388b4

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp37-cp37m-manylinux2014_aarch64.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp37-cp37m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4941ae1a973910be59953a5ce6c95c5364d7c9199bfe894401c2ac413ea6a9db
MD5 7f41f69cb16cb1a7234410f23d682fed
BLAKE2b-256 781de34c91e6c33ecdc80f698db76567ca57c0ac66cabe2d9d6342c2c017ba1c

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2b1e587ec2d82c4f1258322087c6e6fdc304e82cdc4296978dbbfe6889a5d04f
MD5 8f7710f1418de2b521e852c25881226d
BLAKE2b-256 d8fb4402d81ad1535b556300548fb5414fdb16102d11bc996134ac825819cea4

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 f682000ffeaa4629bdfec97d4f3102c6d1c7af95b5f756cbee76128031c54bf4
MD5 867fdd166777bf0dc4d19ce37b9362c1
BLAKE2b-256 2a31165613d9c88ca3006a7d7a783ba4dedaf86a203afb2b94b38613dc7655b2

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp36-cp36m-manylinux2014_aarch64.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp36-cp36m-manylinux2014_aarch64.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp36-cp36m-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0c2281923a1284d73d29156d9a460a6ba31fbaafd99dc87679c498783d409826
MD5 4d64b0b9cbdaa648eac8e8c05ada8954
BLAKE2b-256 5f48073efaaeeed1bc4cb4a348ef5b55f84ad8392bb91b5452e1710a7d04c4fe

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 248211b1f810734bfe29aa7986f24bcc6dd8fcae8a613ea5daab004eee011165
MD5 94041dbd769b426e5c1fd7a4e5172923
BLAKE2b-256 13363e3d43e54f1ed54d225823ff5fdc92a812d90a345007838e52aa296162b3

See more details on using hashes here.

File details

Details for the file renameat2-0.3.1-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: renameat2-0.3.1-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for renameat2-0.3.1-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 b8beee71c1e489b781398a17dcc8583de74100410e8be827c62a315683922eac
MD5 a0a38a3c7a61bddb58d1b9ef5c95a900
BLAKE2b-256 7589806d9bfb557bd1bfc4ccee423480f48410389b920c1885a1cfc628cfec56

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page