Skip to content

Commit

Permalink
Update to 1.5.3 (#7)
Browse files Browse the repository at this point in the history
* auto publish to PyPi

* test

* test2

* random test version test

* random test version test

* random test version test

* random test version test

* random test version test

* random test version test

* Fix call to visage SurgePlay API without User-Agent

* Fix package requirements

* Fix package requirements

* add testing release publish

* add testing release publish FIX

* add delay before testing

* improve delay before testing

* Fix deps install

* disable depends on test
  • Loading branch information
teleportx authored Dec 13, 2023
1 parent a8dad9e commit 23c9df4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,19 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
test:
name: Test distribution
needs:
- publish-to-testpypi
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Test
run: |
sleep 30s
pip install -i https://test.pypi.org/simple/ Py-SPW==${{ github.run_id }}-${{ github.run_attempt }} --no-deps
6 changes: 5 additions & 1 deletion pyspw/User.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

mapi = MAPI()

headers = {
'User-Agent': f'Py-SPW'
}


class SkinVariant(Enum):
"""
Expand Down Expand Up @@ -45,7 +49,7 @@ def get_image(self) -> bytes:
"""

try:
visage_surgeplay_response = rq.get(self.__skin_part_url)
visage_surgeplay_response = rq.get(self.__skin_part_url, headers=headers)
if visage_surgeplay_response.status_code != 200:
raise err.SurgeplayApiError(f'HTTP status: {visage_surgeplay_response.status_code}')
return visage_surgeplay_response.content
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
requests==2.28.2
requests>=2.28.2
mojang==1.1.0
pydantic~=1.10.7
setuptools~=65.5.1
validators~=0.20.0
pydantic>=1.10.7
setuptools>=65.5.1
validators>=0.20.0

0 comments on commit 23c9df4

Please sign in to comment.