# HG changeset patch # User Thierry Florac # Date 1496323393 -7200 # Node ID 7dd73b88e345537ff43637e0bcc3d348e0087654 # Parent 6bf38b014089cfe464f5af1008b0840d123c6584 Version 0.1.4 diff -r 6bf38b014089 -r 7dd73b88e345 buildout.cfg --- a/buildout.cfg Thu Jun 01 15:18:11 2017 +0200 +++ b/buildout.cfg Thu Jun 01 15:23:13 2017 +0200 @@ -11,25 +11,37 @@ *.sourceforge.net github.com -versions = versions #extends = http://download.ztfy.org/webapp/ztfy.webapp.dev.cfg versions = versions newest = false #allow-picked-versions = false src = src -develop = . +develop = + . + ../ext/lingua + ../pyams_catalog + ../pyams_file + ../pyams_form + ../pyams_i18n + ../pyams_pagelet + ../pyams_skin + ../pyams_template + ../pyams_viewlet + ../pyams_zmi parts = package i18n pyflakes + sphinx test [package] recipe = zc.recipe.egg eggs = babel + BTrees chameleon docutils httplib2 @@ -43,16 +55,23 @@ z3c.form z3c.pt z3c.ptcompat + ZEO ZODB zope.annotation zope.component zope.container + zope.contentprovider zope.datetime zope.interface + zope.intid + zope.keyreference + zope.lifecycleevent zope.location + zope.publisher zope.schema zope.site zope.traversing +interpreter = py [i18n] recipe = zc.recipe.egg @@ -60,11 +79,6 @@ babel lingua -#packages = pyams_utils -#domain = pyams_utils -#output = src/pyams_utils/locales -#zcml = - [pyflakes] recipe = zc.recipe.egg eggs = pyflakes @@ -77,9 +91,19 @@ on_install = true cmds = ${buildout:develop}/bin/${pyflakes:scripts} +[sphinx] +recipe = collective.recipe.sphinxbuilder +eggs = + ${package:eggs} + pyams_form + pyams_zmi +source = ${buildout:directory}/docs/source +build = ${buildout:directory}/docs/build +interpreter = ${buildout:directory}/bin/py + [test] recipe = zc.recipe.testrunner eggs = pyams_utils [test] [versions] -pyams_utils = 0.1.3 +pyams_utils = 0.1.4 diff -r 6bf38b014089 -r 7dd73b88e345 docs/source/install.rst --- a/docs/source/install.rst Thu Jun 01 15:18:11 2017 +0200 +++ b/docs/source/install.rst Thu Jun 01 15:23:13 2017 +0200 @@ -6,19 +6,19 @@ PyAMS default installation is based on `Buildout `_ utility. It's not mandatory to use a virtual environment, but it allows you to have a better control over your Python resources. -Current PyAMS version is based and validated for Python 3.4; your Python environment must also include a C +Current PyAMS version is based and validated for Python 3.5; your Python environment must also include a C compiler as well as development headers for Python, *libjpeg*, *libpng*, *libfreetype*, *libxml2*, *libxslt* and eventually *libldap* or *libzmq*. PyAMS default components configuration also pre-suppose that the following external tools are available: -- a *memcached* server, to store sessions and cache (can be changed through Beaker configuration) +- a *Memcached* or *Redis* server, to store sessions and cache (can be changed through Beaker configuration) Optional tools also include: - an *ElasticSearch* server for full text indexing (see *PyAMS_content_es* package) -- a *WebSockets* server using async IO. This is used to manage notifications (see *PyAMS_notify* and *PyAMS_notify_ws* +- a *WebSockets* server using AsyncIO. This is used to manage notifications (see *PyAMS_notify* and *PyAMS_notify_ws* packages). An *out of the box* environment can be built using *pyams_asyncio* scaffold provided by *pyams_base* package. @@ -38,10 +38,10 @@ # mkdir /var/local/env/ # pip3 install virtualenv - # virtualenv --python=python3.4 pyams + # virtualenv --python=python3.5 pyams # cd pyams # . bin/activate - (pyams) # pip3.4 install zc.buildout + (pyams) # pip3.5 install zc.buildout (pyams) # buildout init Then update your Buildout configuration file *buildout.cfg* as follow: @@ -78,10 +78,11 @@ (pyams) # ./bin/buildout (pyams) # ./bin/pcreate -l Available scaffolds: - alchemy: Pyramid project using SQLAlchemy, SQLite, URL dispatch, and - pyams: Pyramid project using all PyAMS packages - starter: Pyramid starter project using URL dispatch and Chameleon - zodb: Pyramid project using ZODB, traversal, and Chameleon + alchemy: Pyramid project using SQLAlchemy, SQLite, URL dispatch, and + pyams: Pyramid project using all PyAMS packages + pyams_asyncio: Pyramid AsyncIO project using websockets for PyAMS notifications + starter: Pyramid starter project using URL dispatch and Chameleon + zodb: Pyramid project using ZODB, traversal, and Chameleon (pyams) # ./bin/pcreate -t pyams myapp (pyams) # cd myapp @@ -137,3 +138,60 @@ This process requires that every package is correctly included into *pyramid.includes* directive from selected configuration file. + + +Starting the application +------------------------ + +When database upgrade process has ended, you can start the web application process with the standard Pyramid's +*pserve* command line tool: + +.. code-block:: bash + + (pyams) # ./bin/pserve etc/development.ini + +In standard debug mode, all registered components are displayed in the console, until the final line (here using ZEO): + +.. code-block:: bash + + 2016-12-28 10:58:46,347 INFO [ZEO.ClientStorage][MainThread] [('localhost', 8100)] ClientStorage (pid=30133) created RW/normal for storage: 'pyams' + 2016-12-28 10:58:46,349 DEBUG [ZODB.blob][MainThread] (30133) Blob directory `/var/local/env/pyams/db/blobs` has layout marker set. Selected `bushy` layout. + 2016-12-28 10:58:46,349 WARNI [ZODB.blob][MainThread] (30133) Blob dir /var/local/env/pyams/db/blobs/ has insecure mode setting + 2016-12-28 10:58:46,349 INFO [ZEO.cache][MainThread] created temporary cache file 5 + 2016-12-28 10:58:46,373 BLATH [ZEO.zrpc][MainThread] (30133) CM.connect(): starting ConnectThread + 2016-12-28 10:58:46,374 BLATH [ZEO.zrpc][Connect([(, ('localhost', 8100))])] (30133) CT: attempting to connect on 1 sockets + 2016-12-28 10:58:46,380 BLATH [ZEO.zrpc][Connect([(, ('localhost', 8100))])] (30133) CW: attempt to connect to ('127.0.0.1', 8100) + 2016-12-28 10:58:46,380 BLATH [ZEO.zrpc][Connect([(, ('localhost', 8100))])] (30133) CW: connect_ex(('127.0.0.1', 8100)) returned EINPROGRESS + 2016-12-28 10:58:46,381 BLATH [ZEO.zrpc][Connect([(, ('localhost', 8100))])] (30133) CT: select() 0, 1, 0 + 2016-12-28 10:58:46,381 BLATH [ZEO.zrpc][Connect([(, ('localhost', 8100))])] (30133) CW: connect_ex(('127.0.0.1', 8100)) returned 0 + 2016-12-28 10:58:46,382 INFO [ZEO.ClientStorage][Connect([(, ('localhost', 8100))])] [('localhost', 8100)] Testing connection + 2016-12-28 10:58:46,383 INFO [ZEO.zrpc.Connection(b'C')][[('localhost', 8100)] zeo client networking thread] (127.0.0.1:8100) received handshake b'Z3101' + 2016-12-28 10:58:46,483 INFO [ZEO.ClientStorage][Connect([(, ('localhost', 8100))])] [('localhost', 8100)] Server authentication protocol None + 2016-12-28 10:58:46,484 INFO [ZEO.ClientStorage][Connect([(, ('localhost', 8100))])] [('localhost', 8100)] Connected to storage: ('localhost', 8100) + 2016-12-28 10:58:46,485 INFO [ZEO.ClientStorage][Connect([(, ('localhost', 8100))])] [('localhost', 8100)] No verification necessary -- empty cache + 2016-12-28 10:58:46,486 DEBUG [ZEO.ClientStorage][Connect([(, ('localhost', 8100))])] pickled inval None b'\x03\xbc>\x1a\x166f"' + 2016-12-28 10:58:46,488 BLATH [ZEO.zrpc][Connect([(, ('localhost', 8100))])] (30133) CM.connect_done(preferred=1) + 2016-12-28 10:58:46,489 BLATH [ZEO.zrpc][Connect([(, ('localhost', 8100))])] (30133) CT: exiting thread: Connect([(, ('localhost', 8100))]) + 2016-12-28 10:58:46,676 DEBUG [config][MainThread] include /var/local/env/pyams/eggs/pyams_template-0.1.0-py3.4.egg/pyams_template/configure.zcml + 2016-12-28 10:58:46,677 DEBUG [config][MainThread] include /var/local/env/pyams/eggs/pyramid_zcml-1.0.0-py3.4.egg/pyramid_zcml/configure.zcml + 2016-12-28 10:58:46,678 DEBUG [config][MainThread] include /var/local/env/pyams/eggs/pyramid_zcml-1.0.0-py3.4.egg/pyramid_zcml/meta.zcml + 2016-12-28 10:58:46,684 DEBUG [config][MainThread] include /var/local/env/pyams/eggs/pyams_template-0.1.0-py3.4.egg/pyams_template/meta.zcml + 2016-12-28 10:58:46,710 DEBUG [config][MainThread] include /var/local/env/pyams/eggs/pyams_viewlet-0.1.0-py3.4.egg/pyams_viewlet/configure.zcml + 2016-12-28 10:58:46,711 DEBUG [config][MainThread] include /var/local/env/pyams/eggs/pyramid_zcml-1.0.0-py3.4.egg/pyramid_zcml/configure.zcml + 2016-12-28 10:58:46,711 DEBUG [config][MainThread] include /var/local/env/pyams/eggs/pyramid_zcml-1.0.0-py3.4.egg/pyramid_zcml/meta.zcml + 2016-12-28 10:58:46,746 DEBUG [config][MainThread] include /var/local/env/pyams/eggs/zope.browserpage-4.1.0-py3.4.egg/zope/browserpage/meta.zcml + 2016-12-28 10:58:46,825 DEBUG [config][MainThread] include /var/local/env/pyams/eggs/pyams_template-0.1.0-py3.4.egg/pyams_template/meta.zcml + ... + 2016-12-28 11:02:01,354 DEBUG [PyAMS (utils)][MainThread] Registering adapter for (,) providing + 2016-12-28 11:02:01,370 DEBUG [PyAMS (utils)][MainThread] Registering utility named 'PyAMS content indexer' providing + 2016-12-28 11:02:01,383 DEBUG [PyAMS (pagelet)][MainThread] Registering pagelet view "test-indexer-process.html" for () + 2016-12-28 11:02:01,387 DEBUG [PyAMS (pagelet)][MainThread] Registering pagelet view "properties.html" for () + 2016-12-28 11:02:01,400 DEBUG [PyAMS (utils)][MainThread] Registering adapter for (, , ) providing + 2016-12-28 11:02:01,403 DEBUG [PyAMS (pagelet)][MainThread] Registering pagelet view "" for () + 2016-12-28 11:02:01,410 DEBUG [PyAMS (utils)][MainThread] Registering utility named 'PyAMS default skin' providing + 2016-12-28 11:02:01,411 DEBUG [PyAMS (utils)][MainThread] Registering adapter for (, , ) providing + Starting server in PID 30235. + serving on http://0.0.0.0:6543 + +From this point, you can launch a browser and open URL *http://127.0.0.1:6543/admin* to get access to PyAMS +management interface; default login is "admin/admin", that you may change as soon as possible... diff -r 6bf38b014089 -r 7dd73b88e345 setup.py --- a/setup.py Thu Jun 01 15:18:11 2017 +0200 +++ b/setup.py Thu Jun 01 15:23:13 2017 +0200 @@ -25,7 +25,7 @@ README = os.path.join(DOCS, 'README.txt') HISTORY = os.path.join(DOCS, 'HISTORY.txt') -version = '0.1.3' +version = '0.1.4' long_description = open(README).read() + '\n\n' + open(HISTORY).read() tests_require = [ @@ -62,6 +62,7 @@ 'setuptools', # -*- Extra requirements: -*- 'babel', + 'beaker', 'chameleon', 'docutils', 'httplib2', diff -r 6bf38b014089 -r 7dd73b88e345 src/pyams_utils.egg-info/PKG-INFO --- a/src/pyams_utils.egg-info/PKG-INFO Thu Jun 01 15:18:11 2017 +0200 +++ b/src/pyams_utils.egg-info/PKG-INFO Thu Jun 01 15:23:13 2017 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pyams-utils -Version: 0.1.3 +Version: 0.1.4 Summary: Utility functions and classes for PyAMS Home-page: http://www.ztfy.org Author: Thierry Florac @@ -12,24 +12,27 @@ .. contents:: + What is pyams_utils ? ===================== pyams_utils is a set of classes and functions which can be used to provide many small services and handle common operations in the context of a Pyramid application. - Internal sub-packages include : - - date : convert dates to unicode ISO format, parse ISO datetime, convert date to datetime - - request : get current request, get request annotations, get and set request data via annotations - - timezone : convert datetime to a given timezone ; provides a server default timezone utility - - traversing : get object parents until a given interface is implemented - - unicode : convert any text to unicode for easy storage - - protocol : utility functions and modules for several nerwork protocols - - catalog : TextIndexNG index for Zope catalog and hurry.query "Text" query item - - text : simple text operations and text to HTML conversion - - html : HTML parser and HTML to text converter - - file : file upload data converter - - tal : text and HTML conversions for use from within TAL + Internal sub-packages include: + - registry: local registry management tools + - adapter: custom adapters and annotations + - date: convert dates to unicode ISO format, parse ISO datetime, convert date to datetime + - request: get current request, get request annotations, get and set request data via annotations + - session: to store and get properties values from current session + - timezone: convert datetime to a given timezone ; provides a server default timezone utility + - traversing: custom traverser utility supporting namespaces + - unicode: convert any text to unicode for easy storage + - protocol: utility functions and modules for several nerwork protocols + - text: simple text operations and text to HTML conversion + - html: HTML parser and HTML to text converter + - file: file upload data converter + - tales: custom "extension:" TALES expression using adapters How to use pyams_utils ? @@ -37,10 +40,23 @@ A set of pyams_utils usages are given as doctests in pyams_utils/doctests/README.txt + You will also a whole set of documentations into the "docs" directory, available on + `ReadTheDocs `_ + Changelog ========= + 0.1.4 + ----- + - added "condition" optional argument to "get_parent" traversing helper to retrieve a parent only if given function + returns a "True" value when called with parent as argument + - added annotation for vocabulary registry + - added 'prefix' argument to 'request_property' and 'session_property' decorators + - handle POSError in 'query_utility' registry function + - updated unit tests + - updated documentation + 0.1.3 ----- - corrected XML-RPC client for Python 3 @@ -55,6 +71,10 @@ ----- - corrected cookies management in XML-RPC authenticated transport + 0.1.0 + ----- + - initial release + Keywords: Pyramid PyAMS utilities Platform: UNKNOWN Classifier: License :: OSI Approved :: Zope Public License diff -r 6bf38b014089 -r 7dd73b88e345 src/pyams_utils.egg-info/SOURCES.txt --- a/src/pyams_utils.egg-info/SOURCES.txt Thu Jun 01 15:18:11 2017 +0200 +++ b/src/pyams_utils.egg-info/SOURCES.txt Thu Jun 01 15:23:13 2017 +0200 @@ -1,7 +1,138 @@ MANIFEST.in setup.py docs/HISTORY.txt +docs/Makefile docs/README.txt +docs/make.bat +docs/build/Makefile +docs/build/make.bat +docs/build/doctrees/environment.pickle +docs/build/doctrees/index.doctree +docs/build/doctrees/install.doctree +docs/build/doctrees/modules.doctree +docs/build/doctrees/pyams_utils.doctree +docs/build/doctrees/pyams_utils.interfaces.doctree +docs/build/doctrees/pyams_utils.protocol.doctree +docs/build/doctrees/pyams_utils.scripts.doctree +docs/build/doctrees/pyams_utils.tests.doctree +docs/build/doctrees/pyams_utils.timezone.doctree +docs/build/doctrees/pyams_utils.widget.doctree +docs/build/doctrees/pyams_utils.zmi.doctree +docs/build/doctrees/site.doctree +docs/build/doctrees/tales.doctree +docs/build/doctrees/traverser.doctree +docs/build/doctrees/utilities.doctree +docs/build/doctrees/zca.doctree +docs/build/html/.buildinfo +docs/build/html/genindex.html +docs/build/html/index.html +docs/build/html/install.html +docs/build/html/modules.html +docs/build/html/objects.inv +docs/build/html/py-modindex.html +docs/build/html/pyams_utils.html +docs/build/html/pyams_utils.interfaces.html +docs/build/html/pyams_utils.protocol.html +docs/build/html/pyams_utils.scripts.html +docs/build/html/pyams_utils.tests.html +docs/build/html/pyams_utils.timezone.html +docs/build/html/pyams_utils.widget.html +docs/build/html/pyams_utils.zmi.html +docs/build/html/search.html +docs/build/html/searchindex.js +docs/build/html/searchindex.min.js +docs/build/html/site.html +docs/build/html/tales.html +docs/build/html/traverser.html +docs/build/html/utilities.html +docs/build/html/zca.html +docs/build/html/_images/zeo-add-form.png +docs/build/html/_images/zeo-add-menu.png +docs/build/html/_sources/index.txt +docs/build/html/_sources/install.txt +docs/build/html/_sources/modules.txt +docs/build/html/_sources/pyams_utils.interfaces.txt +docs/build/html/_sources/pyams_utils.protocol.txt +docs/build/html/_sources/pyams_utils.scripts.txt +docs/build/html/_sources/pyams_utils.tests.txt +docs/build/html/_sources/pyams_utils.timezone.txt +docs/build/html/_sources/pyams_utils.txt +docs/build/html/_sources/pyams_utils.widget.txt +docs/build/html/_sources/pyams_utils.zmi.txt +docs/build/html/_sources/site.txt +docs/build/html/_sources/tales.txt +docs/build/html/_sources/traverser.txt +docs/build/html/_sources/utilities.txt +docs/build/html/_sources/zca.txt +docs/build/html/_static/ajax-loader.gif +docs/build/html/_static/basic.css +docs/build/html/_static/basic.min.css +docs/build/html/_static/comment-bright.png +docs/build/html/_static/comment-close.png +docs/build/html/_static/comment.png +docs/build/html/_static/dialog-note.png +docs/build/html/_static/dialog-seealso.png +docs/build/html/_static/dialog-todo.png +docs/build/html/_static/dialog-topic.png +docs/build/html/_static/dialog-warning.png +docs/build/html/_static/doctools.js +docs/build/html/_static/doctools.min.js +docs/build/html/_static/down-pressed.png +docs/build/html/_static/down.png +docs/build/html/_static/epub.css +docs/build/html/_static/file.png +docs/build/html/_static/footerbg.png +docs/build/html/_static/headerbg.png +docs/build/html/_static/ie6.css +docs/build/html/_static/ie6.min.css +docs/build/html/_static/ie6.min.min.css +docs/build/html/_static/jquery-1.11.1.js +docs/build/html/_static/jquery-1.11.1.min.js +docs/build/html/_static/jquery-1.11.1.min.min.js +docs/build/html/_static/jquery.js +docs/build/html/_static/jquery.min.js +docs/build/html/_static/jquery.min.min.js +docs/build/html/_static/middlebg.png +docs/build/html/_static/minus.png +docs/build/html/_static/plus.png +docs/build/html/_static/pygments.css +docs/build/html/_static/pygments.min.css +docs/build/html/_static/pyramid.css +docs/build/html/_static/pyramid.min.css +docs/build/html/_static/searchtools.js +docs/build/html/_static/searchtools.min.js +docs/build/html/_static/transparent.gif +docs/build/html/_static/underscore-1.3.1.js +docs/build/html/_static/underscore-1.3.1.min.js +docs/build/html/_static/underscore.js +docs/build/html/_static/underscore.min.js +docs/build/html/_static/underscore.min.min.js +docs/build/html/_static/up-pressed.png +docs/build/html/_static/up.png +docs/build/html/_static/websupport.js +docs/build/html/_static/websupport.min.js +docs/build/html/_static/websupport.min.min.js +docs/build/html/_static/zeo-add-form.png +docs/build/html/_static/zeo-add-menu.png +docs/source/conf.py +docs/source/index.rst +docs/source/install.rst +docs/source/modules.rst +docs/source/pyams_utils.interfaces.rst +docs/source/pyams_utils.protocol.rst +docs/source/pyams_utils.rst +docs/source/pyams_utils.scripts.rst +docs/source/pyams_utils.tests.rst +docs/source/pyams_utils.timezone.rst +docs/source/pyams_utils.widget.rst +docs/source/pyams_utils.zmi.rst +docs/source/site.rst +docs/source/tales.rst +docs/source/traverser.rst +docs/source/utilities.rst +docs/source/zca.rst +docs/source/_static/zeo-add-form.png +docs/source/_static/zeo-add-menu.png src/pyams_utils/__init__.py src/pyams_utils/adapter.py src/pyams_utils/attr.py @@ -11,12 +142,16 @@ src/pyams_utils/data.py src/pyams_utils/date.py src/pyams_utils/decorator.py +src/pyams_utils/dict.py src/pyams_utils/encoding.py +src/pyams_utils/fanstatic.py src/pyams_utils/html.py src/pyams_utils/i18n.py src/pyams_utils/include.py src/pyams_utils/intids.py src/pyams_utils/list.py +src/pyams_utils/lock.py +src/pyams_utils/progress.py src/pyams_utils/property.py src/pyams_utils/registry.py src/pyams_utils/request.py @@ -29,6 +164,7 @@ src/pyams_utils/traversing.py src/pyams_utils/unicode.py src/pyams_utils/url.py +src/pyams_utils/vocabulary.py src/pyams_utils/wsgi.py src/pyams_utils/zodb.py src/pyams_utils.egg-info/PKG-INFO @@ -70,4 +206,5 @@ src/pyams_utils/zmi/__init__.py src/pyams_utils/zmi/intids.py src/pyams_utils/zmi/timezone.py -src/pyams_utils/zmi/zeo.py \ No newline at end of file +src/pyams_utils/zmi/zeo.py +src/pyams_utils/zmi/templates/connection-test.pt \ No newline at end of file diff -r 6bf38b014089 -r 7dd73b88e345 src/pyams_utils.egg-info/requires.txt --- a/src/pyams_utils.egg-info/requires.txt Thu Jun 01 15:18:11 2017 +0200 +++ b/src/pyams_utils.egg-info/requires.txt Thu Jun 01 15:23:13 2017 +0200 @@ -1,5 +1,6 @@ -setuptools +ZODB babel +beaker chameleon docutils httplib2 @@ -8,11 +9,11 @@ pyramid_zodbconn pysocks pytz +setuptools transaction z3c.form z3c.pt z3c.ptcompat -ZODB zope.annotation zope.component zope.container