Skip to content

Commit

Permalink
Merge branch 'prepare-1.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Oct 28, 2015
2 parents d05af46 + 5e70211 commit 3f8ca51
Show file tree
Hide file tree
Showing 13 changed files with 120 additions and 29 deletions.
18 changes: 16 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,25 @@ Changelog
This document describes changes between each past release.


1.7.0 (unreleased)
1.7.0 (2015-10-28)
==================

- Nothing changed yet.
- Upgraded to *Cliquet* 2.9.0
- Update cliquet-fxa configuration example for cliquet-fxa 1.4.0
- Improve the documentation to get started

**New features**

- Added Pyramid events, triggered when the content of a resource has changed. (#488)
- Added ``kinto.includes`` setting allowing loading of plugins once Kinto
is initialized (unlike ``pyramid.includes``). (#504)


**Protocol**

- Remove the broken git revision ``commit`` field in the hello page. (#495).

`Please read the full Cliquet 2.9.0 changelog for more information <https://github.com/mozilla-services/cliquet/releases/tag/2.9.0>`_

1.6.2 (2015-10-22)
==================
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ VENV := $(shell echo $${VIRTUAL_ENV-.venv})
PYTHON = $(VENV)/bin/python
DEV_STAMP = $(VENV)/.dev_env_installed.stamp
INSTALL_STAMP = $(VENV)/.install.stamp
TEMPDIR := $(shell mktemp -d)

.IGNORE: clean distclean maintainer-clean
.PHONY: all install virtualenv tests
Expand Down Expand Up @@ -34,6 +35,11 @@ virtualenv: $(PYTHON)
$(PYTHON):
virtualenv $(VENV)

build-requirements:
$(VIRTUALENV) $(TEMPDIR)
$(TEMPDIR)/bin/pip install -Ue .
$(TEMPDIR)/bin/pip freeze > requirements.txt

serve: install-dev migrate
$(VENV)/bin/pserve $(SERVER_CONFIG) --reload

Expand Down
2 changes: 1 addition & 1 deletion config/kinto.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ multiauth.policies = basicauth
#
# Firefox Accounts configuration.
# These are working FxA credentials for localhost:8888
# pyramid.includes = cliquet_fxa
# kinto.includes = cliquet_fxa
# fxa-oauth.client_id = 61c3f791f740c19a
# fxa-oauth.client_secret = b13739d8a905315314b09fb7b947aaeb62b47c6a4a5efb00c378fdecacd1e95e
# fxa-oauth.oauth_uri = https://oauth-stable.dev.lcip.org/v1
Expand Down
1 change: 0 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ pytest-cache
pytest-capturelog
pytest-cover
pytest-sugar
https://github.com/mozilla-services/cliquet/archive/master.zip
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
# built documents.
#
# The short X.Y version.
version = '1.6'
version = '1.7'
# The full version, including alpha/beta/rc tags.
release = '1.6.2'
release = '1.7.0'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/production.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ adjustments:
.. note::

For an exhaustive list of available settings and their default values,
refer to `the source code <https://github.com/mozilla-services/cliquet/blob/2.8.2/cliquet/__init__.py#L26-L83>`_.
refer to `the source code <https://github.com/mozilla-services/cliquet/blob/2.9.0/cliquet/__init__.py#L26-L86>`_.


By default, nobody can read buckets list. You can change that using:
Expand Down
73 changes: 73 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,76 @@ Troubleshooting
===============

*Coming soon* !

How to release
==============

In order to prepare a new release, we are following the following steps.

The `prerelease` and `postrelease` commands are coming from `zest.releaser
<https://pypi.python.org/pypi/zest.releaser>`_.

Install `zest.releaser` with the `recommended` dependencies. They contain
`wheel` and `twine`, which are required to release a new version.

.. code-block:: bash
$ pip install "zest.releaser[recommended]"
Step 1
------

- Merge remaining pull requests
- Update ``CHANGELOG.rst``
- Update version in ``docs/conf.py``
- Known good versions of dependencies in ``requirements.txt``
- Update ``CONTRIBUTORS.rst`` using: ``git shortlog -sne | awk '{$1=""; sub(" ", ""); print}' | awk -F'<' '!x[$1]++' | awk -F'<' '!x[$2]++' | sort``

.. code-block:: bash
$ git checkout -b prepare-X.Y.Z
$ prerelease
$ vim docs/conf.py
$ make build-requirements
$ git commit -a --amend
$ git push origin prepare-X.Y.Z
- Open a pull-request with to release the version.

Step 2
------

Once the pull-request is validated, merge it and do a release.
Use the ``release`` command to invoke the ``setup.py``, which builds and uploads to PyPI

.. code-block:: bash
$ git checkout master
$ git merge --no-ff prepare-X.Y.Z
$ release
$ postrelease
Step 3
------

As a final step:

- Close the milestone in Github
- Create next milestone in Github in the case of a major release
- Add entry in Github release page
- Configure the version in ReadTheDocs
- Send mail to ML (If major release)

That's all folks!


Cleaning your environment
=========================

There are three levels of cleaning your environment:

- ``make clean`` will remove ``*.pyc`` files and ``__pycache__`` directory.
- ``make distclean`` will also remove ``*.egg-info`` files and ``*.egg``,
``build`` and ``dist`` directories.
- ``make maintainer-clean`` will also remove the ``.tox`` and the
``.venv`` directories.
10 changes: 5 additions & 5 deletions kinto/views/buckets.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Bucket(resource.ProtectedResource):

def __init__(self, *args, **kwargs):
super(Bucket, self).__init__(*args, **kwargs)
self.collection.id_generator = NameGenerator()
self.model.id_generator = NameGenerator()

def get_parent_id(self, request):
# Buckets are not isolated by user, unlike Cliquet resources.
Expand All @@ -33,7 +33,7 @@ def delete(self):
result = super(Bucket, self).delete()

# Delete groups.
storage = self.collection.storage
storage = self.model.storage
parent_id = '/buckets/%s' % self.record_id
storage.delete_all(collection_id='group',
parent_id=parent_id,
Expand All @@ -49,7 +49,7 @@ def delete(self):
parent_id=parent_id)

# Delete records.
id_field = self.collection.id_field
id_field = self.model.id_field
for collection in deleted:
parent_id = '/buckets/%s/collections/%s' % (self.record_id,
collection[id_field])
Expand Down Expand Up @@ -79,7 +79,7 @@ def create_bucket(request, bucket_id):
context.get_permission_object_id = lambda r, i: '/buckets/%s' % bucket_id
resource = Bucket(request, context)
try:
bucket = resource.collection.create_record({'id': bucket_id})
bucket = resource.model.create_record({'id': bucket_id})
except storage_exceptions.UnicityError as e:
bucket = e.record
finally:
Expand Down Expand Up @@ -116,7 +116,7 @@ def create_collection(request, bucket_id):
**request.matchdict)
resource = Collection(request, context)
try:
collection = resource.collection.create_record({'id': collection_id})
collection = resource.model.create_record({'id': collection_id})
except storage_exceptions.UnicityError as e:
collection = e.record
finally:
Expand Down
6 changes: 3 additions & 3 deletions kinto/views/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Collection(resource.ProtectedResource):

def __init__(self, *args, **kwargs):
super(Collection, self).__init__(*args, **kwargs)
self.collection.id_generator = NameGenerator()
self.model.id_generator = NameGenerator()

def get_parent_id(self, request):
bucket_id = request.matchdict['bucket_id']
Expand All @@ -54,8 +54,8 @@ def delete(self):
result = super(Collection, self).delete()

# Delete records.
storage = self.collection.storage
parent_id = '%s/collections/%s' % (self.collection.parent_id,
storage = self.model.storage
parent_id = '%s/collections/%s' % (self.model.parent_id,
self.record_id)
storage.delete_all(collection_id='record',
parent_id=parent_id,
Expand Down
6 changes: 3 additions & 3 deletions kinto/views/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Group(resource.ProtectedResource):

def __init__(self, *args, **kwargs):
super(Group, self).__init__(*args, **kwargs)
self.collection.id_generator = NameGenerator()
self.model.id_generator = NameGenerator()

def get_parent_id(self, request):
bucket_id = request.matchdict['bucket_id']
Expand All @@ -29,12 +29,12 @@ def get_parent_id(self, request):

def collection_delete(self):
filters = self._extract_filters()
groups, _ = self.collection.get_records(filters=filters)
groups, _ = self.model.get_records(filters=filters)
body = super(Group, self).collection_delete()
permission = self.request.registry.permission
for group in groups:
group_id = self.context.get_permission_object_id(
self.request, group[self.collection.id_field])
self.request, group[self.model.id_field])
# Remove the group's principal from all members of the group.
for member in group['members']:
permission.remove_user_principal(
Expand Down
2 changes: 1 addition & 1 deletion kinto/views/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def process_record(self, new, old=None):
if not schema or not asbool(settings.get(schema_validation)):
return new

collection_timestamp = self._collection[self.collection.modified_field]
collection_timestamp = self._collection[self.model.modified_field]

try:
jsonschema.validate(new, schema)
Expand Down
5 changes: 2 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
cliquet==2.8.2
cliquet==2.9.0
colander==1.0
cornice==1.1.0
dealer==2.0.4
functools32==3.2.3.post2
iso8601==0.1.10
jsonschema==2.5.1
Expand All @@ -12,7 +11,7 @@ python-dateutil==2.4.2
redis==2.10.3
repoze.lru==0.6
requests==2.8.1
simplejson==3.8.0
simplejson==3.8.1
six==1.10.0
structlog==15.3.0
translationstring==1.3
Expand Down
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ def read_file(filename):
CONTRIBUTORS = read_file('CONTRIBUTORS.rst')

REQUIREMENTS = [
'waitress',
'cliquet',
'jsonschema',
'waitress>=0.8,<0.9',
'cliquet>=2.9,<2.10',
'jsonschema>=2.5,<2.6',
]

POSTGRESQL_REQUIREMENTS = REQUIREMENTS + [
'cliquet[postgresql]'
'cliquet[postgresql]>=2.9,<2.10'
]

MONITORING_REQUIREMENTS = REQUIREMENTS + [
'cliquet[monitoring]'
'cliquet[monitoring]>=2.9,<2.10'
]

FXA_REQUIREMENTS = REQUIREMENTS + [
'cliquet-fxa'
'cliquet-fxa>=1.4,<1.5'
]

ENTRY_POINTS = {
Expand All @@ -42,7 +42,7 @@ def read_file(filename):
]

setup(name='kinto',
version='1.7.0.dev0',
version='1.7.0',
description='Kinto Web Service - Store, Sync, Share, and Self-Host.',
long_description=README + "\n\n" + CHANGELOG + "\n\n" + CONTRIBUTORS,
license='Apache License (2.0)',
Expand Down

0 comments on commit 3f8ca51

Please sign in to comment.