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.2 - 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.2.tar.gz (28.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.2-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deprive-0.1.2.tar.gz
  • Upload date:
  • Size: 28.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.2.tar.gz
Algorithm Hash digest
SHA256 2697a364eb0990d4bcf3fd9d43875ea7260170afbe58b69763141700761d09d7
MD5 e41308df93317e30609194b9fca3d4a2
BLAKE2b-256 dedca13633a9f2645c89aa1742fd3f72a5355153de3c7206b5ed5370ca63f107

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deprive-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d9d438481cbec7d1f0001c1f9615d2a9789d53d1eb65502ce3e8e5678b5d4bb1
MD5 2a8560af244055719c756a59ac67dd34
BLAKE2b-256 2b9cf980a3d936e82bb6195303706f4b74a263b7e69aaa9070ee7852eeff88dd

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