| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |\
| |/
|/| |
Update from upstream
|
|\ \
| | |
| | | |
Add tox.ini
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
tox is a nice tool to run tests: it creates virtual environments,
install test dependencies and run tests. With the simple command
"tox", tests are run on Python 2 and Python 3.
* Create tox.ini based on .travis.yml
* Modidy .travis.yml to use tox-travis:
https://github.com/ryanhiebert/tox-travis
* .gitignore: ignore .tox/ sub-directory created by tox.
|
|\ \
| | |
| | | |
Fix BytesWarning in Mapper.generate()
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When python3 is run with -bb, str(bytes) raises a BytesWarning. On
Python 3, Mapper.generate() gets such BytesWarning because
script_name type is str whereas cache_key type is byte.
On Python 3, generate() now encodes the script_name to UTF-8 and uses
bytes concatenation to fix this issue.
.travis.yml: Run tests using "python -bb $(which nosetests)" to raise
BytesWarning exception on bytes vs Unicode issue.
|
|\ \
| |/
|/| |
Fix empty string match
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
allow requirements to be specified on Mapper.resource
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for ``requirements`` option to mapper.resource,
which makes it possible to restrict matching in urls (most often
useful for capturing variables with path_prefix).
In OpenStack Nova we've used the prefix_path on Mapper.resource to
specify additional variables we want to capture (specifically
{project_id}). Project_id is a uuid. When trying to restrict
project_id to only valid uuid format a couple of issues were exposed.
- #1 '/{project_id:[a-f0-9]{32}}/...' builds an incorrect regex
because of the nested {}
- #2 the preferred method that works on connect() to pass
requirements doesn't work here (requirements are reset to only an
id match)
That leaves us with having to build a custom project_id match with 32
[a-f0-9] strings appended for every resource added to get the support
we need without effectively vendoring our own version of Mapper.resource.
This small change to allow requirements to pass through would make it
possible to get this tighter validation with much smaller regexes.
|
| |
|
|\
| |
| | |
Concat fix
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow name_prefixes to concatenate in submapper nesting. Also fix the
case where the concatenation behavior was being applied to all
non-dictionary arguments in the submapper. This had the effect of
concat'ing args like controller definition together rather than allowing
submapper definitions to override parent definitions for arguments.
Fix mapper so that collection_name can be None.
For collections with no collection_name, adds a logic branch to handle
the case cleanly and provide a reasonable path_prefix.
Remove special controller case
This change makes routes treat path_prefix and name_prefix as special
instead of 'controller' as special. This allows any argument to be
overridden in child submappers and allows the 'prefix' args to
concatenate as you would expect.
Add extended call signature to add_action, missing from previous commits
|
| |
|
| |
|
|\
| |
| | |
Issue #42: Fix compilation of docs
|
|/
|
|
|
|
|
|
|
| |
* Set the HTML theme to 'classic' to fix the error:
"unsupported theme option 'relbarlinkcolor' given"
* Add tox.ini to easily run tests on Python 2.7 and 3.4, and to compile
documentation: tox installs requirements. Use "tox -e docs" to compile
the documentation, the docs directory is always cleaned up.
* Add todo.rst to the documentation (add it to TOC in the index)
|
|\
| |
| | |
Port Routes to Python 3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code now works on Python 2 and Python 3 without modifications: 2to3
is no more needed. Changes:
* Drop 2to3 from setup.py: the code is now directly compatible with
Python 2 and Python 3
* Add dependency to six
* Drop support for Python 3.2: remove 3.2 from .travis.yml
* Replace "for key, value in dict.iteritems():" with "for key, value in
six.iteritems(dict):"
* Use six.moves.urllib to get urllib functions
* Replace unicode() with six.text_type()
* Replace dict.keys() with list(dict.keys())
* Replace "dict.has_key(key)" with "key in dict"
* Remove "py3where=build" from notests section of setup.cfg
* Add parenthesis to print()
* Replace dict.items() with list(dict.items())
|
|\ \
| | |
| | | |
built wheel is not universal
|
|/ /
| |
| | |
wheels built on python2 will not work on python3
|
| | |
|
|\ \
| | |
| | | |
Update introduction.rst
|
| | |
| | |
| | | |
Removed duplicated AND
|
|\ \ \
| | | |
| | | | |
fix link typo
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Fix wrong url pattern
|
| | |/
| |/|
| | | |
There must be leading slashes in order to match
|
|\ \ \
| | | |
| | | | |
Minor fix in docs
|
| |/ /
| | |
| | |
| | |
| | | |
As the doc says "Route paths should always begin with a slash."
Add a import statement in example code, since in that place it's the first time mention this class and user can't understand what "Route" class is.
|
|\ \ \
| | | |
| | | | |
Fix typo in docs
|
| |/ /
| | |
| | | |
Remove useless leading slash
|
|\ \ \
| |/ /
|/| | |
Fixed a typo in the docs
|
|/ / |
|
|\ \
| |/
|/| |
Fix typo in url() example
|
|/
|
| |
It should be "archives" rather than "blog"
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
optional sections to avoid exceeding regex limits. Fixes #15.
|
|
|
|
| |
route. Fixes #11.
|
|
|
|
|
| |
'anchor'. They can now be passed in with a trailing '_' as was possible
before commit d1d1742903fa5ca24ef848a6ae895303f2661b2a. Fixes #7.
|
|
|
|
|
|
| |
failing to return the appropriate cached URL generation. The URL cache
should always include the SCRIPT_NAME, even if its empty, in the cache
to avoid this, and now does. Fixes #6.
|