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

Update developer environment for newer Python versions #67

Open
wants to merge 2 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
24 changes: 14 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,27 @@ on:
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-20.04"

strategy:
matrix:
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy3"]
runs-on: "ubuntu-22.04"

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
- uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.python-version }}"
python-version: |
3.8
3.9
3.10
3.11
3.12
3.13-dev
pypy3.10
cache: "pip"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade virtualenv tox tox-gh-actions
- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m tox"
python -m pip install --upgrade virtualenv tox tox-gh
Copy link

Choose a reason for hiding this comment

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

+1, good to move to the officially supported https://pypi.org/project/tox-gh/

- name: "Run tox targets"
run: "tox"
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[project]
name = "pymacaroons"
version = "0.13.0"
description = "Macaroon library for Python"
authors = [
{name = "Evan Cordell", email = "[email protected]"},
]
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"six>=1.8.0",
"PyNaCl>=1.1.2,<2.0"
]
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Security :: Cryptography",
"Topic :: Security",
]
[project.urls]
Documentation = "http://pymacaroons.readthedocs.org/"
Repository = "https://github.com/ecordell/pymacaroons"
Issues = "https://github.com/ecordell/pymacaroons/issues"

[tool.distutils.bdist_wheel]
universal = true
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ coverage
mock>=2.0.0,<2.99
sphinx>=1.2.3
python-coveralls>=2.4.2
hypothesis==1.11.4
hypothesis~=6.0
bumpversion
tox
yanc
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

51 changes: 0 additions & 51 deletions setup.py

This file was deleted.

8 changes: 4 additions & 4 deletions tests/property_tests/macaroon_property_tests.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
from __future__ import unicode_literals

from hypothesis import *
from hypothesis.specifiers import *
from hypothesis.strategies import *

from pymacaroons import Macaroon, MACAROON_V1, MACAROON_V2
from pymacaroons.utils import convert_to_bytes


ascii_text_strategy = strategy(
[sampled_from(map(chr, range(0, 128)))]
ascii_text_strategy = text(
characters(codec="ascii")
).map(lambda c: ''.join(c))

ascii_bin_strategy = strategy(ascii_text_strategy).map(
ascii_bin_strategy = ascii_text_strategy.map(
lambda s: convert_to_bytes(s)
)

Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27, py35, py36, py37, py38, py39, pypy3, flake8, docs
envlist = py38, py39, py310, py311, py312, py313, pypy3, flake8, docs
skip_missing_interpreters=True

[testenv]
Expand Down Expand Up @@ -27,10 +27,10 @@ commands=

[gh-actions]
python =
2.7: py27
3.5: py35
3.6: py36
3.7: py37
3.8: py38
Copy link

Choose a reason for hiding this comment

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

3.8 is now EOL as well: https://devguide.python.org/versions/

Copy link
Contributor

Choose a reason for hiding this comment

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

I would love to see Python 3.8 kept at least for one release to ease migration path for us from 3.8 to 3.12. Thanks for considering!

3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
pypy3: pypy3