Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate to poetry #1565

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'poetry'
- name: Build wheel and source tarball
run: |
pip install wheel
python setup.py sdist bdist_wheel
run: poetry build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@v1.1.0
with:
Expand Down
21 changes: 5 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,14 @@ jobs:
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: update pip
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel

- name: get pip cache dir
id: pip-cache
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: cache pip dependencies
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}
- run: pip install tox
- run: tox -e ${{ matrix.tox }}
cache: 'poetry'
- run: poetry install --sync
- run: poetry run tox -e ${{ matrix.tox }}
- name: Upload coverage.xml
if: ${{ matrix.python == '3.10' }}
uses: actions/upload-artifact@v3
Expand Down
7 changes: 0 additions & 7 deletions graphene/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from .pyutils.version import get_version
from .relay import (
BaseGlobalIDType,
ClientIDMutation,
Expand Down Expand Up @@ -46,13 +45,7 @@
from .utils.module_loading import lazy_import
from .utils.resolve_only_args import resolve_only_args

VERSION = (3, 3, 0, "final", 0)


__version__ = get_version(VERSION)

__all__ = [
"__version__",
"Argument",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's important to keep __version__, as certain extension libraries use it do distignuish between different grapehene releases. I'm fine with deprecation, as python 3.8's importlib.metadata.version('graphene') is a viable alternative. I'd suggest using importlib to fill __version__ and deprecating it, recommending direct use of importlib instead. What do you think? 😊

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into it and make changes accordingly

"Base64",
"BigInt",
Expand Down
Empty file removed graphene/pyutils/__init__.py
Empty file.
76 changes: 0 additions & 76 deletions graphene/pyutils/version.py

This file was deleted.

Loading
Loading