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