This project has been archived by its maintainers, and is no longer receiving any updates.
Python 3.6 sre_parse module
Why
The initial motivation to "create" sre_parse36 is to provide a colorizer for regular expressions that produce the same expression as initially provided.
The handling of non-capturing groups changed from Python 3.7, we can't back reproduce the original regular expression from a SubPattern instance anymore. This regression is tracked at https://bugs.python.org/issue45674, hopefully it will be fixed in a future Python 3.9 bugfix release.
In Python 3.6:
>>> import sre_parse
>>> sre_parse.parse("(?:foo (?:bar) | (?:baz))").dump()
SUBPATTERN None 0 0
BRANCH
LITERAL 102
LITERAL 111
LITERAL 111
LITERAL 32
SUBPATTERN None 0 0
LITERAL 98
LITERAL 97
LITERAL 114
LITERAL 32
OR
LITERAL 32
SUBPATTERN None 0 0
LITERAL 98
LITERAL 97
LITERAL 122
In Python 3.7 and beyond:
>>> import sre_parse
>>> sre_parse.parse("(?:foo (?:bar) | (?:baz))").dump()
BRANCH
LITERAL 102
LITERAL 111
LITERAL 111
LITERAL 32
LITERAL 98
LITERAL 97
LITERAL 114
LITERAL 32
OR
LITERAL 32
LITERAL 98
LITERAL 97
LITERAL 122
Install
pip install sre_parse36
Usage
Replace sre_parse by sre_parse36.
Metadata
Release files for sre-parse36 1.0.0
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 | |
|---|---|---|---|---|
| sre_parse36-1.0.0.tar.gz | 22.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sre_parse36-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.0 kB
Release files / sre_parse36-1.0.0.tar.gz
| Download URL | sre_parse36-1.0.0.tar.gz |
|---|---|
| Size | 22.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3304ad42c03373278fa51b1cb51c6eb9e7749a0d9faa570ce09522fc84ae9618
|
|
BLAKE2b-256 checksum How to use checksums |
ad9be93f249c94811504f8a105f2cc23bb35c11c2fe6fb0d816fa8944fb6720f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.10
|
Release files / sre_parse36-1.0.0-py3-none-any.whl
| Download URL | sre_parse36-1.0.0-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb1379ac5d7ab0bcb4e8444a5b42ea5514e648731f4d30967c0729266d9d32ed
|
|
BLAKE2b-256 checksum How to use checksums |
92f9793311ff3306fa459ed93fa423983489975f5d157951d31af58a61a85078
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/56.0.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.10
|
Security for sre-parse36 1.0.0
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.