Skip to content
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

Refactor from single module to package #107

Merged
merged 3 commits into from
Oct 18, 2018
Merged
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.pyo
__pycache__/
.idea/
.vscode/
.DS_Store
env/
venv/
Expand All @@ -15,3 +16,4 @@ docs/_build/
.coverage
.coverage.*
htmlcov/
.hypothesis/
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.2.0
rev: v1.3.1
hooks:
- id: reorder-python-imports
args: ["--application-directories", "src"]
Expand All @@ -9,6 +9,10 @@ repos:
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.4.0
rev: v2.0.0
hooks:
- id: check-byte-order-marker
- id: trailing-whitespace
- id: end-of-file-fixer
- id: flake8
additional_dependencies: [flake8-bugbear]
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ script:
- tox

cache:
- pip
directories:
- $HOME/.cache/pip
- $HOME/.cache/pre-commit

branches:
only:
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Version 1.0
Unreleased

- Drop support for Python 2.6 and 3.3.
- Refactor code from a single module to a package. Any object in the
API docs is still importable from the top-level ``itsdangerous``
name, but other imports will need to be changed. A future release
will remove many of these compatibility imports.
- Optimize how timestamps are serialized and deserialized. (`#13`_)
- ``base64_decode`` raises ``BadData`` when it is passed invalid data.
(`#27`_)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ The initial implementation of It's Dangerous was inspired by Django's
signing module.

Copyright © Django Software Foundation and individual contributors.
All rights reserved.
All rights reserved.
1 change: 0 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = ItsDangerous
SOURCEDIR = .
BUILDDIR = _build

Expand Down
Binary file added docs/_static/itsdangerous-logo-sidebar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Changes
=======

.. include:: ../CHANGES.rst
9 changes: 6 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@
ProjectLink("Issue Tracker", "https://github.com/pallets/itsdangerous/issues/"),
]
}
html_sidebars = {"index": ["project.html", "localtoc.html", "versions.html"]}
html_sidebars = {
"index": ["project.html", "localtoc.html", "searchbox.html"],
"**": ["localtoc.html", "relations.html", "searchbox.html"],
}
singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
html_static_path = ["_static"]
html_logo = "_static/itsdangerous-logo-sidebar.png"
html_title = "It's Dangerous Documentation ({})".format(version)
html_show_sourcelink = False
html_domain_indices = False
html_experimental_html5_writer = True

# LaTeX ----------------------------------------------------------------

Expand Down
8 changes: 8 additions & 0 deletions docs/encoding.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. module:: itsdangerous.encoding

Encoding Utilities
==================

.. autofunction:: base64_encode

.. autofunction:: base64_decode
22 changes: 22 additions & 0 deletions docs/exceptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. module:: itsdangerous.exc

Exceptions
==========

.. autoexception:: BadData
:members:

.. autoexception:: BadSignature
:members:

.. autoexception:: BadTimeSignature
:members:

.. autoexception:: SignatureExpired
:members:

.. autoexception:: BadHeader
:members:

.. autoexception:: BadPayload
:members:
Loading