Remove remote repository-access-through-pyro support

Modern methods such as the rqlcontroller cube + the cwclientlib library are the way forward.

Closes #2919309.

authorAurelien Campeas <aurelien.campeas@logilab.fr>
changeset1ffd4edeca75
branchdefault
phasedraft
hiddenyes
parent revision#9b13864bb386 [views,js] remove user_callback feature
child revision#f4d975c3a3a8 Remove the remote repository-access-through-zmq support
files modified by this revision
cwctl.py
dbapi.py
debian/control
debian/cubicweb-ctl.cubicweb.init
devtools/__init__.py
devtools/httptest.py
doc/3.21.rst
doc/book/en/admin/config.rst
doc/book/en/admin/index.rst
doc/book/en/admin/instance-config.rst
doc/book/en/admin/migration.rst
doc/book/en/admin/pyro.rst
doc/features_list.rst
etwist/server.py
etwist/twconfig.py
repoapi.py
server/repository.py
server/server.py
server/serverconfig.py
server/serverctl.py
server/test/unittest_repository.py
test/unittest_utils.py
transaction.py
utils.py
web/webctl.py
zmqclient.py
# HG changeset patch
# User Aurelien Campeas <aurelien.campeas@logilab.fr>
# Date 1401985056 -7200
# Thu Jun 05 18:17:36 2014 +0200
# Node ID 1ffd4edeca7548c70e01225353f1d31e1a3cf452
# Parent 9b13864bb386c02450c36ff70b40b30d0b870578
Remove remote repository-access-through-pyro support

Modern methods such as the rqlcontroller cube + the cwclientlib
library are the way forward.

Closes #2919309.

diff --git a/cwctl.py b/cwctl.py
@@ -1,6 +1,6 @@
1 -# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
2 +# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
3  # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
4  #
5  # This file is part of CubicWeb.
6  #
7  # CubicWeb is free software: you can redistribute it and/or modify it under the
@@ -399,11 +399,11 @@
8          if not self.config.automatic:
9              sections = set(sect.lower() for sect, opt, odict in config.all_options()
10                             if 'type' in odict
11                             and odict.get('level') <= self.config.config_level)
12              for section in sections:
13 -                if section not in ('main', 'email', 'pyro', 'web'):
14 +                if section not in ('main', 'email', 'web'):
15                      print '\n' + underline_title('%s options' % section)
16                      config.input_config(section, self.config.config_level)
17          # write down configuration
18          config.save()
19          self._handle_win32(config, appid)
@@ -889,13 +889,11 @@
20            }),
21 
22          ('repo-uri',
23           {'short': 'H', 'type' : 'string', 'metavar': '<protocol>://<[host][:port]>',
24            'help': 'URI of the CubicWeb repository to connect to. URI can be \
25 -pyro://[host:port] the Pyro name server host; if the pyro nameserver is not set, \
26 -it will be detected by using a broadcast query, a ZMQ URL or \
27 -inmemory:// (default) use an in-memory repository. THIS OPTION IS DEPRECATED, \
28 +a ZMQ URL or inmemory:// (default) use an in-memory repository. THIS OPTION IS DEPRECATED, \
29  directly give URI as instance id instead',
30            'group': 'remote'
31            }),
32          )
33 
@@ -942,11 +940,11 @@
34      def run(self, args):
35          appuri = args.pop(0)
36          if self.config.repo_uri:
37              warn('[3.16] --repo-uri option is deprecated, directly give the URI as instance id',
38                   DeprecationWarning)
39 -            if urlparse(self.config.repo_uri).scheme in ('pyro', 'inmemory'):
40 +            if urlparse(self.config.repo_uri).scheme == 'inmemory':
41                  appuri = '%s/%s' % (self.config.repo_uri.rstrip('/'), appuri)
42 
43          from cubicweb.utils import parse_repo_uri
44          protocol, hostport, appid = parse_repo_uri(appuri)
45          if protocol == 'inmemory':
diff --git a/dbapi.py b/dbapi.py
@@ -117,17 +117,11 @@
46      `database` may be:
47 
48      * a simple instance id for in-memory connection
49 
50      * a uri like scheme://host:port/instanceid where scheme may be one of
51 -      'pyro', 'inmemory' or 'zmqpickle'
52 -
53 -      * if scheme is 'pyro', <host:port> determine the name server address. If
54 -        not specified (e.g. 'pyro:///instanceid'), it will be detected through a
55 -        broadcast query. The instance id is the name of the instance in the name
56 -        server and may be prefixed by a group (e.g.
57 -        'pyro:///:cubicweb.instanceid')
58 +      'inmemory' or 'zmqpickle'
59 
60        * if scheme is handled by ZMQ (eg 'tcp'), you should not specify an
61          instance id
62 
63      Other arguments:
@@ -135,12 +129,11 @@
64      :login:
65        the user login to use to authenticate.
66 
67      :cnxprops:
68        a :class:`ConnectionProperties` instance, allowing to specify
69 -      the connection method (eg in memory or pyro). A Pyro connection will be
70 -      established if you don't specify that argument.
71 +      the connection method (eg in memory or zmq).
72 
73      :setvreg:
74        flag telling if a registry should be initialized for the connection.
75        Don't change this unless you know what you're doing.
76 
@@ -164,18 +157,10 @@
77               DeprecationWarning, stacklevel=2)
78          if cnxprops and cnxprops.cnxtype == 'zmq':
79              database = kwargs.pop('host')
80          elif cnxprops and cnxprops.cnxtype == 'inmemory':
81              database = 'inmemory://' + database
82 -        else:
83 -            host = kwargs.pop('host', None)
84 -            if host is None:
85 -                host = ''
86 -            group = kwargs.pop('group', None)
87 -            if group is None:
88 -                group = 'cubicweb'
89 -            database = 'pyro://%s/%s.%s' % (host, group, database)
90      puri = urlparse(database)
91      method = puri.scheme.lower()
92      if method == 'inmemory':
93          config = cwconfig.instance_configuration(puri.netloc)
94      else:
@@ -693,14 +678,10 @@
95          self._repo.rollback(self.sessionid, **self._txid())
96 
97      @check_not_closed
98      def cursor(self, req=None):
99          """Return a new Cursor Object using the connection.
100 -
101 -        On pyro connection, you should get cursor after calling if
102 -        load_appobjects method if desired (which you should call if you intend
103 -        to use ORM abilities).
104          """
105          if req is None:
106              req = self.request()
107          return self.cursor_class(self, self._repo, req=req)
108 
diff --git a/debian/control b/debian/control
@@ -56,11 +56,10 @@
109   cubicweb-postgresql-support
110   | cubicweb-mysql-support
111   | python-pysqlite2,
112   python-passlib
113  Recommends:
114 - pyro (<< 4.0.0),
115   cubicweb-documentation (= ${source:Version})
116  Suggests:
117   python-zmq
118  Description: server part of the CubicWeb framework
119   CubicWeb is a semantic web application framework.
@@ -105,11 +104,10 @@
120   ${python:Depends},
121   cubicweb-web (= ${source:Version}),
122   cubicweb-ctl (= ${source:Version}),
123   python-twisted-web
124  Recommends:
125 - pyro (<< 4.0.0),
126   cubicweb-documentation (= ${source:Version})
127  Description: twisted-based web interface for the CubicWeb framework
128   CubicWeb is a semantic web application framework.
129   .
130   This package provides a twisted based HTTP server to serve
diff --git a/debian/cubicweb-ctl.cubicweb.init b/debian/cubicweb-ctl.cubicweb.init
@@ -2,20 +2,18 @@
131 
132  ### BEGIN INIT INFO
133  # Provides:          cubicweb
134  # Required-Start:    $remote_fs $syslog $local_fs $network
135  # Required-Stop:     $remote_fs $syslog $local_fs $network
136 -# Should-Start:      postgresql pyro-nsd
137 -# Should-Stop:       postgresql pyro-nsd
138 +# Should-Start:      postgresql
139 +# Should-Stop:       postgresql
140  # Default-Start:     2 3 4 5
141  # Default-Stop:      0 1 6
142  # Short-Description: Start cubicweb application at boot time
143  ### END INIT INFO
144 
145  # FIXME Seems to be inadequate here
146 -# FIXME If related to pyro, try instead:
147 -# export PYRO_STORAGE="/tmp"
148  cd /tmp
149 
150  # FIXME Work-around about the following lintian error
151  #     E: cubicweb-ctl: init.d-script-does-not-implement-required-option /etc/init.d/cubicweb start
152  #
diff --git a/devtools/__init__.py b/devtools/__init__.py
@@ -235,14 +235,10 @@
153      cube_appobject_path = TestServerConfiguration.cube_appobject_path | WebConfigurationBase.cube_appobject_path
154 
155      def available_languages(self, *args):
156          return self.cw_languages()
157 
158 -    def pyro_enabled(self):
159 -        # but export PYRO_MULTITHREAD=0 or you get problems with sqlite and
160 -        # threads
161 -        return True
162 
163  # XXX merge with BaseApptestConfiguration ?
164  class ApptestConfiguration(BaseApptestConfiguration):
165      # `skip_db_create_and_restore` controls wether or not the test database
166      # should be created / backuped / restored. If set to True, those
diff --git a/devtools/httptest.py b/devtools/httptest.py
@@ -1,6 +1,6 @@
167 -# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
168 +# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
169  # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
170  #
171  # This file is part of CubicWeb.
172  #
173  # CubicWeb is free software: you can redistribute it and/or modify it under the
@@ -76,12 +76,10 @@
174      def default_base_url(self):
175          port = self['port'] or get_available_port(self.ports_range)
176          self.global_set_option('port', port) # force rewrite here
177          return 'http://127.0.0.1:%d/' % self['port']
178 
179 -    def pyro_enabled(self):
180 -        return False
181 
182 
183  class CubicWebServerTC(CubicWebTC):
184      """Class for running test web server. See :class:`CubicWebServerConfig`.
185 
diff --git a/doc/3.21.rst b/doc/3.21.rst
@@ -8,5 +8,9 @@
186  * the get/set_shared_data api has been removed; people should use
187    transaction_data or session_data instead
188 
189  * the user_callback api has been removed; people should use plain
190    ajax functions instead
191 +
192 +* the Pyro remote repository access method has been entirely removed
193 +  (emerging alternatives such as rqlcontroller and cwclientlib should
194 +  be used instead)
diff --git a/doc/book/en/admin/config.rst b/doc/book/en/admin/config.rst
@@ -12,19 +12,17 @@
195    - `SQLServer configuration`_
196    - `SQLite configuration`_
197 
198  For advanced features, have a look to:
199 
200 -  - `Pyro configuration`_
201    - `Cubicweb resources configuration`_
202 
203  .. _`configure the database`: DatabaseInstallation_
204  .. _`PostgreSQL configuration`: PostgresqlConfiguration_
205  .. _`MySql configuration`: MySqlConfiguration_
206  .. _`SQLServer configuration`: SQLServerConfiguration_
207  .. _`SQLite configuration`: SQLiteConfiguration_
208 -.. _`Pyro configuration`: PyroConfiguration_
209  .. _`Cubicweb resources configuration`: RessourcesConfiguration_
210 
211 
212 
213  .. _RessourcesConfiguration:
@@ -225,31 +223,5 @@
214 
215  .. Note::
216    SQLite is great for testing and to play with cubicweb but is not suited for
217    production environments.
218 
219 -
220 -.. _PyroConfiguration:
221 -
222 -Pyro configuration
223 -------------------
224 -
225 -Pyro name server
226 -~~~~~~~~~~~~~~~~
227 -
228 -If you want to use Pyro to access your instance remotely, or to have multi-source
229 -or distributed configuration, it is required to have a Pyro name server running
230 -on your network. By default it is detected by a broadcast request, but you can
231 -specify a location in the instance's configuration file.
232 -
233 -To do so, you need to :
234 -
235 -* be sure to have installed it (see :ref:`InstallDependencies`)
236 -
237 -* launch the pyro name server with `pyro-nsd start` before starting cubicweb
238 -
239 -* under debian, edit the file :file:`/etc/default/pyro-nsd` so that the name
240 -  server pyro will be launched automatically when the machine fire up
241 -
242 -Note that you can use the pyro server without a running pyro nameserver.
243 -Refer to `pyro-ns-host` server configuration option for details.
244 -
diff --git a/doc/book/en/admin/index.rst b/doc/book/en/admin/index.rst
@@ -20,10 +20,9 @@
245     create-instance
246     instance-config
247     site-config
248     multisources
249     ldap
250 -   pyro
251     migration
252     additional-tips
253     rql-logs
254 
diff --git a/doc/book/en/admin/instance-config.rst b/doc/book/en/admin/instance-config.rst
@@ -108,36 +108,10 @@
255      timeout of a RQL session
256  :`main.query-log-file`:
257      file where all requests RQL executed by the server are written
258 
259 
260 -Pyro configuration for the instance
261 ------------------------------------
262 -Web server side:
263 -
264 -:`pyro.pyro-instance-id`:
265 -    pyro identifier of RQL server (e.g. the instance name)
266 -
267 -RQL server side:
268 -
269 -:`main.pyro-server`:
270 -    boolean to switch on/off pyro server-side
271 -
272 -:`pyro.pyro-host`:
273 -    pyro host:port number. If no port is specified, it is assigned
274 -    automatically.
275 -
276 -RQL and web servers side:
277 -
278 -:`pyro.pyro-ns-host`:
279 -    hostname hosting pyro server name. If no value is
280 -    specified, it is located by a request from broadcast
281 -
282 -:`pyro.pyro-ns-group`:
283 -    pyro group in which to save the instance (will default to 'cubicweb')
284 -
285 -
286  Configuring e-mail
287  ------------------
288  RQL and web server side:
289 
290  :`email.mangle-mails [no]`:
diff --git a/doc/book/en/admin/migration.rst b/doc/book/en/admin/migration.rst
@@ -6,11 +6,11 @@
291  Migrate apache & cubicweb
292  -------------------------
293 
294  **Aim** : do the migration for N cubicweb instances hosted on a server to another with no downtime.
295 
296 -**Prerequisites** : have an explicit definition of the database host (not default or localhost). In our case, the database is hosted on another host. You are not migrating your pyro server. You are not using multisource (more documentation on that soon).
297 +**Prerequisites** : have an explicit definition of the database host (not default or localhost). In our case, the database is hosted on another host.
298 
299  **Steps** :
300 
301  1. *on new machine* : install your environment (*pseudocode*) ::
302 
@@ -19,28 +19,20 @@
303  2. *on old machine* : copy your cubicweb and apache configuration to the new machine ::
304 
305      scp /etc/cubicweb.d/ newmachine:/etc/cubicweb.d/
306      scp /etc/apache2/sites-available/ newmachine:/etc/apache2/sites-available/
307 
308 -3. *on new machine* : give new ids to pyro registration so the new instances can register ::
309 -
310 -     cd /etc/cubicweb.d/ ; sed -i.bck 's/^pyro-instance-id=.*$/\02/' */all-in-one.conf
311 -
312 -4. *on new machine* : start your instances ::
313 +3. *on new machine* : start your instances ::
314 
315       cubicweb start
316 
317 -5. *on new machine* : enable sites and modules for apache and start it, test it using by modifying your /etc/host file.
318 +4. *on new machine* : enable sites and modules for apache and start it, test it using by modifying your /etc/host file.
319 
320 -6. change dns entry from your oldmachine to newmachine
321 +5. change dns entry from your oldmachine to newmachine
322 
323 -7. shutdown your *old machine* (if it doesn't host other services or your database)
324 +6. shutdown your *old machine* (if it doesn't host other services or your database)
325 
326 -8. That's it.
327 +7. That's it.
328 
329  **Possible enhancements** : use right from the start a pound server behind your apache, that way you can add backends and smoothily migrate by shuting down backends that pound will take into account.
330 
331 -Migrate apache & cubicweb with pyro
332 ------------------------------------
333 
334 -FIXME TODO
335 -
diff --git a/doc/book/en/admin/pyro.rst b/doc/book/en/admin/pyro.rst
@@ -1,62 +0,0 @@
336 -.. _UsingPyro:
337 -
338 -Working with a distributed client (using Pyro)
339 -==============================================
340 -
341 -In some circumstances, it is practical to split the repository and
342 -web-client parts of the application for load-balancing reasons. Or
343 -one wants to access the repository from independant scripts to consult
344 -or update the database.
345 -
346 -Prerequisites
347 --------------
348 -
349 -For this to work, several steps have to be taken in order.
350 -
351 -You must first ensure that the appropriate software is installed and
352 -running (see :ref:`ConfigEnv`)::
353 -
354 -  pyro-nsd -x -p 6969
355 -
356 -Then you have to set appropriate options in your configuration. For
357 -instance::
358 -
359 -  pyro-server=yes
360 -  pyro-ns-host=localhost:6969
361 -
362 -  pyro-instance-id=myinstancename
363 -
364 -Connect to the CubicWeb repository from a python script
365 --------------------------------------------------------
366 -
367 -Assuming pyro-nsd is running and your instance is configured with ``pyro-server=yes``,
368 -you will be able to use :mod:`cubicweb.dbapi` api to initiate the connection.
369 -
370 -.. note::
371 -    Regardless of whether your instance is pyro activated or not, you can still
372 -    achieve this by using cubicweb-ctl shell scripts in a simpler way, as by default
373 -    it creates a repository 'in-memory' instead of connecting through pyro. That
374 -    also means you've to be on the host where the instance is running.
375 -
376 -Finally, the client (for instance a python script) must connect specifically
377 -as in the following example code:
378 -
379 -.. sourcecode:: python
380 -
381 -    from cubicweb import dbapi
382 -
383 -    cnx = dbapi.connect(database='instance-id', user='admin', password='admin')
384 -    cnx.load_appobjects()
385 -    cur = cnx.cursor()
386 -    for name in (u'Personal', u'Professional', u'Computers'):
387 -        cur.execute('INSERT Tag T: T name %(n)s', {'n': name})
388 -    cnx.commit()
389 -
390 -Calling :meth:`cubicweb.dbapi.load_appobjects`, will populate the
391 -cubicweb registries (see :ref:`VRegistryIntro`) with the application
392 -objects installed on the host where the script runs. You'll then be
393 -allowed to use the ORM goodies and custom entity methods and views. Of
394 -course this is optional, without it you can still get the repository
395 -data through the connection but in a roughly way: only RQL cursors
396 -will be available, e.g. you can't even build entity objects from the
397 -result set.
diff --git a/doc/features_list.rst b/doc/features_list.rst
@@ -43,11 +43,10 @@
398  | setup - configuration file                                         | 2  | 1  |
399  +--------------------------------------------------------------------+----+----+
400  | configuration - user / groups handling                             | 3  | 1  |
401  | configuration - site configuration                                 | 3  | 1  |
402  | configuration - distributed configuration                          | 2  | 1  |
403 -| configuration - pyro                                               | 2  | 2  |
404  +--------------------------------------------------------------------+----+----+
405  | multi-sources - capabilities                                       | NA | 0  |
406  | multi-sources - configuration                                      | 2  | 0  |
407  | multi-sources - ldap integration                                   | 2  | 1  |
408  +--------------------------------------------------------------------+----+----+
diff --git a/etwist/server.py b/etwist/server.py
@@ -63,18 +63,10 @@
409      def init_publisher(self):
410          config = self.config
411          # when we have an in-memory repository, clean unused sessions every XX
412          # seconds and properly shutdown the server
413          if config['repository-uri'] == 'inmemory://':
414 -            if config.pyro_enabled():
415 -                # if pyro is enabled, we have to register to the pyro name
416 -                # server, create a pyro daemon, and create a task to handle pyro
417 -                # requests
418 -                self.appli.repo.warning('remote repository access through pyro is deprecated')
419 -                self.pyro_daemon = self.appli.repo.pyro_register()
420 -                self.pyro_listen_timeout = 0.02
421 -                self.appli.repo.looping_task(1, self.pyro_loop_event)
422              if config.mode != 'test':
423                  reactor.addSystemEventTrigger('before', 'shutdown',
424                                                self.shutdown_event)
425                  self.appli.repo.start_looping_tasks()
426          self.set_url_rewriter()
@@ -91,17 +83,10 @@
427          """callback fired when the server is shutting down to properly
428          clean opened sessions
429          """
430          self.appli.repo.shutdown()
431 
432 -    def pyro_loop_event(self):
433 -        """listen for pyro events"""
434 -        try:
435 -            self.pyro_daemon.handleRequests(self.pyro_listen_timeout)
436 -        except select.error:
437 -            return
438 -
439      def getChild(self, path, request):
440          """Indicate which resource to use to process down the URL's path"""
441          return self
442 
443      def render(self, request):
diff --git a/etwist/twconfig.py b/etwist/twconfig.py
@@ -1,6 +1,6 @@
444 -# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
445 +# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
446  # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
447  #
448  # This file is part of CubicWeb.
449  #
450  # CubicWeb is free software: you can redistribute it and/or modify it under the
@@ -15,13 +15,10 @@
451  #
452  # You should have received a copy of the GNU Lesser General Public License along
453  # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
454  """twisted server configurations:
455 
456 -* the "twisted" configuration to get a web instance running in a standalone
457 -  twisted web server which talk to a repository server using Pyro
458 -
459  * the "all-in-one" configuration to get a web instance running in a twisted
460    web server integrating a repository server in the same process (only available
461    if the repository part of the software is installed
462  """
463  __docformat__ = "restructuredtext en"
@@ -80,17 +77,10 @@
464            'default': None,
465            'help': 'if this option is set, use the specified user to start \
466  the repository rather than the user running the command',
467            'group': 'main', 'level': WebConfiguration.mode == 'system'
468            }),
469 -        ('pyro-server',
470 -         {'type' : 'yn',
471 -          # pyro is only a recommends by default, so don't activate it here
472 -          'default': False,
473 -          'help': 'run a pyro server',
474 -          'group': 'main', 'level': 1,
475 -          }),
476          ('webserver-threadpool-size',
477           {'type': 'int',
478            'default': 4,
479            'help': "size of twisted's reactor threadpool. It should probably be not too \
480  much greater than connection-poolsize",
@@ -115,13 +105,10 @@
481          options = merge_options(WebConfigurationBase.options
482                                  + ServerConfiguration.options)
483 
484          cubicweb_appobject_path = WebConfigurationBase.cubicweb_appobject_path | ServerConfiguration.cubicweb_appobject_path
485          cube_appobject_path = WebConfigurationBase.cube_appobject_path | ServerConfiguration.cube_appobject_path
486 -        def pyro_enabled(self):
487 -            """tell if pyro is activated for the in memory repository"""
488 -            return self['pyro-server']
489 
490 
491      CONFIGURATIONS.append(AllInOneConfiguration)
492 
493  except ImportError:
diff --git a/repoapi.py b/repoapi.py
@@ -1,6 +1,6 @@
494 -# copyright 2013-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
495 +# copyright 2013-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
496  # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
497  #
498  # This file is part of CubicWeb.
499  #
500  # CubicWeb is free software: you can redistribute it and/or modify it under the
@@ -39,40 +39,21 @@
501  def get_repository(uri=None, config=None, vreg=None):
502      """get a repository for the given URI or config/vregistry (in case we're
503      loading the repository for a client, eg web server, configuration).
504 
505      The returned repository may be an in-memory repository or a proxy object
506 -    using a specific RPC method, depending on the given URI (pyro or zmq).
507 +    using a specific RPC method, depending on the given URI.
508      """
509      if uri is None:
510          return _get_inmemory_repo(config, vreg)
511 
512      protocol, hostport, appid = parse_repo_uri(uri)
513 
514      if protocol == 'inmemory':
515          # me may have been called with a dummy 'inmemory://' uri ...
516          return _get_inmemory_repo(config, vreg)
517 
518 -    if protocol == 'pyroloc':  # direct connection to the instance
519 -        from logilab.common.pyro_ext import get_proxy
520 -        uri = uri.replace('pyroloc', 'PYRO')
521 -        return get_proxy(uri)
522 -
523 -    if protocol == 'pyro':  # connection mediated through the pyro ns
524 -        from logilab.common.pyro_ext import ns_get_proxy
525 -        path = appid.strip('/')
526 -        if not path:
527 -            raise ConnectionError(
528 -                "can't find instance name in %s (expected to be the path component)"
529 -                % uri)
530 -        if '.' in path:
531 -            nsgroup, nsid = path.rsplit('.', 1)
532 -        else:
533 -            nsgroup = 'cubicweb'
534 -            nsid = path
535 -        return ns_get_proxy(nsid, defaultnsgroup=nsgroup, nshost=hostport)
536 -
537      if protocol.startswith('zmqpickle-'):
538          from cubicweb.zmqclient import ZMQRepositoryClient
539          return ZMQRepositoryClient(uri)
540      else:
541          raise ConnectionError('unknown protocol: `%s`' % protocol)
diff --git a/server/repository.py b/server/repository.py
@@ -22,11 +22,10 @@
542  repository mainly:
543 
544  * brings these classes all together to provide a single access
545    point to a cubicweb instance.
546  * handles session management
547 -* provides method for pyro registration, to call if pyro is enabled
548  """
549  __docformat__ = "restructuredtext en"
550 
551  import sys
552  import threading
@@ -149,32 +148,24 @@
553 
554 
555  class Repository(object):
556      """a repository provides access to a set of persistent storages for
557      entities and relations
558 -
559 -    XXX protect pyro access
560      """
561 
562      def __init__(self, config, tasks_manager=None, vreg=None):
563          self.config = config
564          if vreg is None:
565              vreg = cwvreg.CWRegistryStore(config)
566          self.vreg = vreg
567          self._tasks_manager = tasks_manager
568 
569 -        self.pyro_registered = False
570 -        self.pyro_uri = None
571 -        # every pyro client is handled in its own thread; map these threads to
572 -        # the session we opened for them so we can clean up when they go away
573 -        self._pyro_sessions = {}
574          self.app_instances_bus = NullEventBus()
575          self.info('starting repository from %s', self.config.apphome)
576          # dictionary of opened sessions
577          self._sessions = {}
578 
579 -
580          # list of functions to be called at regular interval
581          # list of running threads
582          self._running_threads = []
583          # initial schema, should be build or replaced latter
584          self.schema = schema.CubicWebSchema(config.appid)
@@ -434,14 +425,10 @@
585              try:
586                  cnxset.close(True)
587              except Exception:
588                  self.exception('error while closing %s' % cnxset)
589                  continue
590 -        if self.pyro_registered:
591 -            if self._use_pyrons():
592 -                pyro_unregister(self.config)
593 -            self.pyro_uri = None
594          hits, misses = self.querier.cache_hit, self.querier.cache_miss
595          try:
596              self.info('rql st cache hit/miss: %s/%s (%s%% hits)', hits, misses,
597                        (hits * 100) / (hits + misses))
598              hits, misses = self.system_source.cache_hit, self.system_source.cache_miss
@@ -661,16 +648,10 @@
599          # use an internal connection
600          with self.internal_cnx() as cnx:
601              # try to get a user object
602              user = self.authenticate_user(cnx, login, **kwargs)
603          session = Session(user, self, cnxprops)
604 -        if threading.currentThread() in self._pyro_sessions:
605 -            # assume no pyro client does one get_repository followed by
606 -            # multiple repo.connect
607 -            assert self._pyro_sessions[threading.currentThread()] == None
608 -            self.debug('record session %s', session)
609 -            self._pyro_sessions[threading.currentThread()] = session
610          user._cw = user.cw_rset.req = session
611          user.cw_clear_relation_cache()
612          self._sessions[session.sessionid] = session
613          self.info('opened session %s for user %s', session.sessionid, login)
614          with session.new_cnx() as cnx:
@@ -696,14 +677,10 @@
615          session = self._get_session(sessionid, setcnxset=True, txid=txid)
616          try:
617              try:
618                  rset = self.querier.execute(session, rqlstring, args,
619                                              build_descr)
620 -                # NOTE: the web front will (re)build it when needed
621 -                #       e.g in facets
622 -                #       Zeroed to avoid useless overhead with pyro
623 -                rset._rqlst = None
624                  return rset
625              except (ValidationError, Unauthorized, RQLSyntaxError):
626                  raise
627              except Exception:
628                  # FIXME: check error to catch internal errors
@@ -785,12 +762,10 @@
629              self.hm.call_hooks('session_close', cnx)
630              # commit connection at this point in case write operation has been
631              # done during `session_close` hooks
632              cnx.commit()
633          session.close()
634 -        if threading.currentThread() in self._pyro_sessions:
635 -            self._pyro_sessions[threading.currentThread()] = None
636          del self._sessions[sessionid]
637          self.info('closed session %s for user %s', sessionid, session.user.login)
638 
639      def call_service(self, sessionid, regid, **kwargs):
640          """
@@ -1363,81 +1338,14 @@
641          cnx.update_rel_cache_del(subject, rtype, object, rschema.symmetric)
642          self.hm.call_hooks('after_delete_relation', cnx,
643                             eidfrom=subject, rtype=rtype, eidto=object)
644 
645 
646 -    # pyro handling ###########################################################
647 -
648 -    @property
649 -    @cached
650 -    def pyro_appid(self):
651 -        from logilab.common import pyro_ext as pyro
652 -        config = self.config
653 -        appid = '%s.%s' % pyro.ns_group_and_id(
654 -            config['pyro-instance-id'] or config.appid,
655 -            config['pyro-ns-group'])
656 -        # ensure config['pyro-instance-id'] is a full qualified pyro name
657 -        config['pyro-instance-id'] = appid
658 -        return appid
659 -
660 -    def _use_pyrons(self):
661 -        """return True if the pyro-ns-host is set to something else
662 -        than NO_PYRONS, meaning we want to go through a pyro
663 -        nameserver"""
664 -        return self.config['pyro-ns-host'] != 'NO_PYRONS'
665 -
666 -    def pyro_register(self, host=''):
667 -        """register the repository as a pyro object"""
668 -        from logilab.common import pyro_ext as pyro
669 -        daemon = pyro.register_object(self, self.pyro_appid,
670 -                                      daemonhost=self.config['pyro-host'],
671 -                                      nshost=self.config['pyro-ns-host'],
672 -                                      use_pyrons=self._use_pyrons())
673 -        self.info('repository registered as a pyro object %s', self.pyro_appid)
674 -        self.pyro_uri =  pyro.get_object_uri(self.pyro_appid)
675 -        self.info('pyro uri is: %s', self.pyro_uri)
676 -        self.pyro_registered = True
677 -        # register a looping task to regularly ensure we're still registered
678 -        # into the pyro name server
679 -        if self._use_pyrons():
680 -            self.looping_task(60*10, self._ensure_pyro_ns)
681 -        pyro_sessions = self._pyro_sessions
682 -        # install hacky function to free cnxset
683 -        def handleConnection(conn, tcpserver, sessions=pyro_sessions):
684 -            sessions[threading.currentThread()] = None
685 -            return tcpserver.getAdapter().__class__.handleConnection(tcpserver.getAdapter(), conn, tcpserver)
686 -        daemon.getAdapter().handleConnection = handleConnection
687 -        def removeConnection(conn, sessions=pyro_sessions):
688 -            daemon.__class__.removeConnection(daemon, conn)
689 -            session = sessions.pop(threading.currentThread(), None)
690 -            if session is None:
691 -                # client was not yet connected to the repo
692 -                return
693 -            if not session.closed:
694 -                self.close(session.sessionid)
695 -        daemon.removeConnection = removeConnection
696 -        return daemon
697 -
698 -    def _ensure_pyro_ns(self):
699 -        if not self._use_pyrons():
700 -            return
701 -        from logilab.common import pyro_ext as pyro
702 -        pyro.ns_reregister(self.pyro_appid, nshost=self.config['pyro-ns-host'])
703 -        self.info('repository re-registered as a pyro object %s',
704 -                  self.pyro_appid)
705 
706 
707      # these are overridden by set_log_methods below
708      # only defining here to prevent pylint from complaining
709      info = warning = error = critical = exception = debug = lambda msg, *a, **kw: None
710 
711 -
712 -def pyro_unregister(config):
713 -    """unregister the repository from the pyro name server"""
714 -    from logilab.common.pyro_ext import ns_unregister
715 -    appid = config['pyro-instance-id'] or config.appid
716 -    ns_unregister(appid, config['pyro-ns-group'], config['pyro-ns-host'])
717 -
718 -
719  from logging import getLogger
720  from cubicweb import set_log_methods
721  set_log_methods(Repository, getLogger('cubicweb.repository'))
diff --git a/server/server.py b/server/server.py
@@ -1,140 +0,0 @@
722 -# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
723 -# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
724 -#
725 -# This file is part of CubicWeb.
726 -#
727 -# CubicWeb is free software: you can redistribute it and/or modify it under the
728 -# terms of the GNU Lesser General Public License as published by the Free
729 -# Software Foundation, either version 2.1 of the License, or (at your option)
730 -# any later version.
731 -#
732 -# CubicWeb is distributed in the hope that it will be useful, but WITHOUT
733 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
734 -# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
735 -# details.
736 -#
737 -# You should have received a copy of the GNU Lesser General Public License along
738 -# with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
739 -"""Pyro RQL server"""
740 -
741 -__docformat__ = "restructuredtext en"
742 -
743 -import select
744 -from time import localtime, mktime
745 -
746 -from cubicweb.server.utils import TasksManager
747 -from cubicweb.server.repository import Repository
748 -
749 -class Finished(Exception):
750 -    """raise to remove an event from the event loop"""
751 -
752 -class TimeEvent:
753 -    """base event"""
754 -    # timefunc = staticmethod(localtime)
755 -    timefunc = localtime
756 -
757 -    def __init__(self, absolute=None, period=None):
758 -        # local time tuple
759 -        if absolute is None:
760 -            absolute = self.timefunc()
761 -        self.absolute = absolute
762 -        # optional period in seconds
763 -        self.period = period
764 -
765 -    def is_ready(self):
766 -        """return  true if the event is ready to be fired"""
767 -        now = self.timefunc()
768 -        if self.absolute <= now:
769 -            return True
770 -        return False
771 -
772 -    def fire(self, server):
773 -        """fire the event
774 -        must be overridden by concrete events
775 -        """
776 -        raise NotImplementedError()
777 -
778 -    def update(self):
779 -        """update the absolute date for the event or raise a finished exception
780 -        """
781 -        if self.period is None:
782 -            raise Finished
783 -        self.absolute = localtime(mktime(self.absolute) + self.period)
784 -
785 -
786 -class QuitEvent(TimeEvent):
787 -    """stop the server"""
788 -    def fire(self, server):
789 -        server.repo.shutdown()
790 -        server.quiting = True
791 -
792 -
793 -class RepositoryServer(object):
794 -
795 -    def __init__(self, config):
796 -        """make the repository available as a PyRO object"""
797 -        self.config = config
798 -        self.repo = Repository(config, TasksManager())
799 -        self.ns = None
800 -        self.quiting = None
801 -        # event queue
802 -        self.events = []
803 -
804 -    def add_event(self, event):
805 -        """add an event to the loop"""
806 -        self.info('adding event %s', event)
807 -        self.events.append(event)
808 -
809 -    def trigger_events(self):
810 -        """trigger ready events"""
811 -        for event in self.events[:]:
812 -            if event.is_ready():
813 -                self.info('starting event %s', event)
814 -                event.fire(self)
815 -                try:
816 -                    event.update()
817 -                except Finished:
818 -                    self.events.remove(event)
819 -
820 -    def run(self, req_timeout=5.0):
821 -        """enter the service loop"""
822 -        # start repository looping tasks
823 -        self.repo.start_looping_tasks()
824 -        while self.quiting is None:
825 -            try:
826 -                self.daemon.handleRequests(req_timeout)
827 -            except select.error:
828 -                continue
829 -            finally:
830 -                self.trigger_events()
831 -
832 -    def quit(self):
833 -        """stop the server"""
834 -        self.add_event(QuitEvent())
835 -
836 -    def connect(self, host='', port=0):
837 -        """the connect method on the repository only register to pyro if
838 -        necessary
839 -        """
840 -        self.daemon = self.repo.pyro_register(host)
841 -
842 -    # server utilitities ######################################################
843 -
844 -    def install_sig_handlers(self):
845 -        """install signal handlers"""
846 -        import signal
847 -        self.info('installing signal handlers')
848 -        signal.signal(signal.SIGINT, lambda x, y, s=self: s.quit())
849 -        signal.signal(signal.SIGTERM, lambda x, y, s=self: s.quit())
850 -
851 -
852 -    # these are overridden by set_log_methods below
853 -    # only defining here to prevent pylint from complaining
854 -    @classmethod
855 -    def info(cls, msg, *a, **kw):
856 -        pass
857 -
858 -from logging import getLogger
859 -from cubicweb import set_log_methods
860 -LOGGER = getLogger('cubicweb.reposerver')
861 -set_log_methods(RepositoryServer, LOGGER)
diff --git a/server/serverconfig.py b/server/serverconfig.py
@@ -1,6 +1,6 @@
862 -# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
863 +# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
864  # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
865  #
866  # This file is part of CubicWeb.
867  #
868  # CubicWeb is free software: you can redistribute it and/or modify it under the
@@ -195,40 +195,10 @@
869            'default': (),
870            'help': 'comma separated list of email addresses that will be \
871  notified of every changes.',
872            'group': 'email', 'level': 2,
873            }),
874 -        # pyro services config
875 -        ('pyro-host',
876 -         {'type' : 'string',
877 -          'default': None,
878 -          'help': 'Pyro server host, if not detectable correctly through \
879 -gethostname(). It may contains port information using <host>:<port> notation, \
880 -and if not set, it will be choosen randomly',
881 -          'group': 'pyro', 'level': 3,
882 -          }),
883 -        ('pyro-instance-id',
884 -         {'type' : 'string',
885 -          'default': lgconfig.Method('default_instance_id'),
886 -          'help': 'identifier of the CubicWeb instance in the Pyro name server',
887 -          'group': 'pyro', 'level': 1,
888 -          }),
889 -        ('pyro-ns-host',
890 -         {'type' : 'string',
891 -          'default': '',
892 -          'help': 'Pyro name server\'s host. If not set, will be detected by a \
893 -broadcast query. It may contains port information using <host>:<port> notation. \
894 -Use "NO_PYRONS" to create a Pyro server but not register to a pyro nameserver',
895 -          'group': 'pyro', 'level': 1,
896 -          }),
897 -        ('pyro-ns-group',
898 -         {'type' : 'string',
899 -          'default': 'cubicweb',
900 -          'help': 'Pyro name server\'s group where the repository will be \
901 -registered.',
902 -          'group': 'pyro', 'level': 1,
903 -          }),
904          # zmq services config
905          ('zmq-repository-address',
906           {'type' : 'string',
907            'default': None,
908            'help': ('ZMQ URI on which the repository will be bound '
@@ -348,14 +318,10 @@
909                              self.error('skip unknown option %s in sources file' % attr)
910                  sconfig = _sconfig
911              stream.write('[%s]\n%s\n' % (section, generate_source_config(sconfig)))
912          restrict_perms_to_user(sourcesfile)
913 
914 -    def pyro_enabled(self):
915 -        """pyro is always enabled in standalone repository configuration"""
916 -        return True
917 -
918      def load_schema(self, expand_cubes=False, **kwargs):
919          from cubicweb.schema import CubicWebSchemaLoader
920          if expand_cubes:
921              # in case some new dependencies have been introduced, we have to
922              # reinitialize cubes so the full filesystem schema is read
diff --git a/server/serverctl.py b/server/serverctl.py
@@ -164,15 +164,10 @@
923          """
924          config = self.config
925          if not automatic:
926              print underline_title('Configuring the repository')
927              config.input_config('email', inputlevel)
928 -            # ask for pyro configuration if pyro is activated and we're not
929 -            # using a all-in-one config, in which case this is done by the web
930 -            # side command handler
931 -            if config.pyro_enabled() and config.name != 'all-in-one':
932 -                config.input_config('pyro', inputlevel)
933              print '\n'+underline_title('Configuring the sources')
934          sourcesfile = config.sources_file()
935          # hack to make Method('default_instance_id') usable in db option defs
936          # (in native.py)
937          sconfig = SourceConfiguration(config,
@@ -275,16 +270,11 @@
938  class RepositoryStopHandler(CommandHandler):
939      cmdname = 'stop'
940      cfgname = 'repository'
941 
942      def poststop(self):
943 -        """if pyro is enabled, ensure the repository is correctly unregistered
944 -        """
945 -        if self.config.pyro_enabled():
946 -            from cubicweb.server.repository import pyro_unregister
947 -            pyro_unregister(self.config)
948 -
949 +        pass
950 
951  # repository specific commands ################################################
952 
953  def createdb(helper, source, dbcnx, cursor, **kwargs):
954      if dbcnx.logged_user != source['db-user']:
@@ -641,11 +631,11 @@
955 
956 
957  class StartRepositoryCommand(Command):
958      """Start a CubicWeb RQL server for a given instance.
959 
960 -    The server will be remotely accessible through pyro or ZMQ
961 +    The server will be remotely accessible through ZMQ
962 
963      <instance>
964        the identifier of the instance to initialize.
965      """
966      name = 'start-repository'
@@ -661,27 +651,22 @@
967            'help': 'debug if -D is set, error otherwise',
968            }),
969          ('address',
970           {'short': 'a', 'type': 'string', 'metavar': '<protocol>://<host>:<port>',
971            'default': '',
972 -          'help': ('specify a ZMQ URI on which to bind, or use "pyro://"'
973 -                   'to create a pyro-based repository'),
974 +          'help': ('specify a ZMQ URI on which to bind'),
975            }),
976          )
977 
978      def create_repo(self, config):
979          address = self['address']
980          if not address:
981 -            address = config.get('zmq-repository-address') or 'pyro://'
982 -        if address.startswith('pyro://'):
983 -            from cubicweb.server.server import RepositoryServer
984 -            return RepositoryServer(config), config['host']
985 -        else:
986 -            from cubicweb.server.utils import TasksManager
987 -            from cubicweb.server.cwzmq import ZMQRepositoryServer
988 -            repo = Repository(config, TasksManager())
989 -            return ZMQRepositoryServer(repo), address
990 +            address = config.get('zmq-repository-address')
991 +        from cubicweb.server.utils import TasksManager
992 +        from cubicweb.server.cwzmq import ZMQRepositoryServer
993 +        repo = Repository(config, TasksManager())
994 +        return ZMQRepositoryServer(repo), address
995 
996      def run(self, args):
997          from logilab.common.daemon import daemonize, setugid
998          from cubicweb.cwctl import init_cmdline_log_threshold
999          print 'WARNING: Standalone repository with pyro or zmq access is deprecated'
diff --git a/server/test/unittest_repository.py b/server/test/unittest_repository.py
@@ -29,11 +29,10 @@
1000 
1001  from cubicweb import (BadConnectionId, ValidationError,
1002                        UnknownEid, AuthenticationError, Unauthorized, QueryError)
1003  from cubicweb.predicates import is_instance
1004  from cubicweb.schema import RQLConstraint
1005 -from cubicweb.dbapi import connect, multiple_connections_unfix
1006  from cubicweb.devtools.testlib import CubicWebTC
1007  from cubicweb.devtools.repotest import tuplify
1008  from cubicweb.server import repository, hook
1009  from cubicweb.server.sqlutils import SQL_PREFIX
1010  from cubicweb.server.hook import Hook
@@ -290,59 +289,10 @@
1011          self.assertEqual(cstr.expression, 'O final TRUE')
1012 
1013          ownedby = schema.rschema('owned_by')
1014          self.assertEqual(ownedby.objects('CWEType'), ('CWUser',))
1015 
1016 -    def test_pyro(self):
1017 -        import Pyro
1018 -        Pyro.config.PYRO_MULTITHREADED = 0
1019 -        done = []
1020 -        self.repo.config.global_set_option('pyro-ns-host', 'NO_PYRONS')
1021 -        daemon = self.repo.pyro_register()
1022 -        try:
1023 -            uri = self.repo.pyro_uri.replace('PYRO', 'pyroloc')
1024 -            # the client part has to be in the thread due to sqlite limitations
1025 -            t = threading.Thread(target=self._pyro_client, args=(uri, done))
1026 -            t.start()
1027 -            while not done:
1028 -                daemon.handleRequests(1.0)
1029 -            t.join(1)
1030 -            if t.isAlive():
1031 -                self.fail('something went wrong, thread still alive')
1032 -        finally:
1033 -            repository.pyro_unregister(self.repo.config)
1034 -            from logilab.common import pyro_ext
1035 -            pyro_ext._DAEMONS.clear()
1036 -
1037 -
1038 -    def _pyro_client(self, uri, done):
1039 -        cnx = connect(uri,
1040 -                      u'admin', password='gingkow',
1041 -                      initlog=False) # don't reset logging configuration
1042 -        try:
1043 -            cnx.load_appobjects(subpath=('entities',))
1044 -            # check we can get the schema
1045 -            schema = cnx.get_schema()
1046 -            self.assertTrue(cnx.vreg)
1047 -            self.assertTrue('etypes'in cnx.vreg)
1048 -            cu = cnx.cursor()
1049 -            rset = cu.execute('Any U,G WHERE U in_group G')
1050 -            user = iter(rset.entities()).next()
1051 -            self.assertTrue(user._cw)
1052 -            self.assertTrue(user._cw.vreg)
1053 -            from cubicweb.entities import authobjs
1054 -            self.assertIsInstance(user._cw.user, authobjs.CWUser)
1055 -            # make sure the tcp connection is closed properly; yes, it's disgusting.
1056 -            adapter = cnx._repo.adapter
1057 -            cnx.close()
1058 -            adapter.release()
1059 -            done.append(True)
1060 -        finally:
1061 -            # connect monkey patch some method by default, remove them
1062 -            multiple_connections_unfix()
1063 -
1064 -
1065      def test_zmq(self):
1066          try:
1067              import zmq
1068          except ImportError:
1069              self.skipTest("zmq in not available")
diff --git a/test/unittest_utils.py b/test/unittest_utils.py
@@ -56,14 +56,10 @@
1070      def test_parse_repo_uri(self):
1071          self.assertEqual(('inmemory', None, 'myapp'),
1072                           parse_repo_uri('myapp'))
1073          self.assertEqual(('inmemory', None, 'myapp'),
1074                           parse_repo_uri('inmemory://myapp'))
1075 -        self.assertEqual(('pyro', 'pyro-ns-host:pyro-ns-port', '/myapp'),
1076 -                         parse_repo_uri('pyro://pyro-ns-host:pyro-ns-port/myapp'))
1077 -        self.assertEqual(('pyroloc', 'host:port', '/appkey'),
1078 -                         parse_repo_uri('pyroloc://host:port/appkey'))
1079          self.assertEqual(('zmqpickle-tcp', '127.0.0.1:666', ''),
1080                           parse_repo_uri('zmqpickle-tcp://127.0.0.1:666'))
1081          with self.assertRaises(NotImplementedError):
1082              parse_repo_uri('foo://bar')
1083 
diff --git a/transaction.py b/transaction.py
@@ -1,6 +1,6 @@
1084 -# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
1085 +# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
1086  # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
1087  #
1088  # This file is part of CubicWeb.
1089  #
1090  # CubicWeb is free software: you can redistribute it and/or modify it under the
@@ -13,17 +13,11 @@
1091  # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
1092  # details.
1093  #
1094  # You should have received a copy of the GNU Lesser General Public License along
1095  # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
1096 -"""undoable transaction objects.
1097 -
1098 -
1099 -This module is in the cubicweb package and not in cubicweb.server because those
1100 -objects should be accessible to client through pyro, where the cubicweb.server
1101 -package may not be installed.
1102 -"""
1103 +""" undoable transaction objects. """
1104  __docformat__ = "restructuredtext en"
1105  _ = unicode
1106 
1107  from cubicweb import RepositoryError
1108 
diff --git a/utils.py b/utils.py
@@ -1,6 +1,6 @@
1109 -# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
1110 +# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
1111  # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
1112  #
1113  # This file is part of CubicWeb.
1114  #
1115  # CubicWeb is free software: you can redistribute it and/or modify it under the
@@ -19,11 +19,10 @@
1116 
1117  from __future__ import division
1118 
1119  __docformat__ = "restructuredtext en"
1120 
1121 -import sys
1122  import decimal
1123  import datetime
1124  import random
1125  import re
1126  import json
@@ -549,20 +548,19 @@
1127 
1128  def parse_repo_uri(uri):
1129      """ transform a command line uri into a (protocol, hostport, appid), e.g:
1130      <myapp>                      -> 'inmemory', None, '<myapp>'
1131      inmemory://<myapp>           -> 'inmemory', None, '<myapp>'
1132 -    pyro://[host][:port]         -> 'pyro', 'host:port', None
1133      zmqpickle://[host][:port]    -> 'zmqpickle', 'host:port', None
1134      """
1135      parseduri = urlparse(uri)
1136      scheme = parseduri.scheme
1137      if scheme == '':
1138          return ('inmemory', None, parseduri.path)
1139      if scheme == 'inmemory':
1140          return (scheme, None, parseduri.netloc)
1141 -    if scheme in ('pyro', 'pyroloc') or scheme.startswith('zmqpickle-'):
1142 +    if scheme.startswith('zmqpickle-'):
1143          return (scheme, parseduri.netloc, parseduri.path)
1144      raise NotImplementedError('URI protocol not implemented for `%s`' % uri)
1145 
1146 
1147 
diff --git a/web/webctl.py b/web/webctl.py
@@ -44,13 +44,10 @@
1148      def bootstrap(self, cubes, automatic=False, inputlevel=0):
1149          """bootstrap this configuration"""
1150          if not automatic:
1151              print '\n' + underline_title('Generic web configuration')
1152              config = self.config
1153 -            if config['repository-uri'].startswith('pyro://') or config.pyro_enabled():
1154 -                print '\n' + underline_title('Pyro configuration')
1155 -                config.input_config('pyro', inputlevel)
1156              config.input_config('web', inputlevel)
1157              if ASK.confirm('Allow anonymous access ?', False):
1158                  config.global_set_option('anonymous-user', 'anon')
1159                  config.global_set_option('anonymous-password', 'anon')
1160 
diff --git a/zmqclient.py b/zmqclient.py
@@ -1,6 +1,6 @@
1161 -# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
1162 +# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
1163  # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
1164  #
1165  # This file is part of CubicWeb.
1166  #
1167  # CubicWeb is free software: you can redistribute it and/or modify it under the
@@ -13,11 +13,11 @@
1168  # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
1169  # details.
1170  #
1171  # You should have received a copy of the GNU Lesser General Public License along
1172  # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
1173 -"""Source to query another RQL repository using pyro"""
1174 +"""Source to query another RQL repository using ZMQ"""
1175 
1176  __docformat__ = "restructuredtext en"
1177  _ = unicode
1178 
1179  from functools import partial