flake8-ok-files.txt
author Denis Laxalde <denis.laxalde@logilab.fr>
Thu, 09 Mar 2017 16:36:33 +0100
changeset 12053 c3c9f2e1424c
parent 12050 1c7be7b62823
child 12056 f223f98e3b14
permissions -rw-r--r--
[pyramid] Add a "pyramid" instance configuration type In a new module 'cubicweb.pyramid.config' we define a "pyramid" instance configuration type. The noticeable feature of this configuration is that it manages a 'development.ini' file that gets installed in application home (along with `.conf` file). This file is templated and includes generated values for secrets of session and authtk tokens. This means that we can just call: pserve etc/cubicweb.d/<appname>/development.ini or gunicorn --paste etc/cubicweb.d/<appname>/development.ini -b :8080 just after instance creation to get a pyramid instance running without having to hack around a 'pyramid.ini' file. This patch drops 'development.ini' from skeleton and moves it in cubicweb/pyramid so that it gets installed at instance creation which is more appropriate than in cube creation. The new configuration class sets "cubicweb.bwcompat" setting to false so it is not intended to replace the "all-in-one" configuration type (which would require a bit more work). This configuration is close to the the 'repository' configuration type with just a couple of options from WebConfiguration that are needed for Pyramid (anonymous user/password plus some miscellaneous options that I'm not so sure are really needed). Note, in particular, that we do not pull CORS settings to be injected as a WSGI middleware like in wsgi_application_from_cwconfig() since I believe this should be left as an end-user responsibility and since this can be defined in a standard way in paste configuration. This configuration inherits from ServerConfiguration but registers the same appobjects as WebConfiguration. In cubicweb.web.request._CubicWebRequestBase, we guard against access to "uiprops" and "datadir_url" of the config because this new "pyramid" config does not have these (this does not make sense without bwcompat mode). At some point, we should either avoid using `cw_request`'s pyramid request attribute or make cubicweb's web request really independant of existing implementation and drop these assumptions.

cubicweb/__init__.py
cubicweb/__main__.py
cubicweb/dataimport/csv.py
cubicweb/dataimport/importer.py
cubicweb/dataimport/massive_store.py
cubicweb/dataimport/stores.py
cubicweb/dataimport/test/data-massimport/schema.py
cubicweb/dataimport/test/data/schema.py
cubicweb/dataimport/test/test_csv.py
cubicweb/dataimport/test/test_pgstore.py
cubicweb/dataimport/test/test_massive_store.py
cubicweb/dataimport/test/test_stores.py
cubicweb/dataimport/test/unittest_importer.py
cubicweb/devtools/test/data/cubes/i18ntestcube/__init__.py
cubicweb/devtools/test/data/cubes/__init__.py
cubicweb/devtools/test/data/schema.py
cubicweb/devtools/testlib.py
cubicweb/devtools/test/unittest_devctl.py
cubicweb/devtools/test/unittest_i18n.py
cubicweb/devtools/test/unittest_webtest.py
cubicweb/devtools/webtest.py
cubicweb/entities/adapters.py
cubicweb/entities/authobjs.py
cubicweb/entities/test/unittest_base.py
cubicweb/etwist/__init__.py
cubicweb/etwist/request.py
cubicweb/etwist/service.py
cubicweb/ext/__init__.py
cubicweb/hooks/test/data/hooks.py
cubicweb/hooks/test/unittest_notificationhooks.py
cubicweb/hooks/test/unittest_security.py
cubicweb/hooks/test/unittest_syncsession.py
cubicweb/pylintext.py
cubicweb/repoapi.py
cubicweb/rset.py
cubicweb/rtags.py
cubicweb/server/__init__.py
cubicweb/server/repository.py
cubicweb/server/rqlannotation.py
cubicweb/server/schema2sql.py
cubicweb/server/session.py
cubicweb/server/sqlutils.py
cubicweb/server/utils.py
cubicweb/server/test/datacomputed/migratedapp/schema.py
cubicweb/server/test/datacomputed/schema.py
cubicweb/server/test/data/entities.py
cubicweb/server/test/data/hooks.py
cubicweb/server/test/data-migractions/cubes/fakecustomtype/__init__.py
cubicweb/server/test/data-migractions/cubes/fakeemail/__init__.py
cubicweb/server/test/data-migractions/cubes/__init__.py
cubicweb/server/test/data-migractions/migratedapp/__init__.py
cubicweb/server/test/data-schema2sql/__init__.py
cubicweb/server/test/unittest_checkintegrity.py
cubicweb/server/test/unittest_ldapsource.py
cubicweb/server/test/unittest_serverctl.py
cubicweb/server/test/unittest_session.py
cubicweb/server/test/unittest_rqlannotation.py
cubicweb/server/test/unittest_utils.py
cubicweb/sobjects/notification.py
cubicweb/sobjects/test/unittest_notification.py
cubicweb/sobjects/test/unittest_register_user.py
cubicweb/sobjects/textparsers.py
cubicweb/test/data/libpython/cubicweb_comment/__init__.py
cubicweb/test/data/libpython/cubicweb_comment/__pkginfo__.py
cubicweb/test/data/libpython/cubicweb_email/entities.py
cubicweb/test/data/libpython/cubicweb_email/hooks.py
cubicweb/test/data/libpython/cubicweb_email/__init__.py
cubicweb/test/data/libpython/cubicweb_email/__pkginfo__.py
cubicweb/test/data/libpython/cubicweb_email/views/__init__.py
cubicweb/test/data/libpython/cubicweb_file/entities/__init__.py
cubicweb/test/data/libpython/cubicweb_file/hooks/__init__.py
cubicweb/test/data/libpython/cubicweb_file/__init__.py
cubicweb/test/data/libpython/cubicweb_file/__pkginfo__.py
cubicweb/test/data/libpython/cubicweb_file/views.py
cubicweb/test/data/libpython/cubicweb_forge/__init__.py
cubicweb/test/data/libpython/cubicweb_forge/__pkginfo__.py
cubicweb/test/data/libpython/cubicweb_mycube/__init__.py
cubicweb/test/data/libpython/cubicweb_mycube/__pkginfo__.py
cubicweb/test/data/migration/0.1.0_common.py
cubicweb/test/data/migration/0.1.0_repository.py
cubicweb/test/data_schemareader/schema.py
cubicweb/test/data/server_migration/bootstrapmigration_repository.py
cubicweb/test/data/views.py
cubicweb/test/unittest_binary.py
cubicweb/test/unittest_mail.py
cubicweb/test/unittest_repoapi.py
cubicweb/test/unittest_req.py
cubicweb/test/unittest_rtags.py
cubicweb/test/unittest_schema.py
cubicweb/test/unittest_toolsutils.py
cubicweb/test/unittest_wfutils.py
cubicweb/web/application.py
cubicweb/web/formwidgets.py
cubicweb/web/test/data/entities.py
cubicweb/web/test/unittest_application.py
cubicweb/web/test/unittest_http_headers.py
cubicweb/web/test/unittest_views_basetemplates.py
cubicweb/web/test/unittest_views_cwsources.py
cubicweb/web/test/unittest_views_json.py
cubicweb/web/views/authentication.py
cubicweb/web/views/editcontroller.py
cubicweb/web/views/json.py
cubicweb/web/views/searchrestriction.py
cubicweb/web/views/staticcontrollers.py
cubicweb/web/views/uicfg.py
cubicweb/xy.py
cubicweb/pyramid/auth.py
cubicweb/pyramid/bwcompat.py
cubicweb/pyramid/config.py
cubicweb/pyramid/core.py
cubicweb/pyramid/defaults.py
cubicweb/pyramid/__init__.py
cubicweb/pyramid/login.py
cubicweb/pyramid/predicates.py
cubicweb/pyramid/profile.py
cubicweb/pyramid/resources.py
cubicweb/pyramid/rest_api.py
cubicweb/pyramid/session.py
cubicweb/pyramid/tools.py
cubicweb/pyramid/test/__init__.py
cubicweb/pyramid/test/test_bw_request.py
cubicweb/pyramid/test/test_config.py
cubicweb/pyramid/test/test_core.py
cubicweb/pyramid/test/test_login.py
cubicweb/pyramid/test/test_rest_api.py
cubicweb/pyramid/test/test_tools.py
cubicweb/pyramid/pyramidctl.py
cubicweb/wfutils.py