Skip to main content

Generate dependency graphs and modify Python packages based on the generated graphs.

Project description

Deprive

Installation

pip install deprive

Disabled Python Features

If one of the disabled features is used, a NotImplementedError will be raised:

  1. global and nonlocal keywords.
  2. Star imports (e.g., from module import *).
  3. Relative imports (e.g., from . import module).
  4. Multiple imports in a single statement (e.g., import os, sys).
  5. Redefining imports (independent of the scope).
  6. Multiple statements per line (e.g., a = 1; b = 2).

Discouraged Python Features

These following features don't raise any warning or errors, but the correctness of the output is not guaranteed:

  1. importlib.import_module, __import__, eval, exec, or similar dynamic functions.
  2. Overwriting built-in functions.
  3. Assigning functions to variables.
  4. Namespace packages (e.g., no __init__.py in a package).

TODO

  • Rewrite __all__: eval original all and only set still valid ones.

Changelog

0.1.0 - Initial Release

  • Initial implementation of the deprive library.
  • Support for parsing Python files and generating dependency graphs.
  • Codes needs to be cleaned up and refactored.

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

deprive-0.1.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

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

deprive-0.1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file deprive-0.1.0.tar.gz.

File metadata

  • Download URL: deprive-0.1.0.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for deprive-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a4656baebabaeddaac1b8f6fcb8ce1f346956a8d08401fa734d370212bb86a00
MD5 74d402eebf101204a667b8ad5e0ab7ca
BLAKE2b-256 93606d169ef79920386e4113f33a585232f9aff428c574270b430833dab4b671

See more details on using hashes here.

File details

Details for the file deprive-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: deprive-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for deprive-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f9f928fcd6b395f74e40cc705faa005e4ce72e1c17f3637b13aee617e235a80
MD5 4512257a18ea7289958e8979cd6e29ba
BLAKE2b-256 4a3064b11d4c21ad8b3b8ed0486f5c07e4ed78fada1ef38f3c7660e004ec9471

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