Skip to main content

Backports python3.10 typing features into python 3.7 and newer.

Reason this release was yanked:

Accidental release

Project description

sigparse

Backports python3.10 typing features into python 3.7, 3.8, and 3.9.

Example

import sigparse

def func(param_a: list[str], param_b: str | int, param_c: tuple[int | None]):
    ...

# This returns the same result in python 3.7, 3.8, 3.9, and 3.10!
sigparse.sigparse(func)

PEP604

By default PEP 604 (| for unions) is only enabled for sigparse.sigparse. To enable globally:

import sigparse
sigparse.global_PEP604()

Notes

Inspect

This module uses inspect behind the scenes. For that reason:

  • sigparse.Parameter.default is inspect._empty when there is no default value.
  • sigparse.Parameter.kind is inspect._ParameterKind.

Annotated

typing.Annotated will always be evaluated with include_extras=True in python3.9.

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

sigparse-1.2.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

sigparse-1.2.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file sigparse-1.2.1.tar.gz.

File metadata

  • Download URL: sigparse-1.2.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.8.13 Linux/5.15.0-1019-azure

File hashes

Hashes for sigparse-1.2.1.tar.gz
Algorithm Hash digest
SHA256 0cdc7b2f6d06c74ec649ccdf2264260d98828a239b4880f934dca98467d01514
MD5 b29fd16d3da687c481f4b02c31539614
BLAKE2b-256 d6c2d26d445e2faa9b958be6996018f249ace4e2166a7bc9fcbc9807008b99ab

See more details on using hashes here.

File details

Details for the file sigparse-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: sigparse-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.8.13 Linux/5.15.0-1019-azure

File hashes

Hashes for sigparse-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5ad0a43928c8f5e1690da6c79839d1443e0b0cb0a70b5563d3ef42c14f705640
MD5 9ef62adc95656cd86d65a142d713adea
BLAKE2b-256 f31073ffa90fa10702509110397fb10239b92994aaec4527852664927bc55f7f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page