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

Commit cfa0686

Browse filesBrowse files
committed
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
1 parent 7250d81 commit cfa0686
Copy full SHA for cfa0686

File tree

Expand file treeCollapse file tree

2 files changed

+27
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+27
-1
lines changed

‎.github/workflows/ci.yml

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,32 @@ jobs:
2727
- name: black
2828
run: black --check --diff --color --quiet .
2929

30+
compile:
31+
runs-on: ubuntu-latest
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11.0-alpha - 3.11", "pypy-3.8"]
36+
pyyaml-version: ["5.1.*", "5.4.*", "6.0.*", "6.*"]
37+
38+
steps:
39+
- name: Checkout working copy
40+
uses: actions/checkout@v3
41+
- name: Set up Python ${{ matrix.python-version }}
42+
uses: actions/setup-python@v3
43+
with:
44+
python-version: ${{ matrix.python-version }}
45+
- name: Install dependency
46+
run: |
47+
python -mpip install --upgrade pip
48+
python -mpip install pyyaml==${{ matrix.pyyaml-version }}
49+
- name: Build regexes.py
50+
run: python setup.py build_regexes
51+
- name: Check results
52+
run: |
53+
# check that _regexes exists, and .eggs does not (== setuptools used our dependency)
54+
test -e ua_parser/_regexes.py -a ! -e .eggs
55+
3056
test:
3157
runs-on: ubuntu-latest
3258
strategy:

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class sdist(_sdist):
210210
zip_safe=False,
211211
url="https://github.com/ua-parser/uap-python",
212212
include_package_data=True,
213-
setup_requires=["pyyaml ~= 5.4.0"],
213+
setup_requires=["pyyaml"],
214214
install_requires=[],
215215
cmdclass=cmdclass,
216216
classifiers=[

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.