Compare commits
9 Commits
Author | SHA1 | Date |
---|---|---|
|
f668fc3fe6 | |
|
9784c82679 | |
|
f23dfd2a51 | |
|
b1145af6bb | |
|
0b010d5c10 | |
|
4f3b916b9f | |
|
5dcf364e0f | |
|
aa54e8536a | |
|
96e9e76ff4 |
|
@ -11,7 +11,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python: [2.7, 3.6, 3.7, 3.8, 3.9]
|
python: [2.7, 3.7, 3.8, 3.9, "3.10", 3.11]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -23,3 +23,15 @@ jobs:
|
||||||
run: pip install tox
|
run: pip install tox
|
||||||
- name: Run Tox
|
- name: Run Tox
|
||||||
run: tox -e py
|
run: tox -e py
|
||||||
|
pep8:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.9
|
||||||
|
- name: Install Tox
|
||||||
|
run: pip install tox
|
||||||
|
- name: Run Tox pep8
|
||||||
|
run: "tox -e pep8"
|
||||||
|
|
11
ChangeLog
11
ChangeLog
|
@ -1,6 +1,17 @@
|
||||||
servefile changelog
|
servefile changelog
|
||||||
===================
|
===================
|
||||||
|
|
||||||
|
2023-01-23 v0.5.4
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
0.5.4 released
|
||||||
|
|
||||||
|
* code reformatting for better maintainability
|
||||||
|
* upload to uploaddir instead of /tmp for large files
|
||||||
|
* add python3.10 / python3.11 support
|
||||||
|
* drop python3.6 support
|
||||||
|
|
||||||
|
|
||||||
2021-11-18 v0.5.3
|
2021-11-18 v0.5.3
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.TH SERVEFILE 1 "November 2021" "servefile 0.5.3" "User Commands"
|
.TH SERVEFILE 1 "January 2023" "servefile 0.5.4" "User Commands"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
servefile \- small HTTP-Server for temporary file transfer
|
servefile \- small HTTP-Server for temporary file transfer
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
5
setup.py
5
setup.py
|
@ -11,7 +11,7 @@ setup(
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
platforms='posix',
|
platforms='posix',
|
||||||
version='0.5.3',
|
version='0.5.4',
|
||||||
license='GPLv3 or later',
|
license='GPLv3 or later',
|
||||||
url='https://github.com/sebageek/servefile/',
|
url='https://github.com/sebageek/servefile/',
|
||||||
author='Sebastian Lohff',
|
author='Sebastian Lohff',
|
||||||
|
@ -38,10 +38,11 @@ setup(
|
||||||
'Programming Language :: Python :: 2',
|
'Programming Language :: Python :: 2',
|
||||||
'Programming Language :: Python :: 2.7',
|
'Programming Language :: Python :: 2.7',
|
||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 3',
|
||||||
'Programming Language :: Python :: 3.6',
|
|
||||||
'Programming Language :: Python :: 3.7',
|
'Programming Language :: Python :: 3.7',
|
||||||
'Programming Language :: Python :: 3.8',
|
'Programming Language :: Python :: 3.8',
|
||||||
'Programming Language :: Python :: 3.9',
|
'Programming Language :: Python :: 3.9',
|
||||||
|
'Programming Language :: Python :: 3.10',
|
||||||
|
'Programming Language :: Python :: 3.11',
|
||||||
'Topic :: Communications',
|
'Topic :: Communications',
|
||||||
'Topic :: Communications :: File Sharing',
|
'Topic :: Communications :: File Sharing',
|
||||||
'Topic :: Internet',
|
'Topic :: Internet',
|
||||||
|
|
|
@ -146,7 +146,7 @@ def _test_version(run_servefile, standalone):
|
||||||
version = s.stdout.readline().decode().strip()
|
version = s.stdout.readline().decode().strip()
|
||||||
|
|
||||||
# hardcode version as string until servefile is a module
|
# hardcode version as string until servefile is a module
|
||||||
assert version == 'servefile 0.5.3'
|
assert version == 'servefile 0.5.4'
|
||||||
|
|
||||||
|
|
||||||
def test_version(run_servefile):
|
def test_version(run_servefile):
|
||||||
|
@ -357,6 +357,20 @@ def test_upload_size_limit(run_servefile, tmp_path):
|
||||||
assert r.status_code == 200
|
assert r.status_code == 200
|
||||||
|
|
||||||
|
|
||||||
|
def test_upload_large_file(run_servefile, tmp_path):
|
||||||
|
# small files end up in BytesIO while large files get temporary files. this
|
||||||
|
# test makes sure we hit the large file codepath at least once
|
||||||
|
uploaddir = tmp_path / 'upload'
|
||||||
|
run_servefile(['-u', str(uploaddir)])
|
||||||
|
|
||||||
|
data = "asdf" * 1024
|
||||||
|
files = {'file': ('more_data.txt', data)}
|
||||||
|
r = _retry_while(ConnectionError, make_request)(method='post', files=files)
|
||||||
|
assert r.status_code == 200
|
||||||
|
with open(str(uploaddir / 'more_data.txt')) as f:
|
||||||
|
assert f.read() == data
|
||||||
|
|
||||||
|
|
||||||
def test_tar_mode(run_servefile, datadir):
|
def test_tar_mode(run_servefile, datadir):
|
||||||
d = {
|
d = {
|
||||||
'foo': {
|
'foo': {
|
||||||
|
|
12
tox.ini
12
tox.ini
|
@ -1,9 +1,19 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py27,py36,py37,py38,py39
|
envlist = py27,py37,py38,py39,py310,py311,pep8
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
pathlib2; python_version<"3"
|
pathlib2; python_version<"3"
|
||||||
pytest
|
pytest
|
||||||
requests
|
requests
|
||||||
|
flake8
|
||||||
commands = pytest -v --tb=short {posargs}
|
commands = pytest -v --tb=short {posargs}
|
||||||
|
|
||||||
|
[testenv:pep8]
|
||||||
|
commands = flake8 servefile/ {posargs}
|
||||||
|
|
||||||
|
[flake8]
|
||||||
|
show-source = True
|
||||||
|
max-line-length = 120
|
||||||
|
ignore = E123,E125,E241,E402,E741,W503,W504,H301
|
||||||
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||||
|
|
Loading…
Reference in New Issue