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.1.tar.gz (28.1 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.1-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deprive-0.1.1.tar.gz
  • Upload date:
  • Size: 28.1 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.1.tar.gz
Algorithm Hash digest
SHA256 f0daf7d1a7131982827b972ede10c5f8d5da7144ebb011a101ec116f162590f2
MD5 5fda69bdf42db6fd06d5ff5fcf554ef2
BLAKE2b-256 bdff27b33953ce28c85ab1ac796e0c035d481d52ccfcfb0b1a882ec9462a1a57

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deprive-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83d41b7a56f878c56b615a01f8a3097d7545f23f07236ea80d02ef87f3448304
MD5 5c52f32ac163c2ec42fde0622dca91d0
BLAKE2b-256 ffedd4ed16d624c4f2bac83508e81274bf42078671d5489edefb3d03bfcb2d3f

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