Skip to content

Commit

Permalink
web.py release v0.70 (#775)
Browse files Browse the repository at this point in the history
* web.py release v0.70

* Ruff: set upper limits on code complexity

* pre-commit autoupdate

* pre-commit autoupdate
  • Loading branch information
cclauss committed Oct 10, 2023
1 parent e28fe0d commit a1d2ee4
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- tomli

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.291
rev: v0.0.292
hooks:
- id: ruff
# args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -25,6 +25,6 @@ repos:
- id: validate-pyproject

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.1.0
rev: 1.2.0
hooks:
- id: pyproject-fmt
6 changes: 6 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# web.py changelog

## 2023-10-02 0.70

* Remove the cgi module which will be removed in Python 3.13 #773
* Add support for current versions of CPython
* Upgrade testing and linting tools

## 2020-11-09 0.62

* Fixed: application.load() assumes ctx.path will be a latin1 string #687
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[![pypi](https://img.shields.io/pypi/v/web.py)](https://pypi.org/project/web.py)
[![python versions](https://img.shields.io/pypi/pyversions/web.py)](https://devguide.python.org/versions)
[![build status](https://github.com/webpy/webpy/actions/workflows/lint_python.yml/badge.svg)](https://github.com/webpy/webpy/actions/workflows/lint_python.yml)

web.py is a Python web framework that is as simple as it is powerful.

Visit http://webpy.org for more information.

[![build status](https://github.com/webpy/webpy/actions/workflows/lint_python.yml/badge.svg)](https://github.com/webpy/webpy/actions/workflows/lint_python.yml)

This release supports all currently supported versions of CPython: https://devguide.python.org/versions

To install it, please run:
To install web.py, please run:
```
python3 -m pip install web.py
```
10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ select = [
"I",
"PLC",
"PLE",
"PLR",
"UP",
"W",
]
ignore = [
"E722",
"E731",
"F821",
"PLC1901",
"PLR5501",
]
line-length = 477
show-source = true
Expand All @@ -84,6 +85,13 @@ target-version = "py38"
[tool.ruff.mccabe]
max-complexity = 26

[tool.ruff.pylint]
allow-magic-value-types = ["int", "str"]
max-args = 9 # default is 5
max-branches = 17 # default is 12
max-returns = 8 # default is 6
max-statements = 51 # default is 50

[tool.codespell]
ignore-words-list = "asend,gae"
skip = ["./.*"]
2 changes: 1 addition & 1 deletion tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ def f(path):
self.assertEqual(f("/?x=2"), b"/?x=1")

p = f("/?y=1&y=2&x=2")
self.assertTrue(p == b"/?y=1&y=2&x=1" or p == b"/?x=1&y=1&y=2")
self.assertTrue(p in {b"/?y=1&y=2&x=1", b"/?x=1&y=1&y=2"})

def test_setcookie(self):
urls = ("/", "index")
Expand Down
2 changes: 1 addition & 1 deletion tools/makedoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def recurse_over(ob, name, indent_level=0):
argstr = ""
if ts.endswith(("function", "method")):
argstr = arg_string(ob)
elif ts == "classobj" or ts == "type":
elif ts in {"classobj", "type"}:
if ts == "classobj":
ts = "class"
if hasattr(ob, "__init__"):
Expand Down
2 changes: 1 addition & 1 deletion web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from .webapi import * # noqa: F401,F403
from .wsgi import * # noqa: F401,F403

__version__ = "0.62"
__version__ = "0.70"
__author__ = [
"Aaron Swartz <me@aaronsw.com>",
"Anand Chitipothu <anandology@gmail.com>",
Expand Down
1 change: 0 additions & 1 deletion web/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ def paren_expr():
t = next(tokens)
if t.value == end:
break
return

parens = {"(": ")", "[": "]", "{": "}"}

Expand Down

0 comments on commit a1d2ee4

Please sign in to comment.