# graphlib backport
[![Tests](https://github.com/mariushelf/graphlib_backport/actions/workflows/cicd.yaml/badge.svg)](https://github.com/mariushelf/graphlib_backport/actions/workflows/cicd.yaml)
[![PyPI version](https://badge.fury.io/py/graphlib_backport.svg)](https://pypi.org/project/graphlib_backport/)
[![Downloads](https://static.pepy.tech/badge/graphlib-backport/month)](https://pepy.tech/project/graphlib-backport)
Backport of the Python 3.9
[graphlib](https://docs.python.org/3/library/graphlib.html)
module for older Python versions.
Github:
[https://github.com/mariushelf/graphlib_backport](https://github.com/mariushelf/graphlib_backport)
# Supported versions
This backport currently supports Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 and pypy3
(tested with pypy3.6, 3.7, 3.8 and 3.9).
Support for Python 3.6 and 3.7 is somewhat experimental and due to be dropped
because of the end of support for these old versions.
# Installation
`pip install graphlib_backport`
It is recommended to limit installation of this package to version of Python <3.9 and
use the original implementation for Python >=3.9.
For example in a [poetry](https://python-poetry.org/) `pyproject.toml` this can be done
by specifying the dependency as a
[Python restricted dependency](https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies):
```
[tool.poetry.dependencies]
graphlib_backport = {version="^1.0.0", python="<3.9"}
```
# Usage
The package works the very same way as the original package.
[Here's](https://docs.python.org/3/library/graphlib.html) the documentation.
# Development
The sourcecode is hosted on
[github](https://github.com/mariushelf/graphlib_backports).
To develop on this package, just clone it, work on it and submit a pull request.
## Dev requirements
For testing against different Python versions, [tox](https://tox.readthedocs.io/en/latest/)
is required.
To download the latest original sourcecode into the repository, there is a make target:
`make download_sourcecode`
*Warning*: This overwrites the code in this repo. By default it uses the tag `v3.9.0`,
but you can overwrite that with a `tag` environment variable.
## Running tests
As simple as running `tox` on the command line.
The executables for all python versions must be in the path, e.g,
`python3.6`, ..., `python3.9`, `pypy3`.
You can install them with [pyenv](https://github.com/pyenv/pyenv).
## Publishing a new version
Create a new tag and create a new release on Github. This will automatically
publish the package to PyPI.
# Changelog
See [CHANGELOG.md](https://github.com/mariushelf/graphlib-backport/CHANGELOG.md)
# Thanks
I did not create this code -- I only repackaged it so it can be
pip-installed into older versions of Python.
So all thanks go to the original contributors of the
[original sourcecode](https://github.com/python/cpython/blob/3.9/Lib/graphlib.py).
# License
[PSF](https://docs.python.org/3/license.html#psf-license)
Copyright © 2001-2023 Python Software Foundation; All Rights Reserved
Changes to the sourcecode and the tests: replace incompatible code
(e.g., the `:=` walrus operator) with constructions compatible to
earlier versions of Python, and make the tests pass on all supported
versions.
Raw data
{
"_id": null,
"home_page": "https://github.com/mariushelf/graphlib_backport",
"name": "graphlib-backport",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Marius Helf",
"author_email": "helfsmarius@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/0d/3b/0c16eddec0b574a58ca7fc5c706737c6c19036a7fdbc7217f5546b47a5d2/graphlib_backport-1.1.0.tar.gz",
"platform": null,
"description": "# graphlib backport\n[![Tests](https://github.com/mariushelf/graphlib_backport/actions/workflows/cicd.yaml/badge.svg)](https://github.com/mariushelf/graphlib_backport/actions/workflows/cicd.yaml)\n[![PyPI version](https://badge.fury.io/py/graphlib_backport.svg)](https://pypi.org/project/graphlib_backport/)\n[![Downloads](https://static.pepy.tech/badge/graphlib-backport/month)](https://pepy.tech/project/graphlib-backport)\n\nBackport of the Python 3.9\n[graphlib](https://docs.python.org/3/library/graphlib.html)\nmodule for older Python versions.\n\nGithub:\n[https://github.com/mariushelf/graphlib_backport](https://github.com/mariushelf/graphlib_backport)\n\n\n# Supported versions\n\nThis backport currently supports Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 and pypy3\n(tested with pypy3.6, 3.7, 3.8 and 3.9).\n\nSupport for Python 3.6 and 3.7 is somewhat experimental and due to be dropped\nbecause of the end of support for these old versions.\n\n\n# Installation\n\n`pip install graphlib_backport`\n\nIt is recommended to limit installation of this package to version of Python <3.9 and\nuse the original implementation for Python >=3.9.\n\nFor example in a [poetry](https://python-poetry.org/) `pyproject.toml` this can be done\nby specifying the dependency as a\n[Python restricted dependency](https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies):\n```\n[tool.poetry.dependencies]\ngraphlib_backport = {version=\"^1.0.0\", python=\"<3.9\"}\n```\n\n# Usage\n\nThe package works the very same way as the original package.\n[Here's](https://docs.python.org/3/library/graphlib.html) the documentation.\n\n\n# Development\n\nThe sourcecode is hosted on\n[github](https://github.com/mariushelf/graphlib_backports).\nTo develop on this package, just clone it, work on it and submit a pull request.\n\n\n## Dev requirements\n\nFor testing against different Python versions, [tox](https://tox.readthedocs.io/en/latest/)\nis required.\n\nTo download the latest original sourcecode into the repository, there is a make target:\n\n`make download_sourcecode`\n\n*Warning*: This overwrites the code in this repo. By default it uses the tag `v3.9.0`,\nbut you can overwrite that with a `tag` environment variable.\n\n\n## Running tests\n\nAs simple as running `tox` on the command line.\n\nThe executables for all python versions must be in the path, e.g,\n`python3.6`, ..., `python3.9`, `pypy3`.\nYou can install them with [pyenv](https://github.com/pyenv/pyenv).\n\n\n## Publishing a new version\n\nCreate a new tag and create a new release on Github. This will automatically\npublish the package to PyPI.\n\n\n# Changelog\n\nSee [CHANGELOG.md](https://github.com/mariushelf/graphlib-backport/CHANGELOG.md)\n\n\n# Thanks\n\nI did not create this code -- I only repackaged it so it can be\npip-installed into older versions of Python.\n\nSo all thanks go to the original contributors of the\n[original sourcecode](https://github.com/python/cpython/blob/3.9/Lib/graphlib.py).\n\n\n# License\n\n[PSF](https://docs.python.org/3/license.html#psf-license)\n\nCopyright \u00a9 2001-2023 Python Software Foundation; All Rights Reserved\n\nChanges to the sourcecode and the tests: replace incompatible code\n(e.g., the `:=` walrus operator) with constructions compatible to\nearlier versions of Python, and make the tests pass on all supported\nversions.\n\n",
"bugtrack_url": null,
"license": "PSF",
"summary": "Backport of the Python 3.9 graphlib module for Python 3.6+",
"version": "1.1.0",
"project_urls": {
"Documentation": "https://github.com/mariushelf/graphlib_backport",
"Homepage": "https://github.com/mariushelf/graphlib_backport",
"Repository": "https://github.com/mariushelf/graphlib_backport"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "299c96b321bf89aac1601ffc9cd30c434830d3af659c0fde9f1cec9c2e62e02f",
"md5": "8d1b034a5e910f9a0aa8d78f710e2ddf",
"sha256": "eccacf9f2126cdf89ce32a6018c88e1ecd3e4898a07568add6e1907a439055ba"
},
"downloads": -1,
"filename": "graphlib_backport-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8d1b034a5e910f9a0aa8d78f710e2ddf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4.0",
"size": 7104,
"upload_time": "2024-03-05T11:04:55",
"upload_time_iso_8601": "2024-03-05T11:04:55.257181Z",
"url": "https://files.pythonhosted.org/packages/29/9c/96b321bf89aac1601ffc9cd30c434830d3af659c0fde9f1cec9c2e62e02f/graphlib_backport-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0d3b0c16eddec0b574a58ca7fc5c706737c6c19036a7fdbc7217f5546b47a5d2",
"md5": "cf913afbbc93ef630f901531bf9a663d",
"sha256": "00a7888b21e5393064a133209cb5d3b3ef0a2096cf023914c9d778dff5644125"
},
"downloads": -1,
"filename": "graphlib_backport-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "cf913afbbc93ef630f901531bf9a663d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4.0",
"size": 6639,
"upload_time": "2024-03-05T11:04:56",
"upload_time_iso_8601": "2024-03-05T11:04:56.506314Z",
"url": "https://files.pythonhosted.org/packages/0d/3b/0c16eddec0b574a58ca7fc5c706737c6c19036a7fdbc7217f5546b47a5d2/graphlib_backport-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-05 11:04:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mariushelf",
"github_project": "graphlib_backport",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "graphlib-backport"
}