Skip to content

WIP: Aliases refactoring + closing #727, #716, #615, #704

Matias Guijarro requested to merge aliases_refactoring into master

Fix #727 (closed), #716 (closed), #615 (closed), #704 (closed)

A lot of changes ahead, but a nice bunch of issues fixed too 😄

The main changes are about aliases:

  • removed AliasMixin class
  • create_alias becomes a global function in alias module
  • removed export_to_globals, remove_original options (set by default)
  • always keep a strong ref to the underlying object in Alias
  • removed 'hide_controller' option
  • removed 'alias_or_fullname, alias_or_name properties
    • code explicitely ask for name, fullname or alias instead

Additional bug fix ?

  • if there was a 'grouped_read_handler' the conversion function was not called... (see f6299)
  • the test in test_sampling_counter_mode was checking for device.mode but device can be a GroupedReadHandler with no mode, I simply removed this check

Introduction of a new main module in bliss

  • this is to avoid circular imports
  • makes it more clear there is a main session
    • the main session is the session user started with, or last loaded one (not taking into accound sub-sessions of course)
  • simplify imports and calling the main session
    • avoid session.get_current().

Settings

  • introduced BaseSettings to factor out a lot of code
  • same API for Struct and other settings, get rid of both _get_connection and _set_connection
Edited by Matias Guijarro

Merge request reports