Hashing of string object doesn't work. Also added a deprecation warning
that pillar.api.utils.gravatar should be used; pillar.web.utils.gravatar
is just a copy.
Switched from Sybren's RSA library to the new stdlib module 'secrets' to
generate secret tokens. This also means that the rsa library was demoted
to secondary requirement.
These changes mostly revolve around the change in ObjectId constructor
when running on Python 3.6. Where on 2.7 the constructor would accept
12- and 24-byte strings, now only 12-byte bytes and 24-character strings
are accepted. Good thing, but required some changes in our code.
Other changes include hashing of strings, which isn't supported, so they
are converted to bytes first, and sometimes converted back afterwards.
Python 3 supports 'namespace packages', and thus can see a directory
without __init__.py as something importable. This caused a name conflict,
since there were both the file static.py and the dir static.
The 'manual fixups' are:
- incorrect use of dict.items() where dict.iteritems() was meant; this
results in list(dict.items()), which I changed to dict.items().
- removal of 'from __future__ import' lines, which 2to3 changes into
empty lines; I removed the empty lines.
Hashing of string object doesn't work. Also added a deprecation warning
that pillar.api.utils.gravatar should be used; pillar.web.utils.gravatar
is just a copy.
Switched from Sybren's RSA library to the new stdlib module 'secrets' to
generate secret tokens. This also means that the rsa library was demoted
to secondary requirement.
These changes mostly revolve around the change in ObjectId constructor
when running on Python 3.6. Where on 2.7 the constructor would accept
12- and 24-byte strings, now only 12-byte bytes and 24-character strings
are accepted. Good thing, but required some changes in our code.
Other changes include hashing of strings, which isn't supported, so they
are converted to bytes first, and sometimes converted back afterwards.
Python 3 supports 'namespace packages', and thus can see a directory
without __init__.py as something importable. This caused a name conflict,
since there were both the file static.py and the dir static.
The 'manual fixups' are:
- incorrect use of dict.items() where dict.iteritems() was meant; this
results in list(dict.items()), which I changed to dict.items().
- removal of 'from __future__ import' lines, which 2to3 changes into
empty lines; I removed the empty lines.
We introduce two new classes StorageBackend and FileInStorage, which
are subclassed by CGS and local Pillar. This makes supporting multiple
storage solutions easier.
It was used in an experiment in Flamenco as an alternative to JSON; it
might still be used in the future if BSON turns out to be significantly
faster to generate.
Instead of Pillar automagically prepending 'attract.' or 'flamenco.' to the
names this should now be done explicitly in the extension's Eve settings.
This allows for more explicit configuration, and ensures foreign key
definitions are unambiguous.
Now we can access pages with the following url
/p/<project_url>/<page-url>. Internally we use the existing view_node,
but if we detect that the node_id is not an object id we try to treat
it as a page url and therefore we try to define node and project using
render_node_page().
This way we clean up the output of manage.py and sort the commands in
three main categories:
- setup: Setup utilities, like setup_db() or create_blog()
- maintenance: Maintenance scripts, to update user groups
- operations: Backend operations, like moving nodes across projects