pydiff
pydiff diffs Python code at the bytecode level. This is useful for checking for changes to the actual code structure while ignoring formatting changes.
Installation
From pip:
$ pip install --upgrade pydiff
Example
foo.py:
import os, sys
def main():
x = len(sys.argv) + 100
y = x+77
print(y)
bar.py:
import os
import sys
def main():
x = len(sys.argv) + 101
y = x + 77
print(y)
$ pydiff foo.py bar.py:
---
+++
@@ -4,7 +4,7 @@
None,
{'co_argcount': 0,
'co_cellvars': (),
- 'co_consts': [None, 100, 77],
+ 'co_consts': [None, 101, 77],
'co_flags': 67,
'co_freevars': (),
'co_kwonlyargcount': 0,
Metadata
Release files for pydiff 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydiff-0.2.tar.gz | 4.1 kB | Without provenance | Details for pydiff-0.2.tar.gz |
Release files / pydiff-0.2.tar.gz
| Download URL | pydiff-0.2.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
847c7121625de8d5aa9eb2b079edad18a451e134cafa1b8958ea019ee0409aaa
|
|
BLAKE2b-256 checksum How to use checksums |
e4fd7d0c657a640e7329a4112deb437f43a84e07f1b935efe4c1e34bc356194f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pydiff 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.