Skip to content

Commit

Permalink
New dafaults: RunnerForSingleThread and MolerConnectionForSingleThread (
Browse files Browse the repository at this point in the history
#429)

* New dafaults: RunnerForSingleThread and MolerConnectionForSingleThreadRunner

* Switch to version 2.0.0

* more logs when device is created

* pep8
  • Loading branch information
marcin-usielski authored Jan 18, 2022
1 parent fd7bfe8 commit cd73e2d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## moler 2.0.0

### Improved

* Change default runner and connection type (less threads).
* Improve removing escape character from unix output

## moler 1.33.0

### Improved
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![image](https://img.shields.io/badge/pypi-v1.33.0-blue.svg)](https://pypi.org/project/moler/)
[![image](https://img.shields.io/badge/pypi-v2.0.0-blue.svg)](https://pypi.org/project/moler/)
[![image](https://img.shields.io/badge/python-2.7%20%7C%203.6%20%7C%203.7%20%7C%203.8-blue.svg)](https://pypi.org/project/moler/)
[![Build Status](https://travis-ci.org/nokia/moler.svg?branch=master)](https://travis-ci.org/nokia/moler)
[![Coverage Status](https://coveralls.io/repos/github/nokia/moler/badge.svg?branch=master)](https://coveralls.io/github/nokia/moler?branch=master)
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
# -- Project information -----------------------------------------------------

project = 'Moler'
copyright = '2019, Nokia'
copyright = '2019-2022, Nokia'
author = 'Nokia'

# The short X.Y version
version = '1.33.0'
version = '2.0.0'
# The full version, including alpha/beta/rc tags
release = 'stable'

Expand Down
6 changes: 3 additions & 3 deletions moler/connection_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _try_get_connection_with_name(io_type, variant, **constructor_kwargs):


# actions during import
connection_cfg.register_builtin_connections(ConnectionFactory, ThreadedMolerConnection) # Default in Moler 1.x.y
# connection_cfg.register_builtin_connections(ConnectionFactory, MolerConnectionForSingleThreadRunner) # will be
# default since Moler 2.0.0
# connection_cfg.register_builtin_connections(ConnectionFactory, ThreadedMolerConnection) # Default in Moler 1.x.y
connection_cfg.register_builtin_connections(ConnectionFactory, MolerConnectionForSingleThreadRunner) # default since
# Moler 2.0.0
connection_cfg.set_defaults()
18 changes: 11 additions & 7 deletions moler/device/textualdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- be the state machine that controls which commands may run in given state
"""
__author__ = 'Grzegorz Latuszek, Marcin Usielski, Michal Ernst'
__copyright__ = 'Copyright (C) 2018-2021, Nokia'
__copyright__ = 'Copyright (C) 2018-2022, Nokia'
__email__ = '[email protected], [email protected], [email protected]'

import abc
Expand Down Expand Up @@ -185,12 +185,16 @@ def establish_connection(self):
with self._state_prompts_lock:
self._run_prompts_observers()

msg = "Established connection to device '{}' (as instance of class '{}.{}') with prompts: '{}'.".format(
self.name,
self.__class__.__module__,
self.__class__.__name__,
self._state_prompts
)
msg = "Established connection to device '{}' (as instance of class '{}.{}', io_connection: '{}.{}', " \
"moler_connection: '{}.{}') with prompts: '{}'.".format(self.name,
self.__class__.__module__,
self.__class__.__name__,
self.io_connection.__class__.__module__,
self.io_connection.__class__.__name__,
self.io_connection.moler_connection.__class__.__module__,
self.io_connection.moler_connection.__class__.__name__,
self._state_prompts
)
self._established = True
self._log(level=logging.INFO, msg=msg)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name='moler', # Required
version='1.33.0', # Required
version='2.0.0', # Required
description='Moler is library to help in building automated tests', # Required
long_description=long_description, # Optional
long_description_content_type='text/markdown', # Optional (see note above)
Expand Down

0 comments on commit cd73e2d

Please sign in to comment.