Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add comment clarifying use of yaml.load, remove requirements file #106

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
Apr 30, 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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt -r requirements_dev.txt
python -mpip install --upgrade pip
python -mpip install -r requirements_dev.txt
- name: tests
run: |
python setup.py develop
Expand Down
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pyyaml~=5.4.0
tox==3.9.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class sdist(_sdist):
zip_safe=False,
url="https://github.com/ua-parser/uap-python",
include_package_data=True,
setup_requires=["pyyaml"],
setup_requires=["pyyaml ~= 5.4.0"],
install_requires=[],
cmdclass=cmdclass,
classifiers=[
Expand Down
3 changes: 2 additions & 1 deletion ua_parser/user_agent_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ def GetFilters(
import yaml

try:
# Try and use libyaml bindings if available since faster
# Try and use libyaml bindings if available since faster,
# pyyaml doesn't do it by default (yaml/pyyaml#436)
from yaml import CSafeLoader as SafeLoader
except ImportError:
from yaml import SafeLoader
Expand Down