Skip to content

Commit

Permalink
Merge b68d652 into 6955375
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Mar 24, 2021
2 parents 6955375 + b68d652 commit 3850d79
Show file tree
Hide file tree
Showing 19 changed files with 426 additions and 345 deletions.
12 changes: 0 additions & 12 deletions .coveragerc

This file was deleted.

39 changes: 39 additions & 0 deletions .editorconfig
@@ -0,0 +1,39 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
#
# EditorConfig Configuration file, for more details see:
# http://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types

# top-most EditorConfig file:
# Will ignore other EditorConfig files in Home directory or upper tree level.
root = true


[*] # For All Files
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Set default charset
charset = utf-8
# Indent style default
indent_style = space
# Max Line Length - a hard line wrap, should be disabled
max_line_length = off

[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

[*.{yml,zpt,pt,dtml}]
# 2 space indentation
indent_size = 2

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
indent_size = unset
tab_width = unset
56 changes: 56 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,56 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
name: tests

on:
push:
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday

jobs:
build:
strategy:
matrix:
config:
# [Python version, tox env]
- ["3.8", "lint"]
- ["2.7", "py27"]
- ["3.5", "py35"]
- ["3.6", "py36"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["pypy2", "pypy"]
- ["pypy3", "pypy3"]
- ["3.8", "coverage"]

runs-on: ubuntu-latest
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
run: tox -e ${{ matrix.config[1] }}
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls coverage-python-version
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 20 additions & 1 deletion .gitignore
@@ -1,10 +1,29 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
*.egg-info/
*.profraw
*.pyc
*.pyo
.coverage
.coverage.*
.eggs/
.installed.cfg
.mr.developer.cfg
.tox/
.vscode/
__pycache__/
bin/
build/
coverage.xml
develop-eggs/
htmlcov/
develop/
dist/
docs/_build
eggs/
etc/
lib/
lib64
log/
parts/
pyvenv.cfg
var/
18 changes: 18 additions & 0 deletions .meta.toml
@@ -0,0 +1,18 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[meta]
template = "pure-python"
commit-id = "5ff06aa9d4d474924437add182099207b5b7f5f7"

[python]
with-appveyor = false
with-pypy = true
with-legacy-python = true
with-docs = false
with-sphinx-doctests = false

[tox]
use-flake8 = true

[coverage]
fail-under = 96
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGES.txt
Expand Up @@ -4,7 +4,7 @@ Changes
1.2 (unreleased)
~~~~~~~~~~~~~~~~

- Add support for Python 3.8.
- Add support for Python 3.8 and 3.9.

- Drop support for Python 3.4.

Expand Down
7 changes: 5 additions & 2 deletions MANIFEST.in
@@ -1,9 +1,12 @@
include *.py
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
include *.rst
include *.txt
include .coveragerc
include buildout.cfg
include tox.ini

recursive-include src *.pt
recursive-include src *.py
recursive-include src *.rst
recursive-include src *.txt
recursive-include src *.zcml
52 changes: 0 additions & 52 deletions bootstrap.py

This file was deleted.

21 changes: 0 additions & 21 deletions buildout.cfg

This file was deleted.

10 changes: 10 additions & 0 deletions setup.cfg
@@ -1,2 +1,12 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[bdist_wheel]
universal = 1

[flake8]
doctests = 1

[check-manifest]
ignore =
.editorconfig
.meta.toml
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -50,6 +50,7 @@ def read(*rnames):
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
Expand Down
8 changes: 1 addition & 7 deletions src/z3c/__init__.py
@@ -1,7 +1 @@
# this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover
19 changes: 19 additions & 0 deletions src/z3c/authviewlet/README.txt
Expand Up @@ -310,6 +310,7 @@ link is displayed:
Selecting the link leads to the login page:

>>> login_url = browser.getLink('Login').url
>>> browser.handleErrors = False
>>> browser.getLink('Login').click()
>>> print(browser.url)
http://localhost/++skin++PageletTestSkin/@@loginForm.html?camefrom=http%3A%2F%2Flocalhost%2F%2B%2Bskin%2B%2BPageletTestSkin%2Fcontainer%2F%40%40login.html%3FnextURL%3Dhttp%253A%2F%2Flocalhost%2F%252B%252Bskin%252B%252BPageletTestSkin%2Fcontainer%2F%2540%2540default.html
Expand Down Expand Up @@ -602,3 +603,21 @@ confirmation page telling that logout was successfull:
</div>
</body>
</html>

If the parameter ``camefrom`` is used twice, only the first one is actually
used:

>>> browser.open('http://localhost/++skin++PageletTestSkin/@@loginForm.html?camefrom=first-url&camefrom=second-url')
>>> print(browser.contents)
<!DOCTYPE ...>
...
<div class="row">
<input class="form-element" type="submit" name="SUBMIT" value="Log in" />
</div>
<input type="hidden" name="camefrom" value="first-url">
</form>
</div>
</body>
</html>
>>> 'second-url' in browser.contents
False

0 comments on commit 3850d79

Please sign in to comment.