Skip to content

Commit

Permalink
Merge branch 'release/1.3.1' into testing
Browse files Browse the repository at this point in the history
  • Loading branch information
disko committed Jan 17, 2018
2 parents 06d2f47 + cbff4e5 commit e39431f
Show file tree
Hide file tree
Showing 111 changed files with 2,500 additions and 1,230 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -28,3 +28,5 @@ __pycache__

filestore
share
.eggs
.python-version
33 changes: 33 additions & 0 deletions CHANGES.txt
@@ -1,6 +1,39 @@
Change History
==============

1.3.1 - 2018-01-17
------------------

- When rendering slot views, use ``request.blank()`` to create the request.
This is the proper behaviour, in tune with customizing
``kotti.request_factory``. Also added ``blank()`` method to
``kotti.testing.DummyRequest``.

- When authenticated, show workflow state in the edit bar. Before it was
shown only if the 'edit' permission was available.

- Optimize the File edit form: don't load initial file data to session data
and don't rewrite the file data after saving the form if that data has not
been changed through the edit form.

- Bugfix: when showing addable content in the menu, check if the factory has
a defined add_view. This avoids a hard crash with, for example, a content
type derived from Content that has no add_view defined.

- Added ``nav-bar`` slot to ``edit/master.pt``, ``edit-bar`` and ``nav-bar``
slots to ``view/master.pt``

- Bugfix: Simplify 404 page, no longer crash when authenticated

- Change: simplify `kotti.util.LinkBase.selected()`: use request.view_name
instead of deriving the view name from request.url. Also, consider the View
editor bar entry as selected even when the url doesn't end with a slash '/'

- Feature: add Czech translation.

- remove pytest-warnings from test dependencies (already integrated in
modern pytest versions)

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

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Expand Up @@ -105,3 +105,4 @@ Contributors
- Davide Moro, 2015/04/02
- Matt Russell, 2015/09/27
- Sebastian Braß, 2015/10/28
- Lukas Zdych, 2016/12/01
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
@@ -1,2 +1,2 @@
Copyright (c) 2010-2016 Daniel Nouri and Contributors.
Copyright (c) 2010-2017 Daniel Nouri and Contributors.
All Rights Reserved
11 changes: 5 additions & 6 deletions Makefile
Expand Up @@ -6,18 +6,17 @@ test: bin/py.test
bin/py.test -q -n4

bin/py.test: .pip.log *.py *.cfg
bin/python setup.py dev
bin/pip install -e ".[testing]"
@touch $@

.pip.log: bin/python requirements.txt
bin/pip install -r requirements.txt --log .pip.log
.pip.log: bin/python
bin/pip install -e ".[development]" --log .pip.log

bin/python:
virtualenv-$(version) --no-site-packages --distribute .
virtualenv-$(version) .
@touch $@

clean:
@rm -rfv bin/ include/ lib/
@rm -rfv bin/ include/ lib/ share/ .Python .cache .eggs Kotti.db Kotti.egg-info tox

.PHONY: test clean

4 changes: 3 additions & 1 deletion docs/developing/basic/deployment.rst
Expand Up @@ -94,7 +94,9 @@ Create an ini file in ``/home/kotti/kotti.ini``::
socket = /home/kotti/<your_domain>.sock
master = true
chmod-socket = 666
processes = 1
processes = 2
lazy = true # needed if want processes > 1
lazy-apps = true

Install Supervisor::

Expand Down
2 changes: 1 addition & 1 deletion docs/first_steps/overview.rst
Expand Up @@ -85,7 +85,7 @@ Support


.. _repoze.workflow: http://docs.repoze.org/workflow/
.. _Chameleon: http://chameleon.repoze.org/
.. _Chameleon: https://chameleon.readthedocs.io/
.. _Colander: http://docs.pylonsproject.org/projects/colander/en/latest/
.. _continuous testing: http://travis-ci.org/Kotti/Kotti
.. _Deform: http://docs.pylonsproject.org/projects/deform/en/latest/
Expand Down
5 changes: 4 additions & 1 deletion kotti/__init__.py
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function

import pkg_resources
from pyramid.authentication import AuthTktAuthenticationPolicy
from pyramid.authorization import ACLAuthorizationPolicy
Expand All @@ -7,7 +9,8 @@
from pyramid.threadlocal import get_current_registry
from pyramid.util import DottedNameResolver
from pyramid_beaker import session_factory_from_settings
from six import binary_type, string_types
from six import binary_type
from six import string_types
from sqlalchemy import MetaData
from sqlalchemy import engine_from_config
from sqlalchemy.ext.declarative import declarative_base
Expand Down
5 changes: 4 additions & 1 deletion kotti/alembic/env.py
@@ -1,7 +1,10 @@
# -*- coding: utf-8 -*-
from alembic import context
from __future__ import absolute_import, division, print_function

import traceback

import transaction
from alembic import context
from zope.sqlalchemy import mark_changed

from kotti import DBSession
Expand Down
12 changes: 8 additions & 4 deletions kotti/events.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""This module includes a simple events system that allows users to
subscribe to specific events, and more particularly to *object events*
of specific object types.
Expand All @@ -12,16 +13,19 @@
"""

from __future__ import absolute_import, division, print_function

from collections import defaultdict
from datetime import datetime

try: # pragma: no cover
from collections import OrderedDict
except ImportError: # pragma: no cover
from ordereddict import OrderedDict

import sqlalchemy.event
from sqlalchemy.orm import load_only
import venusian
from sqlalchemy.orm import load_only
from sqlalchemy.orm import mapper
from sqlalchemy_utils.functions import has_changes
from pyramid.location import lineage
Expand Down Expand Up @@ -431,22 +435,22 @@ class subscribe(object):
@subscribe()
def on_all_events(event):
# this will be executed on *every* event
print "Some kind of event occured"
print("Some kind of event occured")
@subscribe(ObjectInsert)
def on_insert(event):
# this will be executed on every object insert
context = event.object
request = event.request
print "Object insert"
print("Object insert")
@subscribe(ObjectInsert, Document)
def on_document_insert(event):
# this will only be executed on object inserts if the object is
# is an instance of Document
context = event.object
request = event.request
print "Document insert"
print("Document insert")
"""

Expand Down
6 changes: 3 additions & 3 deletions kotti/fanstatic.py
@@ -1,15 +1,15 @@
# -*- coding: utf-8 -*-

from __future__ import absolute_import
from __future__ import absolute_import, division, print_function

from fanstatic import Group
from fanstatic import Library
from fanstatic import Resource
from js.angular import angular
from js.bootstrap import bootstrap_js
from js.bootstrap import bootstrap_css
from js.html5shiv import html5shiv
from js.bootstrap import bootstrap_js
from js.fineuploader import fineuploader
from js.html5shiv import html5shiv
from js.jquery import jquery
from js.jquery_form import jquery_form
from js.jquery_tablednd import jquery_tablednd
Expand Down
11 changes: 7 additions & 4 deletions kotti/filedepot.py
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function

import logging
import mimetypes
import uuid
Expand All @@ -11,25 +13,26 @@
from pyramid import tweens
from pyramid.httpexceptions import HTTPMovedPermanently
from pyramid.httpexceptions import HTTPNotFound
from pyramid.response import _BLOCK_SIZE
from pyramid.response import FileIter
from pyramid.response import Response
from pyramid.response import _BLOCK_SIZE
from sqlalchemy import Column
from sqlalchemy import DateTime
from sqlalchemy import event
from sqlalchemy import Integer
from sqlalchemy import LargeBinary
from sqlalchemy import String
from sqlalchemy import Unicode
from sqlalchemy import event
from sqlalchemy.orm import deferred
from unidecode import unidecode

from kotti import Base, get_settings
from kotti import Base
from kotti import get_settings
from kotti import DBSession
from kotti.util import _to_fieldstorage
from kotti.util import camel_case_to_name
from kotti.util import command
from kotti.util import extract_from_settings
from kotti.util import _to_fieldstorage

_marker = object()

Expand Down
5 changes: 2 additions & 3 deletions kotti/interfaces.py
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
"""
"""
from __future__ import absolute_import, division, print_function

from zope.interface import Interface
from pyramid.interfaces import ILocation
from zope.interface import Interface


class INode(ILocation):
Expand Down

0 comments on commit e39431f

Please sign in to comment.