Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Relax pyyaml versioning during building #125

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

Merged
merged 1 commit into from
Aug 20, 2022
Merged
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
Relax pyyaml versioning during building
e27d50d moved the yaml dependency
from runtime to dev and updated the version from 5.1 to 5.4 (not 6.0
as that dropped Python 2.7 compatibility), but that turns out to cause
issues for people who can't / won't download pyyaml on the fly and
require building to work with preinstalled packages, as building
regexes now refuses to work with a locally available 6.0.

Remove version bound on pyyaml (though a `>=` bound might also have
worked), but add a bunch of tests to ensure the regexes build on all
supported versions of Python, and pyyaml (also reinstate 5.1 for that
purpose only).

Fixes #121
  • Loading branch information
masklinn committed Aug 20, 2022
commit 911624ce77974e9a37e4803eb4cc6b28e15afb1a
31 changes: 31 additions & 0 deletions 31 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,37 @@ jobs:
- name: black
run: black --check --diff --color --quiet .

compile:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11.0-alpha - 3.11", "pypy-3.8"]
pyyaml-version: ["5.1.*", "5.4.*", "6.0.*", "6.*"]
exclude:
- python-version: 2.7
pyyaml-version: 6.0.*
- python-version: 2.7
pyyaml-version: 6.*

steps:
- name: Checkout working copy
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependency
run: |
python -mpip install --upgrade pip
python -mpip install pyyaml==${{ matrix.pyyaml-version }}
- name: Build regexes.py
run: python setup.py build_regexes -i
- name: Check results
run: |
# check that _regexes exists, and .eggs does not (== setuptools used our dependency)
test -e ua_parser/_regexes.py -a ! -e .eggs

test:
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion 2 setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class sdist(_sdist):
zip_safe=False,
url="https://github.com/ua-parser/uap-python",
include_package_data=True,
setup_requires=["pyyaml ~= 5.4.0"],
setup_requires=["pyyaml"],
install_requires=[],
cmdclass=cmdclass,
classifiers=[
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.