Skip to content

Commit 199226b

Browse files
feat: update python-bottle to 0.13.2-1.1
1 parent f50824c commit 199226b

File tree

244 files changed

+73642
-13054
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

244 files changed

+73642
-13054
lines changed

.coveragerc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
[run]
22
branch = True
33
parallel = True
4-
data_file = build/.coverage
5-
6-
[report]
7-
include=bottle.py
8-
9-
[html]
10-
directory = build/coverage
4+
source = bottle

.readthedocs.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: latest
12+
13+
# Build documentation in the "docs/" directory with Sphinx
14+
sphinx:
15+
configuration: docs/conf.py
16+
17+
# Optional but recommended, declare the Python requirements required
18+
# to build your documentation
19+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20+
python:
21+
install:
22+
- requirements: docs/requirements.txt

AUTHORS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Bottle is written and maintained by Marcel Hellkamp <[email protected]>.
22

3-
Thanks to all the people who found bugs, sent patches, spread the word, helped each other on the mailing-list and made this project possible. I hope the following (alphabetically sorted) list is complete. If you miss your name on that list (or want your name removed) please :doc:`tell me <contact>` or add it yourself.
3+
Thanks to all the people who found bugs, sent patches, spread the word, helped each other on the mailing-list and made this project possible. I hope the following (alphabetically sorted) list is complete. If you miss your name on that list (or want your name removed) please file a pull request.
44

55
* acasajus
66
* Adam R. Smith
@@ -36,6 +36,7 @@ Thanks to all the people who found bugs, sent patches, spread the word, helped e
3636
* Johannes Krampf
3737
* Jonas Haag
3838
* Joshua Roesslein
39+
* Judson Neer
3940
* Karl
4041
* Kevin Zuber
4142
* Kraken
@@ -47,6 +48,7 @@ Thanks to all the people who found bugs, sent patches, spread the word, helped e
4748
* Michael Soulier
4849
* `reddit <http://reddit.com/r/python>`_
4950
* Nicolas Vanhoren
51+
* Oz N Tiram
5052
* Robert Rollins
5153
* rogererens
5254
* rwxrwx
@@ -62,3 +64,4 @@ Thanks to all the people who found bugs, sent patches, spread the word, helped e
6264
* voltron
6365
* Wieland Hoffmann
6466
* zombat
67+
* Thiago Avelino

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2012, Marcel Hellkamp.
1+
Copyright (c) 2009-2024, Marcel Hellkamp.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include bottle.py
22
include setup.py
33
include README.rst
4-
include LICENSE.txt
4+
include LICENSE
55
include test/views/*.tpl
66
include test/*.py

Makefile

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,67 @@
1-
PATH := build/python/bin:$(PATH)
21
VERSION = $(shell python setup.py --version)
32
ALLFILES = $(shell echo bottle.py test/*.py test/views/*.tpl)
43
VENV = build/venv
4+
TESTBUILD = build/python
55

6-
.PHONY: release coverage install docs test 2to3 clean
6+
.PHONY: venv release coverage install docs test clean
77

8-
release: clean venv
8+
release: clean test_all venv
99
$(VENV)/bin/python3 setup.py --version | egrep -q -v '[a-zA-Z]' # Fail on dev/rc versions
1010
git commit -e -m "Release of $(VERSION)" # Fail on nothing to commit
1111
git tag -a -m "Release of $(VERSION)" $(VERSION) # Fail on existing tags
1212
git push origin HEAD # Fail on out-of-sync upstream
1313
git push origin tag $(VERSION) # Fail on dublicate tag
1414
$(VENV)/bin/python3 setup.py sdist bdist_wheel # Build project
15-
$(VENV)/bin/twine upload dist/bottle-$(VERSION)* # Release to pypi
15+
$(VENV)/bin/twine upload dist/$(VERSION)* # Release to pypi
1616

1717
venv: $(VENV)/.installed
1818
$(VENV)/.installed: Makefile
1919
python3 -mvenv $(VENV)
2020
$(VENV)/bin/python3 -mensurepip
2121
$(VENV)/bin/pip install -U pip
22-
$(VENV)/bin/pip install -U setuptools wheel twine coverage
22+
$(VENV)/bin/pip install -U setuptools wheel twine pytest coverage
23+
$(VENV)/bin/pip install -U sphinx sphinx-intl transifex-client
2324
touch $(VENV)/.installed
2425

25-
coverage:
26-
-mkdir build/
27-
coverage erase
28-
COVERAGE_PROCESS_START=.coveragerc python -m unittest discover
29-
coverage combine
30-
coverage report
31-
coverage html
26+
coverage: venv
27+
$(VENV)/bin/coverage erase
28+
$(VENV)/bin/coverage run -m pytest
29+
$(VENV)/bin/coverage combine
30+
$(VENV)/bin/coverage report
31+
$(VENV)/bin/coverage html
3232

33-
push: test
33+
push: test_all
3434
git push origin HEAD
3535

3636
install:
3737
python setup.py install
3838

39-
docs:
40-
sphinx-build -b html -d build/docs/doctrees docs build/docs/html
39+
docs: venv
40+
$(VENV)/bin/sphinx-build -b html -d build/docs/doctrees docs build/docs/html/;
4141

42-
test:
43-
python -m unittest discover
42+
tx-pull: venv
43+
. $(VENV)/bin/activate; \
44+
cd docs/_locale/ \
45+
&& tx pull -af
46+
47+
tx-push: venv
48+
. $(VENV)/bin/activate; \
49+
cd docs/_locale/ \
50+
&& sphinx-build -b gettext -E .. _pot \
51+
&& sphinx-intl update-txconfig-resources -p _pot -d . --transifex-project-name bottle \
52+
&& tx push -s
53+
54+
tx:
55+
$(MAKE) tx-push
56+
$(MAKE) tx-pull
57+
58+
test: venv
59+
. $(VENV)/bin/activate; pytest
4460

4561
clean:
46-
rm -rf build/ dist/ MANIFEST 2>/dev/null || true
62+
rm -rf $(VENV) build/ dist/ MANIFEST .coverage .name htmlcov 2>/dev/null || true
4763
find . -name '__pycache__' -exec rm -rf {} +
4864
find . -name '*.pyc' -exec rm -f {} +
4965
find . -name '*.pyo' -exec rm -f {} +
5066
find . -name '*~' -exec rm -f {} +
5167
find . -name '._*' -exec rm -f {} +
52-
find . -name '.coverage*' -exec rm -f {} +

README.rst

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,73 @@
1-
Bottle Web Framework
2-
====================
3-
41
.. image:: http://bottlepy.org/docs/dev/_static/logo_nav.png
2+
:target: http://bottlepy.org/
53
:alt: Bottle Logo
64
:align: right
75

8-
Bottle is a fast and simple micro-framework for small web applications. It
9-
offers request dispatching (URL routing) with URL parameter support, templates,
10-
a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and
11-
template engines - all in a single file and with no dependencies other than the
12-
Python Standard Library.
6+
.. image:: https://github.com/bottlepy/bottle/workflows/Tests/badge.svg
7+
:target: https://github.com/bottlepy/bottle/workflows/Tests
8+
:alt: Tests Status
139

14-
Homepage and documentation: http://bottlepy.org/
15-
License: MIT (see LICENSE)
10+
.. image:: https://img.shields.io/pypi/v/bottle.svg
11+
:target: https://pypi.python.org/pypi/bottle/
12+
:alt: Latest Version
1613

17-
Installation and Dependencies
18-
-----------------------------
14+
.. image:: https://img.shields.io/pypi/l/bottle.svg
15+
:target: https://pypi.python.org/pypi/bottle/
16+
:alt: License
1917

20-
Install bottle with ``pip install bottle`` or just `download bottle.py <http://pypi.python.org/pypi/bottle>`_ and place it in your project directory. There are no (hard) dependencies other than the Python Standard Library.
18+
.. _mako: http://www.makotemplates.org/
19+
.. _cheetah: http://www.cheetahtemplate.org/
20+
.. _jinja2: http://jinja.pocoo.org/
21+
.. _paste: https://pythonpaste.readthedocs.io/
22+
.. _fapws3: https://github.com/william-os4y/fapws3
23+
.. _bjoern: https://github.com/jonashaag/bjoern
24+
.. _cherrypy: https://docs.cherrypy.dev/
25+
.. _WSGI: https://wsgi.readthedocs.io/
26+
.. _Python: http://python.org/
2127

28+
============================
29+
Bottle: Python Web Framework
30+
============================
2231

23-
Example
24-
-------
32+
Bottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_. It is distributed as a single file module and has no dependencies other than the `Python Standard Library <http://docs.python.org/library/>`_.
33+
34+
35+
* **Routing:** Requests to function-call mapping with support for clean and dynamic URLs.
36+
* **Templates:** Fast and pythonic `*built-in template engine* <http://bottlepy.org/docs/dev/tutorial.html#tutorial-templates>`_ and support for mako_, jinja2_ and cheetah_ templates.
37+
* **Utilities:** Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.
38+
* **Server:** Built-in HTTP development server and support for paste_, fapws3_, bjoern_, `Google App Engine <https://cloud.google.com/appengine/>`_, cherrypy_ or any other WSGI_ capable HTTP server.
39+
40+
Homepage and documentation: http://bottlepy.org
41+
42+
43+
Example: "Hello World" in a bottle
44+
----------------------------------
2545

2646
.. code-block:: python
2747
28-
from bottle import route, run
48+
from bottle import route, run, template
49+
50+
@route('/hello/<name>')
51+
def index(name):
52+
return template('<b>Hello {{name}}</b>!', name=name)
53+
54+
run(host='localhost', port=8080)
55+
56+
Run this script or paste it into a Python console, then point your browser to `<http://localhost:8080/hello/world>`_. That's it.
57+
58+
59+
Download and Install
60+
--------------------
61+
62+
.. __: https://github.com/bottlepy/bottle/raw/master/bottle.py
63+
64+
Install the latest stable release with ``pip install bottle`` or download `bottle.py`__ (unstable) into your project directory. There are no hard dependencies other than the Python standard library.
65+
66+
License
67+
-------
68+
69+
.. __: https://github.com/bottlepy/bottle/raw/master/LICENSE
2970

30-
@route('/hello/<name>')
31-
def hello(name):
32-
return '<h1>Hello %s!</h1>' % name.title()
71+
Code and documentation are available according to the MIT License (see LICENSE__).
3372

34-
run(host='localhost', port=8080)
73+
The Bottle logo however is *NOT* covered by that license. It is allowed to use the logo as a link to the bottle homepage or in direct context with the unmodified library. In all other cases, please ask first.

0 commit comments

Comments
 (0)