Skip to content

Add many methods to the Mapping, Request and Response classes #605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import division, print_function, unicode_literals, with_statement

import fnmatch
import os
import shlex
Expand Down
8 changes: 2 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# General information about the project.
project = u'Pando'
copyright = u'2016, Chad Whitacre et al.'
copyright = u'2016, Chad Whitacre et al' # RtD theme doubles the period

# The full version, including alpha/beta/rc tags.
release = open('../version.txt').read().strip()
Expand All @@ -50,7 +50,6 @@

# -- Autodoc options

autodoc_default_flags = ['members', 'undoc-members', 'special-members']
autodoc_member_order = 'bysource'

_autodoc_exclusions = {
Expand Down Expand Up @@ -107,10 +106,7 @@ def setup(app):

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'pando', u'Pando Documentation',
[u'Chad Whitacre et al.'], 1)
]
man_pages = []


# -- Options for Texinfo output ------------------------------------------------
Expand Down
135 changes: 134 additions & 1 deletion docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,137 @@

This is the API reference for the Pando library.

.. automodule:: pando
pando.body_parsers
==================

.. automodule:: pando.body_parsers
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.exceptions
================

.. automodule:: pando.exceptions
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.http
==========

.. automodule:: pando.http
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.http.baseheaders
----------------------

.. automodule:: pando.http.baseheaders
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.http.mapping
------------------

.. automodule:: pando.http.mapping
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.http.request
------------------

.. automodule:: pando.http.request
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.http.response
-------------------

.. automodule:: pando.http.response
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.logging
=============

.. automodule:: pando.logging
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.state_chain
=================

.. automodule:: pando.state_chain
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.testing
=============

.. automodule:: pando.testing
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.testing.client
--------------------

.. automodule:: pando.testing.client
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.testing.harness
---------------------

.. automodule:: pando.testing.harness
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.utils
===========

.. automodule:: pando.utils
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.website
=============

.. automodule:: pando.website
:members:
:undoc-members:
:special-members:
:show-inheritance:

pando.wsgi
==========

.. automodule:: pando.wsgi
:members:
:undoc-members:
:special-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Step 3: Create a website root::
(foo)$ mkdir www
(foo)$ cd www

Step 4: Create a web page, and start pando inside it::
Step 4: Create a web page and start pando::

(foo)$ echo Greetings, program! > index.html.spt
(foo)$ python -m pando
Expand Down
18 changes: 5 additions & 13 deletions pando/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
"""
.. automodule:: pando.body_parsers
.. automodule:: pando.exceptions
.. automodule:: pando.http
.. automodule:: pando.logging
.. automodule:: pando.state_chain
.. automodule:: pando.testing
.. automodule:: pando.utils
.. automodule:: pando.website
.. automodule:: pando.wsgi

"""

from http.cookies import Morsel
from os.path import dirname, join
import sys
import pkg_resources
Expand All @@ -32,3 +20,7 @@
__version__ = f.read()

WINDOWS = sys.platform[:3] == 'win'

if sys.version_info < (3, 8, 0):
# https://stackoverflow.com/q/50813091/2729778
Morsel._reserved['samesite'] = 'SameSite'
6 changes: 1 addition & 5 deletions pando/body_parsers.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
"""
:mod:`body_parsers`
===================

This module contains Pando's built-in body parsers.
"""This module contains Pando's built-in body parsers.

Body parsers are optional ways to enable Pando to uniformly parse POST body
content according to its supplied ``Content-Type``.
Expand Down
7 changes: 1 addition & 6 deletions pando/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
"""
:mod:`exceptions`
=================

Custom exceptions raised by Pando
"""
"""Custom exceptions raised by Pando"""

from . import Response

Expand Down
19 changes: 1 addition & 18 deletions pando/http/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
"""
:mod:`http`
===========

.. automodule:: pando.http.baseheaders
:inherited-members:
:show-inheritance:
.. automodule:: pando.http.mapping
:inherited-members:
:show-inheritance:
.. automodule:: pando.http.request
:inherited-members:
:show-inheritance:
.. automodule:: pando.http.response

"""


#: Dict of HTTP status codes to strings.
status_strings = {
100: "Continue",
101: "Switching Protocols",
Expand Down
5 changes: 0 additions & 5 deletions pando/http/baseheaders.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
"""
:mod:`baseheaders`
------------------
"""

from http.cookies import CookieError, SimpleCookie

from .mapping import BytesMapping, CaseInsensitiveMapping
Expand Down
Loading