Skip to content

Commit

Permalink
Upgrade to work at python 3.10+
Browse files Browse the repository at this point in the history
  • Loading branch information
vasokot committed Jun 19, 2024
1 parent b0c42dd commit 5a24fe1
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 25 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ on:
inputs:
py_version:
description: 'Python version'
default: '3.7'
default: '3.8'
required: false
type: string

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.py_version }}
- name: Install dependencies
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Store dist for 2w
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: CrossPM packages
path: dist/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
needs: build-packages
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: CrossPM packages
path: dist/
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v4
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
9 changes: 4 additions & 5 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -37,7 +36,7 @@ jobs:
- name: Run Tests on Python ${{ matrix.python-version }}
run: |
python -mflake8 crosspm
python -mcoverage run -m py.test tests
python -mcoverage run -m pytest tests
build-artifact:
uses: ./.github/workflows/build.yml
needs: tests
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
docopt==0.6.2
dohq-artifactory>=0.8.3
Jinja2>=2.11
Jinja2>=3.1.3
patool==1.12
pyunpack==0.2
PyYAML>=5.2,<6.0
requests>=2.25.1,<3.0.0
urllib3<1.25,>=1.21.1
PyYAML>=6.0
requests>=2.30.0,<3.0.0
urllib3>=2.2.0
19 changes: 9 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
long_description=long_description,
download_url='https://github.com/devopshq/crosspm.git',
entry_points={'console_scripts': ['crosspm=crosspm.__main__:main']},
python_requires='>=3.6.0',
python_requires='>=3.8.0',
classifiers=[
'Development Status :: {}'.format(develop_status),
'Environment :: Console',
Expand All @@ -50,9 +50,10 @@
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
keywords=[
'development',
Expand All @@ -75,19 +76,17 @@
tests_require=[
"pytest>=5.2",
"pytest-flask>=1.0.0",
"PyYAML>=5.2",
"PyYAML>=6.0",
],
install_requires=[
"requests>=2.25.1,<3.0.0",
'urllib3<1.25,>=1.21.1',
"requests>=2.30.0,<3.0.0",
'urllib3>=2.2.0',
'docopt==0.6.2',
"PyYAML>=5.2,<6.0",
"PyYAML>=6.0",
"dohq-artifactory>=0.8.3",
"Jinja2>=2.11",
"Jinja2>=3.1.3",
'patool==1.12', # need for pyunpack
'pyunpack==0.2',
# 'pyopenssl>=16.2.0',
# 'cryptography>=1.7',
],
package_data={
'': [
Expand Down
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
from crosspm.helpers.package import Package


def pytest_configure(config):
config.addinivalue_line(
"markers", "artifactoryaql: testing artifactoryaql"
)


@pytest.fixture(scope="function")
def package():
params = {'arch': 'x86', 'osname': 'win', 'package': 'package'}
Expand Down

0 comments on commit 5a24fe1

Please sign in to comment.