Skip to main content

julia_semver

This package allows you to work with Julia version specifiers in Python. It provides three functions

  • version - accepts a Julia version string and returns an instance of semantic_version.Version.
  • semver_spec - accepts a Julia version specifier string and returns an instance of semantic_version.NpmSpec.
  • match - match(spec, vers) returns true if vesion vers satisfies specifier spec.

The tools in semantic_version can then be used to work with versions and version specifiers.

Motivation

The package semantic_version can represent Julia versions and version specifiers. But, it does not support the Julia syntax for constructing these representations from strings. This package provides functions for these constructions that implement the Julia syntax exactly.

Install

pip install julia_semver

Details

  • All of the Julia version specifier format (as of julia v1.8) is supported.

  • The syntax of the version strings and version specifier strings is exactly the same as that described in Julia docs and implemented in Julia.

Semantics of matching and comparison

The functions and methods in semantic_version for comparing and matching differ in some respects from those of Julia. In particular, in Julia, the prerelease is ignored when matching a version to a version specifier. The function julia_semver.match tries to preserve the Julia semantics:

semver_spec("1").match(version("1.1.2-DEV")) # False
julia_semver.match("1", "1.1.2-DEV") # True
julia_semver.match("1", "1.1.2-DEV", strict=True) # False

Examples

See the test suite for more examples.

from julia_semver import semver_spec, version

version('1.8') in semver_spec('^1.7.2')
version('0.8') not in semver_spec('^0.7.2')

Metadata

Release files for julia-semver 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for julia-semver 0.1.3
File Size Uploaded Provenance Actions
julia_semver-0.1.3.tar.gz 4.8 kB Without provenance Details for julia_semver-0.1.3.tar.gz

Release files / julia_semver-0.1.3.tar.gz

Download URL julia_semver-0.1.3.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e28fa3a618583cd414774426548f500e009a65152b265784c141ae2b615f965d
BLAKE2b-256 checksum
How to use checksums
d128cdf19cca1c46f821245b92c47d22e743fe511119b55c90f7627fdb68c731
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

Security for julia-semver 0.1.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page