Skip to content

Commit

Permalink
Merge remote-tracking branch 'Kotti/testing' into stable
Browse files Browse the repository at this point in the history
* Kotti/testing: (81 commits)
  Untrack prepare-release script.
  Prepare release.
  Add Swedish translations
  Use ``pytest-virtualenv`` and ``pytest-warnings``. Adjust the scaffold tests accordingly.
  Add Swedish translations
  Try to get the scaffold test pass.
  Upgrade dependencies and testing (#510)
  Also pin in requirements.
  Fix wrong version number.
  Require ``py>=1.4.29`` to fix Travis problem.
  Upgrade to ``repoze.workflow==1.0b``.  Also remove indirect requirements in ``setup.py``.
  Upgrade tests to ``zope.testbrowser>=5.0.0``.  Move ``pytest`` config from ``setup.cfg`` to new ``pytest.ini``.  Rename ``kotti.testing.TestingRootFactory`` to   ``kotti.testing.RootFactory``.
  Add ``LocalGroup.__repr__``.
  Try to fix travis.
  Fix wron version in requirements.
  Pin "colander<1.3" until Pylons/colander#272 is merged and released.
  Use latest FormEncode and html2text.
  Upgrade all requirements to their latest version, except ``colander``.  This change breaks Kotti's user management views: Pylons/colander#212.
  Check against type_info.selectable_default_views before setting default view. (#506)
  Upgrade requirements.
  ...
  • Loading branch information
disko committed Oct 10, 2016
2 parents 1dfe0b4 + 06d2f47 commit cce9734
Show file tree
Hide file tree
Showing 154 changed files with 7,708 additions and 5,647 deletions.
2 changes: 2 additions & 0 deletions .checkignore
@@ -0,0 +1,2 @@
kotti/testing.py
kotti/tests/*
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -26,3 +26,5 @@ bower_components
node_modules
__pycache__

filestore
share
16 changes: 10 additions & 6 deletions .travis.yml
@@ -1,25 +1,29 @@
language: python
sudo: false
cache:
directories:
- $HOME/.cache/pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
python:
- "2.6"
- "2.7"
# - "2.6"
env:
- KOTTI_TEST_DB_STRING=postgresql://postgres@localhost:5432/kotti_testing
- KOTTI_TEST_DB_STRING=mysql+oursql://root@localhost:3306/kotti_testing
- KOTTI_TEST_DB_STRING=sqlite://
install:
- travis_retry pip install "pip==1.3.1" # fix issue with fanstatic==1.0a
- travis_retry pip install "setuptools>=17.1" # fix issue with mock==1.3.0
- travis_retry pip install -e . -r requirements.txt --use-mirrors
- travis_retry pip install -U pip wheel setuptools
- travis_retry pip install psycopg2 oursql python-coveralls codecov
- travis_retry pip install -e . -r requirements.txt
- pip uninstall -y Kotti
- python setup.py develop
- python setup.py dev
- travis_retry pip install psycopg2 oursql python-coveralls codecov
before_script:
- psql -c 'create database kotti_testing;' -U postgres
- mysql -e 'create database kotti_testing;'
script:
- py.test --runslow --tb=native --cov=kotti --cov-report=term-missing
- py.test -rw --runslow --tb=native --cov=kotti --cov-report=term-missing
after_success:
- coveralls
- codecov
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS.txt
@@ -1,7 +1,7 @@
Authors
=======

Kotti was created by Daniel Nouri.
Kotti was created by Daniel Nouri and is currently maintained by Andreas Kaiser.

Major contributing authors include:

Expand Down
128 changes: 128 additions & 0 deletions CHANGES.txt
@@ -1,6 +1,134 @@
Change History
==============

1.3.0 - 2016-10-10
------------------

Breaking Changes
~~~~~~~~~~~~~~~~

- Upgrade to ``repoze.workflow==1.0b``. **If your application has a custom
``workflow.zcml``, it needs a little modification: ``state`` and
``transition`` titles are no longer ``key`` nodes, but attributes on the
respective ``state`` or ``transition`` nodes. See Kotti's ``workflow.zcml``
for an example.**

Features and Fixes
~~~~~~~~~~~~~~~~~~

- Add a fallback in ``contents.pt`` when ``creation_date`` or
``modification_date`` is ``None``.

- Transform workflow state title to TranslationStrings without eval and
deprecate it.

- Replace some Python 2 only code with equivalents that also support Python 3.

- Use generic SQLAlchemy type Text as base type for JsonType. This allows
SQLAlchemy to map Text type to the most suitable type available on given
database system. Previously used TEXT type is not available in Oracle
database. In case of existing installation of Kotti with database system,
for which SQLAlchemy maps generic Text type to type different than TEXT it's
necessary to either convert existing columns "nodes._acl" and
"nodes.annotations" to that type or configure SQLAlchemy to map generic Text
type to existing type of these two columns. For example of how to do this
please see http://stackoverflow.com/a/36506666/95735. For all database
systems for which SQLAlchemy provides dialects except Oracle (Firebird,
Microsoft SQL Server, MySQL, Postgres, SQLite, Sybase) there's no need to
do anything.

- We use PEP 440 normalized form for the project's version thus current
"1.3.0-alpha.5-dev" became "1.3.0a5.dev0".

- Upgrade tests to ``zope.testbrowser>=5.0.0``. This removes the ``mechanize``
and ``wsgi_intercept`` dependencies and thus the last blocker for Python 3
compatibility.

- Move ``pytest`` config from ``setup.cfg`` to new ``pytest.ini``. This
prevents a deprecation warning with ``pytest>=3.0``.

- Rename ``kotti.testing.TestingRootFactory`` to
``kotti.testing.RootFactory`` to prevent another deprecation warning with
``pytest>=3.0``.

1.3.0-alpha.4 - 2015-01-15
--------------------------

**This is a alpha release. Blindly upgrading your production environments will
make the universe collapse!**


- Add a ``kotti.depot_replace_wsgi_file_wrapper`` option to replace the WSGI
file wrapper with ``pyramid.response.FileIter`` for problematic environments.

1.3.0-alpha.3 - 2016-01-11
--------------------------

**This is a alpha release. Blindly upgrading your production environments will
make the universe collapse!**


- Bugfix: don't try to get api.root via the lineage if not in a location aware
context (for example 404 view). Return the site root instead.

1.3.0-alpha.2 - 2016-01-05
--------------------------

**This is a alpha release. Blindly upgrading your production environments will
make the universe collapse!**

- Add a custom traverser, which gets all nodes in a single DB query. For deeply
nested trees this results in drastic performance improvements. See
https://kotti.readthedocs.io/en/master/api/kotti.traversal.html for details.

- Bugfix: copy and paste of file nodes wouldn't create a new depot file, but
instead lead to multiple references to a single file which would cause
undesired results when one of them was deleted later.

- Bugfix: local 'role:owner' was not set when a new node was created by copy
and paste.

- Bugfix: kotti.events._update_children_paths could fail under unclear
conditions (at least under Python 2.6 with SQLite).

- Get rid of more browser doctests (converted to webtest).

1.3.0-alpha.1 - 2015-12-22
--------------------------

**This is a alpha release. Blindly upgrading your production environments will
make the universe collapse!**

- Completely revised ``Depot`` integration. See
https://kotti.readthedocs.io/en/latest/developing/advanced/blobs.html
for details.

- Make ``kotti.resources.SaveDataMixin`` more versatile in that it now supports
a ``data_filters`` attribute (or even a completely overridden ``data``
attribute) on subclasses. For an example for what this is useful, see the
new ``kotti_image`` package's readme and the Depot documentation
(https://depot.readthedocs.io/en/latest/database.html#custom-behaviour-in-attachments).

**These changes require a database migration.**

A migration script is included, which can be executed by running
``kotti-migrate <your.ini> upgrade_all``. However, this script will fail if
you subclassed from ``kotti.resources.Image`` in your application. It also
doesn't cover custom classes inherited from ``kotti.resources.File`` (other
than Kotti's ``Image``). Migration of those can be performed easily, by
copying the code from the included migration step to your package's migration
environment and adjust it to your needs.

- Move all image related code to the new ``kotti_image`` add on package.
All classes and functions are imported into their former place, so that code
that imports from there will still be working.

- Fix broken upload type selector.

- Create RFC6266 compliant content disposition headers for non-ASCII filenames.

- Add request.uploaded_file_response method.

1.2.4 - 2015-11-26
------------------

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTORS.txt
Expand Up @@ -12,7 +12,7 @@ below, and b) the resulting document is accepted into the canonical
version control repository.

Treatment of Account
---------------------
--------------------

Contributor will not allow anyone other than the Contributor to use
his or her username or source repository login to submit code to a
Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
@@ -1,2 +1,2 @@
Copyright (c) 2010-2015 Daniel Nouri and Contributors.
Copyright (c) 2010-2016 Daniel Nouri and Contributors.
All Rights Reserved
34 changes: 27 additions & 7 deletions MANIFEST.in
@@ -1,7 +1,27 @@
recursive-include kotti/alembic *
recursive-include kotti/locale *
recursive-include kotti/scaffolds *
recursive-include kotti/static *
recursive-include kotti/templates *
recursive-include kotti/tests *
recursive-include kotti *.zcml
include *.rst
include *.txt
include Dockerfile
include app.ini
include development.ini
include pytest.ini
include tox.ini
include .coveragerc

exclude .checkignore
exclude Makefile
exclude i18n.sh
recursive-exclude * *.pyc
recursive-exclude * __pycache__
recursive-exclude * ._DS_Store
recursive-exclude website *

recursive-include kotti *

include docs/Makefile
include docs/_static/README
recursive-include docs *.rst
recursive-include docs *.py
recursive-include docs *.svg
recursive-include docs *.txt
prune docs/_build

11 changes: 8 additions & 3 deletions README.rst
Expand Up @@ -80,12 +80,12 @@ Install

See `installation instructions`_.

.. _installation instructions: http://kotti.readthedocs.org/en/latest/first_steps/installation.html
.. _installation instructions: https://kotti.readthedocs.io/en/latest/first_steps/installation.html

Support and Documentation
=========================

Read Kotti's extensive `documentation <http://kotti.readthedocs.org/>`_ on `Read the Docs <https://readthedocs.org/>`_.
Read Kotti's extensive `documentation <https://kotti.readthedocs.io/>`_ on `Read the Docs <https://readthedocs.org/>`_.

If you have questions or need help, you can post on our `mailing list / forum <http://groups.google.com/group/kotti>`_ or join us on IRC: `#kotti on irc.freenode.net <irc://irc.freenode.net/#kotti>`_.

Expand All @@ -99,6 +99,9 @@ Development
|codacy|_
|codeclimate|_
|quantifiedcode|_
|landscape|_



.. requirements need to be upgraded before we shoff off
|requires.io|_
Expand Down Expand Up @@ -138,6 +141,8 @@ Contributions are always welcome, read our `contribution guidelines`_ and visit
.. |quantifiedcode| image:: http://www.quantifiedcode.com/api/v1/project/f2a648c15f8e42788aaa4fa12a82df93/badge.svg
.. _quantifiedcode: http://www.quantifiedcode.com/app/project/f2a648c15f8e42788aaa4fa12a82df93

.. |landscape| image:: https://landscape.io/github/Kotti/Kotti/master/landscape.svg?style=flat-square
.. _landscape: https://landscape.io/github/Kotti/Kotti

.. _contribution guidelines: http://kotti.readthedocs.org/en/latest/contributing.html
.. _contribution guidelines: https://kotti.readthedocs.io/en/latest/contributing.html
.. _Github repository: https://github.com/Kotti/Kotti
10 changes: 7 additions & 3 deletions development.ini
Expand Up @@ -18,6 +18,10 @@ kotti.configurators = kotti_tinymce.kotti_configure
kotti.site_title = My Kotti site
kotti.secret = qwerty

#kotti.depot.0.name = localfs
#kotti.depot.0.backend = depot.io.local.LocalFileStorage
#kotti.depot.0.storage_path = %(here)s/filestore

[filter:fanstatic]
use = egg:fanstatic#fanstatic

Expand Down Expand Up @@ -50,12 +54,12 @@ handlers = console

[logger_kotti]
level = DEBUG
handlers =
handlers = console
qualname = kotti

[logger_sqlalchemy]
level = INFO
handlers =
level = WARN
handlers = console
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
Expand Down

0 comments on commit cce9734

Please sign in to comment.