New time-based UUID formats which are suited for use as a database key

Overview

uuid6

New time-based UUID formats which are suited for use as a database key.

CI codecov PyPI status Python versions supported Code style: black

This module extends immutable UUID objects (the UUID class) with the functions uuid6() and uuid7() from the IETF draft.

Install

pip install uuid6

Usage

from uuid6 import uuid6, uuid7

my_uuid = uuid6()
print(my_uuid)
assert my_uuid < uuid6()

my_uuid = uuid7()
print(my_uuid)
assert my_uuid < uuid7()

UUIDv6 Field and Bit Layout

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |                           time_high                           |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |           time_mid            |      time_low_and_version     |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |clk_seq_hi_res |  clk_seq_low  |         node (0-1)            |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |                         node (2-5)                            |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

UUIDv7 Field and Bit Layout

Draft 02

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |                            unixts                             |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |unixts |       subsec_a        |  ver  |       subsec_b        |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |var|                   subsec_seq_node                         |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |                       subsec_seq_node                         |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

This implementation

        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |                            unixts                             |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |unixts |       subsec_a        |  ver  |       subsec_b        |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |var| subsec_c  |             rand                              |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |                             rand                              |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  • unixts: 36 bit big-endian unsigned Unix Timestamp value
  • subsec_a: 12 bits allocated to sub-second precision values
  • ver: The 4 bit UUIDv7 version (0111)
  • subsec_b: 12 bits allocated to sub-second precision values
  • var: 2 bit UUID variant (10)
  • subsec_c: 6 bits allocated to sub-second precision values
  • rand: The remaining 56 bits are filled with pseudo-random data

30 bits dedicated to sub-second precision provide nanosecond resolution. The unixts and subsec fields guarantee the order of UUIDs generated within the same nanosecond by monotonically incrementing the timer.

This implementation does not include a clock sequence counter as defined in the draft RFC.

Performance

MacBook Air

>> import timeit >>> timeit.timeit('uuid1()', number=100000, setup="from uuid import uuid1") 0.14462158300011652 >>> timeit.timeit('uuid6()', number=100000, setup="from uuid6 import uuid6") 0.2687861250000019 >>> timeit.timeit('uuid7()', number=100000, setup="from uuid6 import uuid7") 0.22819437500000106 ">
Python 3.9.7 (default, Oct 12 2021, 22:38:23)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import timeit
>>> timeit.timeit('uuid1()', number=100000, setup="from uuid import uuid1")
0.14462158300011652
>>> timeit.timeit('uuid6()', number=100000, setup="from uuid6 import uuid6")
0.2687861250000019
>>> timeit.timeit('uuid7()', number=100000, setup="from uuid6 import uuid7")
0.22819437500000106

Google Cloud Shell VM

>> import timeit >>> timeit.timeit('uuid1()', number=100000, setup="from uuid import uuid1") 1.2075679750000745 >>> timeit.timeit('uuid6()', number=100000, setup="from uuid6 import uuid6") 0.6328954440000416 >>> timeit.timeit('uuid7()', number=100000, setup="from uuid6 import uuid7") 0.4709622599998511 ">
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import timeit
>>> timeit.timeit('uuid1()', number=100000, setup="from uuid import uuid1")
1.2075679750000745
>>> timeit.timeit('uuid6()', number=100000, setup="from uuid6 import uuid6")
0.6328954440000416
>>> timeit.timeit('uuid7()', number=100000, setup="from uuid6 import uuid7")
0.4709622599998511
Comments
  • Thread Safety?

    Thread Safety?

    Since this package is on PyPI and shows up in search engine results, I just wanted to point out that it does not appear to be threadsafe.

    The global variable _last_v7_timestamp is getting modified but does not have a lock around it.

    opened by ConnorSMaynes 4
  • Bump mypy from 0.921 to 0.930

    Bump mypy from 0.921 to 0.930

    Bumps mypy from 0.921 to 0.930.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once it's up-to-date and CI passes on it, as requested by @oittaa.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 3
  • Bump coverage[toml] from 6.5.0 to 7.0.0

    Bump coverage[toml] from 6.5.0 to 7.0.0

    Bumps coverage[toml] from 6.5.0 to 7.0.0.

    Release notes

    Sourced from coverage[toml]'s releases.

    7.0.0

    Nothing new beyond 7.0.0b1.

    :arrow_right:  PyPI page: coverage 7.0.0. :arrow_right:  To install: python3 -m pip install coverage==7.0.0

    7.0.0b1

    A number of changes have been made to file path handling, including pattern matching and path remapping with the [paths] setting (see [paths]). These changes might affect you, and require you to update your settings.

    (This release includes the changes from 6.6.0b1

    , since 6.6.0 was never released.)

    • Changes to file pattern matching, which might require updating your configuration:
      • Previously, * would incorrectly match directory separators, making precise matching difficult. This is now fixed, closing issue 1407.
      • Now ** matches any number of nested directories, including none.
    • Improvements to combining data files when using the [run] relative_files setting, which might require updating your configuration:
      • During coverage combine, relative file paths are implicitly combined without needing a [paths] configuration setting. This also fixed issue 991.
      • A [paths] setting like */foo will now match foo/bar.py so that relative file paths can be combined more easily.
      • The [run] relative_files setting is properly interpreted in more places, fixing issue 1280.
    • When remapping file paths with [paths], a path will be remapped only if the resulting path exists. The documentation has long said the prefix had to exist, but it was never enforced. This fixes issue 608, improves issue 649, and closes issue 757.
    • Reporting operations now implicitly use the [paths] setting to remap file paths within a single data file. Combining multiple files still requires the coverage combine step, but this simplifies some single-file situations. Closes issue 1212 and issue 713.
    • The coverage report command now has a --format= option. The original style is now --format=text, and is the default.
      • Using --format=markdown will write the table in Markdown format, thanks to Steve Oswald, closing issue 1418.
      • Using --format=total will write a single total number to the output. This can be useful for making badges or writing status updates.
    • Combining data files with coverage combine now hashes the data files to skip files that add no new information. This can reduce the time needed. Many details affect the speed-up, but for coverage.py’s own test suite, combining is about 40% faster. Closes issue 1483.
    • When searching for completely un-executed files, coverage.py uses the presence of __init__.py files to determine which directories have source that could have been imported. However, implicit namespace packages don’t require __init__.py. A new setting [report] include_namespace_packages tells coverage.py to consider these directories during reporting. Thanks to Felix Horvat for the contribution. Closes issue 1383 and issue 1024.
    • Fixed environment variable expansion in pyproject.toml files. It was overly broad, causing errors outside of coverage.py settings, as described in issue 1481 and issue 1345. This is now fixed, but in rare cases will require changing your pyproject.toml to quote non-string values that use environment substitution.
    • An empty file has a coverage total of 100%, but used to fail with --fail-under. This has been fixed, closing issue 1470.
    • The text report table no longer writes out two separator lines if there are no files listed in the table. One is plenty.
    • Fixed a mis-measurement of a strange use of wildcard alternatives in match/case statements, closing issue 1421.
    • Fixed internal logic that prevented coverage.py from running on implementations other than CPython or PyPy (issue 1474).
    • The deprecated [run] note setting has been completely removed.

    :arrow_right:  PyPI page: coverage 7.0.0b1. :arrow_right:  To install: python3 -m pip install coverage==7.0.0b1

    6.6.0b1

    (Note: 6.6.0 final was never released. These changes are part of 7.0.0b1

    .)

    • Changes to file pattern matching, which might require updating your configuration:
      • Previously, * would incorrectly match directory separators, making precise matching difficult. This is now fixed, closing issue 1407.
      • Now ** matches any number of nested directories, including none.
    • Improvements to combining data files when using the [run] relative_files setting:
      • During coverage combine, relative file paths are implicitly combined without needing a [paths] configuration setting. This also fixed issue 991.
      • A [paths] setting like */foo will now match foo/bar.py so that relative file paths can be combined more easily.
      • The setting is properly interpreted in more places, fixing issue 1280.
    • Fixed environment variable expansion in pyproject.toml files. It was overly broad, causing errors outside of coverage.py settings, as described in issue 1481 and issue 1345. This is now fixed, but in rare cases will require changing your pyproject.toml to quote non-string values that use environment substitution.

    ... (truncated)

    Changelog

    Sourced from coverage[toml]'s changelog.

    Version 7.0.0 — 2022-12-18

    Nothing new beyond 7.0.0b1.

    .. _changes_7-0-0b1:

    Version 7.0.0b1 — 2022-12-03

    A number of changes have been made to file path handling, including pattern matching and path remapping with the [paths] setting (see :ref:config_paths). These changes might affect you, and require you to update your settings.

    (This release includes the changes from 6.6.0b1 <changes_6-6-0b1_>_, since 6.6.0 was never released.)

    • Changes to file pattern matching, which might require updating your configuration:

      • Previously, * would incorrectly match directory separators, making precise matching difficult. This is now fixed, closing issue 1407_.

      • Now ** matches any number of nested directories, including none.

    • Improvements to combining data files when using the :ref:config_run_relative_files setting, which might require updating your configuration:

      • During coverage combine, relative file paths are implicitly combined without needing a [paths] configuration setting. This also fixed issue 991_.

      • A [paths] setting like */foo will now match foo/bar.py so that relative file paths can be combined more easily.

      • The :ref:config_run_relative_files setting is properly interpreted in more places, fixing issue 1280_.

    • When remapping file paths with [paths], a path will be remapped only if the resulting path exists. The documentation has long said the prefix had to exist, but it was never enforced. This fixes issue 608, improves issue 649, and closes issue 757_.

    • Reporting operations now implicitly use the [paths] setting to remap file paths within a single data file. Combining multiple files still requires the coverage combine step, but this simplifies some single-file situations. Closes issue 1212_ and issue 713_.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.6.1

    Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.6.1

    Bumps pypa/gh-action-pypi-publish from 1.5.1 to 1.6.1.

    Release notes

    Sourced from pypa/gh-action-pypi-publish's releases.

    v1.6.1

    What's happened?!

    There was a sneaky bug in v1.6.0 which caused Twine to be outside the import path in the Python runtime. It is fixed in v1.6.1 by updating $PYTHONPATH to point to a correct location of the user-global site-packages/ directory.

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.6.0...v1.6.1

    v1.6.0

    Anything's changed?

    The only update is that the Python runtime has been upgraded from 3.9 to 3.11. There are no functional changes in this release.

    Full Changelog: https://github.com/pypa/gh-action-pypi-publish/compare/v1.5.2...v1.6.0

    v1.5.2

    What's Improved

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.5.1...v1.5.2

    Commits
    • 5d1679f Use py3.11 user-global site-packages in PYTHONPATH
    • d2a2496 Switch the runtime from Python 3.9 to Python 3.11
    • d7edd4c Add user-global site-packages to $PYTHONPATH
    • 8d5f27c Install Twine in the user-global site-packages
    • b0dc178 Disable pip cache dir with an env var
    • bbf6e0b Copy requirements to corresponding dir @ container
    • 0b69a8c Document broken pkginfo==1.9.0 transitive dep
    • c54db9c Integrate pip-tools-generated constraint files
    • 480ec4e Inherit yamllint config from the default preset
    • 5fb2f04 Drop __token__ from README code usage snippets
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 2
  • Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2

    Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2

    Bumps pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2.

    Release notes

    Sourced from pypa/gh-action-pypi-publish's releases.

    v1.5.2

    What's Improved

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.5.1...v1.5.2

    Commits
    • d7edd4c Add user-global site-packages to $PYTHONPATH
    • 8d5f27c Install Twine in the user-global site-packages
    • b0dc178 Disable pip cache dir with an env var
    • bbf6e0b Copy requirements to corresponding dir @ container
    • 0b69a8c Document broken pkginfo==1.9.0 transitive dep
    • c54db9c Integrate pip-tools-generated constraint files
    • 480ec4e Inherit yamllint config from the default preset
    • 5fb2f04 Drop __token__ from README code usage snippets
    • 7bbdccd Update the mention of master with unstable/v1
    • 328cf89 📝 Fix a link to the "Distribution Package" term
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 2
  • Bump coverage[toml] from 6.4.3 to 6.4.4

    Bump coverage[toml] from 6.4.3 to 6.4.4

    Bumps coverage[toml] from 6.4.3 to 6.4.4.

    Release notes

    Sourced from coverage[toml]'s releases.

    6.4.4

    • Wheels are now provided for Python 3.11.
    Changelog

    Sourced from coverage[toml]'s changelog.

    Version 6.4.4 — 2022-08-16

    • Wheels are now provided for Python 3.11.

    .. _changes_6-4-3:

    Commits
    • 24985c0 docs: sample html report
    • 12d5d17 build: prep for 6.4.4
    • 007c616 build: update 3.11 references to rc1
    • 66ddb0b build: make upgrade (with hashes)
    • f7907ee docs: add some make upgrade instructions to the Makefile
    • 18b57e1 build: use hashed pins
    • 1dba030 build: pin windows-only transitive dependencies
    • b076ffe build: 3.11 is rc now - make wheels for it
    • 87de75d docs: don't use tabs while we work out the docutil version pinning
    • 4eee7dc build: don't install multiple .pip files
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • Bump flake8 from 4.0.1 to 5.0.4

    Bump flake8 from 4.0.1 to 5.0.4

    Bumps flake8 from 4.0.1 to 5.0.4.

    Commits
    • 6027577 Release 5.0.4
    • 213e006 Merge pull request #1653 from asottile/lower-bound-importlib-metadata
    • e94ee2b require sufficiently new importlib-metadata
    • 318a86a Merge pull request #1646 from televi/main
    • 7b8b374 Clarify entry point naming
    • 7160561 Merge pull request #1649 from PyCQA/pre-commit-ci-update-config
    • 84d56a8 [pre-commit.ci] pre-commit autoupdate
    • ff6569b Release 5.0.3
    • e76b59a Merge pull request #1648 from PyCQA/invalid-syntax-partial-parse
    • 25e8ff1 ignore config files that partially parse as flake8 configs
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • Bump flake8 from 4.0.1 to 5.0.3

    Bump flake8 from 4.0.1 to 5.0.3

    Bumps flake8 from 4.0.1 to 5.0.3.

    Commits
    • ff6569b Release 5.0.3
    • e76b59a Merge pull request #1648 from PyCQA/invalid-syntax-partial-parse
    • 25e8ff1 ignore config files that partially parse as flake8 configs
    • 70c0b3d Release 5.0.2
    • 5e69ba9 Merge pull request #1642 from PyCQA/no-home
    • 8b51ee4 skip skipping home if home does not exist
    • 446b18d Merge pull request #1641 from PyCQA/entry-points-not-pickleable
    • b70d7a2 work around un-pickleabiliy of EntryPoint in 3.8.0
    • 91a7fa9 fix order of release notes
    • 405cfe0 Release 5.0.1
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • Bump flake8 from 4.0.1 to 5.0.1

    Bump flake8 from 4.0.1 to 5.0.1

    Bumps flake8 from 4.0.1 to 5.0.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • Bump coverage[toml] from 6.4 to 6.4.1

    Bump coverage[toml] from 6.4 to 6.4.1

    Bumps coverage[toml] from 6.4 to 6.4.1.

    Release notes

    Sourced from coverage[toml]'s releases.

    6.4.1

    • Greatly improved performance on PyPy, and other environments that need the pure Python trace function. Thanks, Carl Friedrich Bolz-Tereick (pull 1381 and pull 1388). Slightly improved performance when using the C trace function, as most environments do. Closes issue 1339.
    • The conditions for using tomllib from the standard library have been made more precise, so that 3.11 alphas will continue to work. Closes issue 1390.
    Changelog

    Sourced from coverage[toml]'s changelog.

    Version 6.4.1 — 2022-06-02

    • Greatly improved performance on PyPy, and other environments that need the pure Python trace function. Thanks, Carl Friedrich Bolz-Tereick (pull 1381_ and pull 1388). Slightly improved performance when using the C trace function, as most environments do. Closes issue 1339.

    • The conditions for using tomllib from the standard library have been made more precise, so that 3.11 alphas will continue to work. Closes issue 1390_.

    .. _issue 1339: nedbat/coveragepy#1339 .. _pull 1381: nedbat/coveragepy#1381 .. _pull 1388: nedbat/coveragepy#1388 .. _issue 1390: nedbat/coveragepy#1390

    .. _changes_64:

    Commits
    • e1bd756 docs: latest sample HTML report
    • c930586 build: prep for 6.4.1
    • 9b9142e build: more low-tech release automation
    • 8c69146 build: use 3.11.0b3 in ci
    • acf0b10 docs: performance improvements closed #1339
    • 3a86ac8 test: 3.11.0b3 is out, so remove the workaround
    • 3a23d8a fix: use tomli for [toml] under more precise conditions. #1390
    • a8758a6 test: avoid a 3.11.0b2 bug
    • 613191f chore: make upgrade
    • 59ce1f4 test: benchmark for small local files: bug1339.py
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 2
  • Bump actions/checkout from 2 to 3

    Bump actions/checkout from 2 to 3

    Bumps actions/checkout from 2 to 3.

    Release notes

    Sourced from actions/checkout's releases.

    v3.0.0

    • Update default runtime to node16

    v2.4.0

    • Convert SSH URLs like org-<ORG_ID>@github.com: to https://github.com/ - pr

    v2.3.5

    Update dependencies

    v2.3.4

    v2.3.3

    v2.3.2

    Add Third Party License Information to Dist Files

    v2.3.1

    Fix default branch resolution for .wiki and when using SSH

    v2.3.0

    Fallback to the default branch

    v2.2.0

    Fetch all history for all tags and branches when fetch-depth=0

    v2.1.1

    Changes to support GHES (here and here)

    v2.1.0

    Changelog

    Sourced from actions/checkout's changelog.

    Changelog

    v2.3.1

    v2.3.0

    v2.2.0

    v2.1.1

    • Changes to support GHES (here and here)

    v2.1.0

    v2.0.0

    v2 (beta)

    • Improved fetch performance
      • The default behavior now fetches only the SHA being checked-out
    • Script authenticated git commands
      • Persists with.token in the local git config
      • Enables your scripts to run authenticated git commands
      • Post-job cleanup removes the token
      • Coming soon: Opt out by setting with.persist-credentials to false
    • Creates a local branch
      • No longer detached HEAD when checking out a branch
      • A local branch is created with the corresponding upstream branch set
    • Improved layout

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 2
  • Bump coverage[toml] from 6.5.0 to 7.0.1

    Bump coverage[toml] from 6.5.0 to 7.0.1

    Bumps coverage[toml] from 6.5.0 to 7.0.1.

    Release notes

    Sourced from coverage[toml]'s releases.

    7.0.1

    • When checking if a file mapping resolved to a file that exists, we weren’t considering files in .whl files. This is now fixed, closing issue 1511.
    • File pattern rules were too strict, forbidding plus signs and curly braces in directory and file names. This is now fixed, closing issue 1513.
    • Unusual Unicode or control characters in source files could prevent reporting. This is now fixed, closing issue 1512.
    • The PyPy wheel now installs on PyPy 3.7, 3.8, and 3.9, closing issue 1510.

    :arrow_right:  PyPI page: coverage 7.0.1. :arrow_right:  To install: python3 -m pip install coverage==7.0.1

    7.0.0

    Nothing new beyond 7.0.0b1.

    :arrow_right:  PyPI page: coverage 7.0.0. :arrow_right:  To install: python3 -m pip install coverage==7.0.0

    7.0.0b1

    A number of changes have been made to file path handling, including pattern matching and path remapping with the [paths] setting (see [paths]). These changes might affect you, and require you to update your settings.

    (This release includes the changes from 6.6.0b1

    , since 6.6.0 was never released.)

    • Changes to file pattern matching, which might require updating your configuration:
      • Previously, * would incorrectly match directory separators, making precise matching difficult. This is now fixed, closing issue 1407.
      • Now ** matches any number of nested directories, including none.
    • Improvements to combining data files when using the [run] relative_files setting, which might require updating your configuration:
      • During coverage combine, relative file paths are implicitly combined without needing a [paths] configuration setting. This also fixed issue 991.
      • A [paths] setting like */foo will now match foo/bar.py so that relative file paths can be combined more easily.
      • The [run] relative_files setting is properly interpreted in more places, fixing issue 1280.
    • When remapping file paths with [paths], a path will be remapped only if the resulting path exists. The documentation has long said the prefix had to exist, but it was never enforced. This fixes issue 608, improves issue 649, and closes issue 757.
    • Reporting operations now implicitly use the [paths] setting to remap file paths within a single data file. Combining multiple files still requires the coverage combine step, but this simplifies some single-file situations. Closes issue 1212 and issue 713.
    • The coverage report command now has a --format= option. The original style is now --format=text, and is the default.
      • Using --format=markdown will write the table in Markdown format, thanks to Steve Oswald, closing issue 1418.
      • Using --format=total will write a single total number to the output. This can be useful for making badges or writing status updates.
    • Combining data files with coverage combine now hashes the data files to skip files that add no new information. This can reduce the time needed. Many details affect the speed-up, but for coverage.py’s own test suite, combining is about 40% faster. Closes issue 1483.
    • When searching for completely un-executed files, coverage.py uses the presence of __init__.py files to determine which directories have source that could have been imported. However, implicit namespace packages don’t require __init__.py. A new setting [report] include_namespace_packages tells coverage.py to consider these directories during reporting. Thanks to Felix Horvat for the contribution. Closes issue 1383 and issue 1024.
    • Fixed environment variable expansion in pyproject.toml files. It was overly broad, causing errors outside of coverage.py settings, as described in issue 1481 and issue 1345. This is now fixed, but in rare cases will require changing your pyproject.toml to quote non-string values that use environment substitution.
    • An empty file has a coverage total of 100%, but used to fail with --fail-under. This has been fixed, closing issue 1470.
    • The text report table no longer writes out two separator lines if there are no files listed in the table. One is plenty.
    • Fixed a mis-measurement of a strange use of wildcard alternatives in match/case statements, closing issue 1421.
    • Fixed internal logic that prevented coverage.py from running on implementations other than CPython or PyPy (issue 1474).
    • The deprecated [run] note setting has been completely removed.

    :arrow_right:  PyPI page: coverage 7.0.0b1. :arrow_right:  To install: python3 -m pip install coverage==7.0.0b1

    6.6.0b1

    (Note: 6.6.0 final was never released. These changes are part of 7.0.0b1

    .)

    ... (truncated)

    Changelog

    Sourced from coverage[toml]'s changelog.

    Version 7.0.1 — 2022-12-23

    • When checking if a file mapping resolved to a file that exists, we weren't considering files in .whl files. This is now fixed, closing issue 1511_.

    • File pattern rules were too strict, forbidding plus signs and curly braces in directory and file names. This is now fixed, closing issue 1513_.

    • Unusual Unicode or control characters in source files could prevent reporting. This is now fixed, closing issue 1512_.

    • The PyPy wheel now installs on PyPy 3.7, 3.8, and 3.9, closing issue 1510_.

    .. _issue 1510: nedbat/coveragepy#1510 .. _issue 1511: nedbat/coveragepy#1511 .. _issue 1512: nedbat/coveragepy#1512 .. _issue 1513: nedbat/coveragepy#1513

    .. _changes_7-0-0:

    Version 7.0.0 — 2022-12-18

    Nothing new beyond 7.0.0b1.

    .. _changes_7-0-0b1:

    Version 7.0.0b1 — 2022-12-03

    A number of changes have been made to file path handling, including pattern matching and path remapping with the [paths] setting (see :ref:config_paths). These changes might affect you, and require you to update your settings.

    (This release includes the changes from 6.6.0b1 <changes_6-6-0b1_>_, since 6.6.0 was never released.)

    • Changes to file pattern matching, which might require updating your configuration:

      • Previously, * would incorrectly match directory separators, making precise matching difficult. This is now fixed, closing issue 1407_.

      • Now ** matches any number of nested directories, including none.

    • Improvements to combining data files when using the

    ... (truncated)

    Commits
    • c5cda3a docs: releases take a little bit longer now
    • 9d4226e docs: latest sample HTML report
    • 8c77758 docs: prep for 7.0.1
    • da1b282 fix: also look into .whl files for source
    • d327a70 fix: more information when mapping rules aren't working right.
    • 35e249f fix: certain strange characters caused reporting to fail. #1512
    • 152cdc7 fix: don't forbid plus signs in file names. #1513
    • 31513b4 chore: make upgrade
    • 873b059 test: don't run tests on Windows PyPy-3.9
    • 5c5caa2 build: PyPy wheel now installs on 3.7, 3.8, and 3.9. #1510
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 1
  • Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.6.4

    Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.6.4

    Bumps pypa/gh-action-pypi-publish from 1.5.1 to 1.6.4.

    Release notes

    Sourced from pypa/gh-action-pypi-publish's releases.

    v1.6.4

    oh, boi! again?

    This is the last one tonight, promise! It fixes this embarrassing bug that was actually caught by the CI but got overlooked due to the lack of sleep. TL;DR GH passed $HOME from the external env into the container and that tricked the Python's site module to think that the home directory is elsewhere, adding non-existent paths to the env vars. See #115.

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.6.3...v1.6.4

    v1.6.3

    Another Release!? Why?

    In pypa/gh-action-pypi-publish#112, it was discovered that passing a $PATH variable even breaks the shebang. So this version adds more safeguards to make sure it keeps working with a fully broken $PATH.

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.6.2...v1.6.3

    v1.6.2

    What's Fixed

    • Made the $PATH and $PYTHONPATH environment variables resilient to broken values passed from the host runner environment, which previously allowed the users to accidentally break the container's internal runtime as reported in pypa/gh-action-pypi-publish#112

    Internal Maintenance Improvements

    New Contributors

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.6.1...v1.6.2

    v1.6.1

    What's happened?!

    There was a sneaky bug in v1.6.0 which caused Twine to be outside the import path in the Python runtime. It is fixed in v1.6.1 by updating $PYTHONPATH to point to a correct location of the user-global site-packages/ directory.

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.6.0...v1.6.1

    v1.6.0

    Anything's changed?

    The only update is that the Python runtime has been upgraded from 3.9 to 3.11. There are no functional changes in this release.

    Full Changelog: https://github.com/pypa/gh-action-pypi-publish/compare/v1.5.2...v1.6.0

    v1.5.2

    What's Improved

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.5.1...v1.5.2

    Commits
    • c7f29f7 🐛 Override $HOME in the container with /root
    • 644926c 🧪 Always run smoke testing in debug mode
    • e71a4a4 Add support for verbose bash execusion w/ $DEBUG
    • e56e821 🐛 Make id always available in twine-upload
    • c879b84 🐛 Use full path to bash in shebang
    • 57e7d53 🐛Ensure the default $PATH value is pre-loaded
    • ce291dc 🎨🐛Fix the branch @ pre-commit.ci badge links
    • 102d8ab 🐛 Rehardcode devpi port for GHA srv container
    • 3a9eaef 🐛Use different ports in/out of GHA containers
    • a01fa74 🐛 Use localhost @ GHA outside the containers
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 1
  • Bump flake8 from 5.0.4 to 6.0.0

    Bump flake8 from 5.0.4 to 6.0.0

    Bumps flake8 from 5.0.4 to 6.0.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 0
  • Bump mypy from 0.982 to 0.991

    Bump mypy from 0.982 to 0.991

    Bumps mypy from 0.982 to 0.991.

    Commits
    • b7788fc Update version to remove "+dev" for releasing 0.991
    • 6077d19 manually CP typeshed #9130
    • ab0ea1e Fix crash with function redefinition (#14064)
    • 592a9ce Fix another crash with report generation on namespace packages (#14063)
    • 1650ae0 Update --no-warn-no-return docs for empty body changes (#14065)
    • b9daa31 Don't ignore errors in files passed on the command line (#14060)
    • 02fd8a5 Filter out wasm32 wheel in upload-pypi.py (#14035)
    • 131c8d7 Fix crash on inference with recursive alias to recursive instance (#14038)
    • 1368338 Change version to 0.991+dev in preparation for the point release
    • b71dc3d Remove +dev from version
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 0
  • Different .time granularity on different platforms?

    Different .time granularity on different platforms?

    First of all, thank you for the package!

    I've used UUID7 from your package as an ID (token) for user session - I want to use time stored in the token as a creation timestamp directly. And I want to invalidate the token after some time (a day). So what I did was to fetch .time from the UUID and compare it to current time.timestamp. Problem is - on different platforms UUID.time returns different order of values. As a workaround I have to divide by certain value to make it possible to compare.

    Final function currently looks like this:

    def check_token_expired(uuid: UUID, session_timeout_seconds: int) -> bool:
        """Check if session has expired by uuid v7 timestamp. Returns True if session IS expired."""
        assert isinstance(uuid, UUID)
        now_unix = datetime.now().timestamp()
        uuid_time = uuid.time
        if os.name == 'posix':
            uuid_time = uuid_time / 1000
        if os.name == 'nt':
            uuid_time = uuid_time / 1000000000
        return (now_unix - uuid_time) > session_timeout_seconds
    

    Those os.name == ... comparissons look wrong to me. And it looks like the difference comes from uuid.time, not from datetime.now().timestamp(). Could you help checking this please?

    Platforms I've tested on are Windows 10 and WSL with Ubuntu.

    opened by CHerSun 0
Releases(2022.10.25)
  • 2022.10.25(Oct 25, 2022)

    NOTICE!

    UUIDv7 timestamp was changed to millisecond granularity and larger entropy part as described in Draft 00 at https://github.com/ietf-wg-uuidrev/rfc4122bis If you're regularly generating more than thousand UUIDs per second, you might want to migrate from uuid7() to uuid8(), which basically works like the older Draft versions of uuid7() with nanosecond granularity.

    What's Changed

    • Python 3.11 support by @oittaa in https://github.com/oittaa/uuid6-python/pull/65
    • Add UUIDv8, use the official format for UUIDv7 by @oittaa in https://github.com/oittaa/uuid6-python/pull/66

    Full Changelog: https://github.com/oittaa/uuid6-python/compare/2022.06.25...2022.10.25

    Source code(tar.gz)
    Source code(zip)
  • 2022.06.25(Jun 25, 2022)

    What's Changed

    • Draft 04 by @oittaa in https://github.com/oittaa/uuid6-python/pull/47 - https://github.com/uuid6/prototypes/issues/31

    Full Changelog: https://github.com/oittaa/uuid6-python/compare/2022.06.11...2022.06.25

    Source code(tar.gz)
    Source code(zip)
  • 2022.06.11(Jun 11, 2022)

    What's Changed

    • Performance tests with Draft03 by @oittaa in https://github.com/oittaa/uuid6-python/pull/36
    • Test vectors to their own file by @oittaa in https://github.com/oittaa/uuid6-python/pull/37
    • Add py.typed by @oittaa in https://github.com/oittaa/uuid6-python/pull/41

    Full Changelog: https://github.com/oittaa/uuid6-python/compare/2022.04.05...2022.06.11

    Source code(tar.gz)
    Source code(zip)
  • 2022.04.05(Apr 5, 2022)

    What's Changed

    • Draft 03 by @oittaa in https://github.com/oittaa/uuid6-python/pull/34

    Full Changelog: https://github.com/oittaa/uuid6-python/compare/2022.02.06...2022.04.05

    Source code(tar.gz)
    Source code(zip)
  • 2022.02.06(Feb 6, 2022)

    What's Changed

    • Rename class to UUID by @oittaa in https://github.com/oittaa/uuid6-python/pull/24
    • Test generated UUIDs against regular expressions by @oittaa in https://github.com/oittaa/uuid6-python/pull/25

    Full Changelog: https://github.com/oittaa/uuid6-python/compare/2022.01.31...2022.02.06

    Source code(tar.gz)
    Source code(zip)
  • 2022.01.31(Jan 30, 2022)

    What's Changed

    • Add all arguments from the original uuid class by @oittaa in https://github.com/oittaa/uuid6-python/pull/16

    Full Changelog: https://github.com/oittaa/uuid6-python/compare/2022.01.02...2022.01.31

    Source code(tar.gz)
    Source code(zip)
  • 2022.01.02(Jan 2, 2022)

    What's Changed

    • https://github.com/actions/toolkit/issues/399 by @oittaa in https://github.com/oittaa/uuid6-python/pull/12
    • Proper v7 subsec encoding by @oittaa in https://github.com/oittaa/uuid6-python/pull/13

    Full Changelog: https://github.com/oittaa/uuid6-python/compare/2021.12.01...2022.01.02

    Source code(tar.gz)
    Source code(zip)
  • 2021.12.01(Dec 1, 2021)

    What's Changed

    • Test uuid7 in the future by @oittaa in https://github.com/oittaa/uuid6-python/pull/4
    • Field and Bit Layout by @oittaa in https://github.com/oittaa/uuid6-python/pull/5
    • Add time property by @oittaa in https://github.com/oittaa/uuid6-python/pull/6
    • Performance compared to uuid1() by @oittaa in https://github.com/oittaa/uuid6-python/pull/7
    • Benchmark by @oittaa in https://github.com/oittaa/uuid6-python/pull/8

    Full Changelog: https://github.com/oittaa/uuid6-python/compare/2021.11.30...2021.12.01

    Source code(tar.gz)
    Source code(zip)
  • 2021.11.30(Nov 30, 2021)

    What's Changed

    • Create LICENSE by @oittaa in https://github.com/oittaa/uuid6-python/pull/2
    • Fix mask, use divmod() by @oittaa in https://github.com/oittaa/uuid6-python/pull/3

    Full Changelog: https://github.com/oittaa/uuid6-python/compare/2021.11.29...2021.11.30

    Source code(tar.gz)
    Source code(zip)
  • 2021.11.29(Nov 29, 2021)

Owner
null
UUID version 7, which are time-sortable (following the Peabody RFC4122 draft)

uuid7 - time-sortable UUIDs This module implements the version 7 UUIDs, proposed by Peabody and Davis in https://www.ietf.org/id/draft-peabody-dispatc

Steve Simmons 22 Dec 20, 2022
A program will generate a eth key pair that has the public key that starts with a defined amount of 0

ETHAdressGenerator This short program will generate a eth key pair that has the public key that starts with a defined amount of 0 Requirements Python

null 3 Nov 19, 2021
Let's renew the puzzle collection. We'll produce a collection of new puzzles out of the lichess game database.

Let's renew the puzzle collection. We'll produce a collection of new puzzles out of the lichess game database.

Thibault Duplessis 96 Jan 3, 2023
This is a package that allows you to create a key-value vault for storing variables in a global context

This is a package that allows you to create a key-value vault for storing variables in a global context. It allows you to set up a keyring with pre-defined constants which act as keys for the vault. These constants are then what is stored inside the vault. A key is just a string, but the value that the key is mapped to can be assigned to any type of object in Python. If the object is serializable (like a list or a dict), it can also be writen to a JSON file You can then use a decorator to annotate functions that you want to have use this vault to either store return variables in or to extract variables to be used as input for the function.

Data Ductus 2 Dec 14, 2022
Dynamic key remapper for Wayland Window System, especially for Sway

wayremap Dynamic keyboard remapper for Wayland. It works on both X Window Manager and Wayland, but focused on Wayland as it intercepts evdev input and

Kay Gosho 50 Nov 29, 2022
extract gene TSS/TES site form gencode/ensembl/gencode database GTF file and export bed format file.

GetTsite python Package extract gene TSS/TES site form gencode/ensembl/gencode database GTF file and export bed format file. Install $ pip install Get

laojunjun 7 Nov 21, 2022
Hide new MacBook Pro notch with black wallpaper.

Hide new MacBook Pro notch with black wallpaper.

Wang Chao 1 Oct 27, 2021
MongoDB utility to inflate the contents of small collection to a new larger collection

MongoDB Data Inflater ("data-inflater") The data-inflater tool is a MongoDB utility to automate the creation of a new large database collection using

Paul Done 3 Nov 28, 2021
🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously mis

Mahmoud Hashemi 6k Jan 4, 2023
SysInfo is an app developed in python which gives Basic System Info , and some detailed graphs of system performance .

SysInfo SysInfo is an app developed in python which gives Basic System Info , and some detailed graphs of system performance . Installation Download t

null 5 Nov 8, 2021
Astvuln is a simple AST scanner which recursively scans a directory, parses each file as AST and runs specified method.

Astvuln Astvuln is a simple AST scanner which recursively scans a directory, parses each file as AST and runs specified method. Some search methods ar

Bitstamp Security 7 May 29, 2022
A clock app, which helps you with routine tasks.

Clock This app helps you with routine tasks. Alarm Clock Timer Stop Watch World Time (Which city you want) About me Full name: Matin Ardestani Age: 14

Matin Ardestani 13 Jul 30, 2022
one_click_kag_server is a program which tries to fully automate the creation of a King Arthur's Gold server.

one_click_kag_server is a program which tries to fully automate the creation of a King Arthur's Gold server.

Benjamin Gorman 4 Jan 5, 2022
A python app which aggregates and splits costs from multiple public cloud providers into a csv

Cloud Billing This project aggregates the costs public cloud resources by accounts, services and tags by importing the invoices from public cloud prov

null 1 Oct 4, 2022
A utility that makes it easy to work with Python projects containing lots of packages, of which you only want to develop some.

Mixed development source packages on top of stable constraints using pip mxdev [mɪks dɛv] is a utility that makes it easy to work with Python projects

BlueDynamics Alliance 6 Jun 8, 2022
Cleaning-utils - a collection of small Python functions and classes which make cleaning pipelines shorter and easier

cleaning-utils [] [] [] cleaning-utils is a collection of small Python functions

null 4 Aug 31, 2022
A collection of common regular expressions bundled with an easy to use interface.

CommonRegex Find all times, dates, links, phone numbers, emails, ip addresses, prices, hex colors, and credit card numbers in a string. We did the har

Madison May 1.5k Dec 31, 2022
A simple and easy to use Spam Bot made in Python!

This is a simple spam bot made in python. You can use to to spam anyone with anything on any platform.

null 7 Sep 8, 2022
Stubmaker is an easy-to-use tool for generating python stubs.

Stubmaker is an easy-to-use tool for generating python stubs. Requirements Stubmaker is to be run under Python 3.7.4+ No side effects during

Toloka 24 Aug 28, 2022