Skip to content

Commit

Permalink
upgrade pytest-httpbin (2.1.0-1) unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherrling authored and Zeno-sole committed Feb 12, 2025
1 parent e085bb5 commit 7da7c3e
Show file tree
Hide file tree
Showing 42 changed files with 653 additions and 599 deletions.
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
disable-noqa = True
max-line-length = 88
extend-ignore =
E203
53 changes: 53 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
hooks:
- id: pyupgrade
args: ['--py38-plus']

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: ['--target-version', 'py38']

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: mixed-line-ending

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]

- repo: https://github.com/myint/autoflake
rev: v2.1.1
hooks:
- id: autoflake
args:
- --in-place
- --remove-all-unused-imports
- --expand-star-imports
- --remove-duplicate-keys
- --remove-unused-variables

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-2020]
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2014-2023 Kevin McCarthy

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
# it's already declared in setup.py
include pytest_httpbin/certs/*
include DESCRIPTION.rst
recursive-include tests *.py
220 changes: 134 additions & 86 deletions README.md

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions debian/README.source
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
This package is maintained with git-buildpackage(1). It follows DEP-14 for
branch naming (e.g. using debian/master for the current version in Debian
unstable due Debian Python team policy).

It uses pristine-tar(1) to store enough information in git to generate bit
identical tarballs when building the package without having downloaded an
upstream tarball first.

When working with patches it is recommended to use "gbp pq import" to import
the patches, modify the source and then use "gbp pq export --commit" to commit
the modifications.

The changelog is generated using "gbp dch" so if you submit any changes don't
bother to add changelog entries but rather provide a nice git commit message
that can then end up in the changelog.

It is recommended to build the package with pbuilder using:

gbp buildpackage --git-pbuilder

For information on how to set up a pbuilder environment see the git-pbuilder(1)
manpage. In short:

DIST=sid git-pbuilder create
gbp clone https://salsa.debian.org/python-team/packages/pytest-httpbin.git
cd pytest-httpbin
gbp buildpackage --git-pbuilder

-- Carsten Schoenert <[email protected]> Tue, 26 Dec 2023 11:19:00 +0100
29 changes: 29 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
pytest-httpbin (2.1.0-1) unstable; urgency=medium

* Team upload
* [e336dd9] New upstream version 2.1.0
* [2a6c4a4] d/control: Bump Standards-Version to 4.7.0
No further changes needed.

-- Carsten Schoenert <[email protected]> Sat, 28 Sep 2024 19:11:27 +0200

pytest-httpbin (2.0.0-1) unstable; urgency=medium

* Team upload

[ Debian Janitor ]
* Bump debhelper from old 12 to 13.
* Update standards version to 4.6.2, no changes needed.

[ Carsten Schoenert ]
* [c156369] d/watch: Move to git mode and version 4
* [df48c51] New upstream version 2.0.0
(Closes: #1020728, #1020796, #1058232)
* [e3f0e9a] debian/*: Running wrap-and-sort -ast
* [7600b3e] d/control: Add BuildProfileSpecs, adjust needed B-D
* [9276562] d/rules: Remove --with option in default target
* [c4678d0] autopkgtest: Update test setup
* [fdffab2] d/README.source: Add basic information about source

-- Carsten Schoenert <[email protected]> Tue, 26 Dec 2023 11:20:47 +0100

pytest-httpbin (1.0.0-3) unstable; urgency=medium

[ Ondřej Nový ]
Expand Down
33 changes: 18 additions & 15 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,31 @@ Source: pytest-httpbin
Section: python
Priority: optional
Maintainer: Debian Python Team <[email protected]>
Uploaders: Pierre-Elliott Bécue <[email protected]>
Build-Depends: debhelper-compat (= 12),
dh-python,
pandoc,
python3-all,
python3-decorator,
python3-flask,
python3-httpbin,
python3-pytest,
python3-requests,
python3-setuptools,
python3-six,
python3-werkzeug
Standards-Version: 4.4.1
Uploaders:
Pierre-Elliott Bécue <[email protected]>,
Build-Depends:
debhelper-compat (= 13),
dh-sequence-python3,
pybuild-plugin-pyproject,
pandoc,
python3-all,
python3-flask <!nocheck>,
python3-httpbin <!nocheck>,
python3-pytest <!nocheck>,
python3-requests <!nocheck>,
python3-setuptools,
Standards-Version: 4.7.0
Rules-Requires-Root: no
Homepage: https://github.com/kevin1024/pytest-httpbin
Vcs-Git: https://salsa.debian.org/python-team/packages/pytest-httpbin.git
Vcs-Browser: https://salsa.debian.org/python-team/packages/pytest-httpbin

Package: python3-pytest-httpbin
Architecture: all
Depends: python3-pytest, ${misc:Depends}, ${python3:Depends}
Depends:
python3-pytest,
${misc:Depends},
${python3:Depends},
Description: py.test plugin providing a local httpbin (Python 3)
httpbin is a WSGI based test server for testing HTTP applications.
pytest-httpbin creates a fixture for the py.test framework that
Expand Down
6 changes: 4 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS=nocheck

export PYBUILD_NAME=pytest-httpbin

%:
dh $@ --with python3 --buildsystem=pybuild
dh $@ --buildsystem=pybuild

override_dh_auto_test:

Expand Down
15 changes: 6 additions & 9 deletions debian/tests/control
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
Tests: python3-pytest-httpbin
Depends: python3-all,
python3-decorator,
python3-flask,
python3-httpbin,
python3-pytest,
python3-pytest-httpbin,
python3-requests,
python3-six,
python3-werkzeug
Depends:
python3-all,
python3-flask,
python3-requests,
@,
Restrictions: allow-stderr
26 changes: 23 additions & 3 deletions debian/tests/python3-pytest-httpbin
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
#!/bin/sh
set -e
for py in $(py3versions -i); do echo "[*] testing on $py:"; $py -Wd -m pytest -v -x -s 2>&1; done
#!/bin/bash

set -e -u

cp -a tests "${AUTOPKGTEST_TMP}"

for py3vers in $(py3versions -s); do
echo
echo "***************************"
echo "*** Testing with ${py3vers}"
echo "***************************"
echo
cd ${AUTOPKGTEST_TMP} && \
echo -e "Content of current working folder:\n" && \
ls -la && \
echo -e "Running tests...\n" && \
${py3vers} -m pytest -v -x -s tests && \
rm -rf .pytest_cache || exit 1
done

echo

exit 0
12 changes: 8 additions & 4 deletions debian/watch
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
version=3
opts="filenamemangle=s/(?:.*)?v?(\d[\d\.]+)\.tar\.gz/pytest-httpbin-$1.tar.gz/" \
https://github.com/kevin1024/pytest-httpbin/releases (?:.*/)?v?(\d[\d\.]+)\.tar\.gz
# Github tarball ships with tests
version=4

opts="mode=git, \
compression=gz, \
uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\.?\d*)$/$1/, \
dversionmangle=s/\+ds(\.?\d+)?$//" \
https://github.com/kevin1024/pytest-httpbin.git \
refs/tags/@ANY_VERSION@
90 changes: 90 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
name = "pytest-httpbin"
description = "Easily test your HTTP library against a local copy of httpbin"
authors = [{name = "Kevin McCarthy", email = "[email protected]"}]
license = {text = "MIT"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Libraries",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
keywords = ["pytest-httpbin testing pytest httpbin"]
requires-python = ">=3.8"
dependencies = ["httpbin"]
dynamic = ["version"]

[project.readme]
file = "DESCRIPTION.rst"
content-type = "text/x-rst"

[project.urls]
Homepage = "https://github.com/kevin1024/pytest-httpbin"

[project.entry-points]
pytest11 = {httpbin = "pytest_httpbin.plugin"}

[project.optional-dependencies]
test = [
"requests",
"pytest",
]

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
exclude = [
"contrib",
"docs",
"tests*",
]
namespaces = false

[tool.setuptools.dynamic]
version = {attr = "pytest_httpbin.version.__version__"}

[tool.pytest.ini_options]
addopts = "--strict-config --strict-markers"
filterwarnings = [
"error",
'ignore:ast\.(Str|NameConstant) is deprecated:DeprecationWarning:_pytest',
]
xfail_strict = true

[tool.tox]
legacy_tox_ini = """
[tox]
minversion=3.28.0
requires=
virtualenv>=20.13.2
tox-gh-actions>=2.9.1
envlist = py38, py39, py310, pypy3
[testenv]
package = wheel
wheel_build_env = .pkg
extras = test
commands = pytest -v -s {posargs}
install_command = python -I -m pip install --use-pep517 {opts} {packages}
[testenv:release]
deps =
build
twine
commands =
{envpython} -m release
pyproject-build --sdist
twine check {toxinidir}/dist/*.*
"""
3 changes: 1 addition & 2 deletions pytest_httpbin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

import pytest


here = os.path.dirname(__file__)
version_file = os.path.join(here, "version.py")

with open(version_file) as f:
code = compile(f.read(), version_file, 'exec')
code = compile(f.read(), version_file, "exec")
exec(code)

use_class_based_httpbin = pytest.mark.usefixtures("class_based_httpbin")
Expand Down
5 changes: 3 additions & 2 deletions pytest_httpbin/certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
def where():
"""Return the preferred certificate bundle."""
# vendored bundle inside Requests
return os.path.join(os.path.dirname(__file__), 'certs', 'cacert.pem')
return os.path.join(os.path.dirname(__file__), "certs", "client.pem")

if __name__ == '__main__':

if __name__ == "__main__":
print(where())
1 change: 1 addition & 0 deletions pytest_httpbin/certs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
generated with 'python -m trustme'
Loading

0 comments on commit 7da7c3e

Please sign in to comment.