Skip to content

add resolve_address() method to client objects - #30

Merged
Jajcus merged 6 commits into
mainfrom
address_port_string
Oct 21, 2026
Merged

Jajcus merged 6 commits into
mainfrom
address_port_string

Conversation

@Jajcus

@Jajcus Jajcus commented Oct 21, 2026

Copy link
Copy Markdown
Owner

Based on #27 by @thanks4opensource, just rebased and with two minor fixes added.

SequencerClientBase.get_address() returns an Address given various forms of client and port inputs such as "client-name:port-name" strings, separate "client" and "port" strings, int client and port IDs, tuples of these, Address objects, and mixes/combinations of them

See the original MR for more information and discussion.

thanks4opensource and others added 5 commits October 21, 2026 17:54
Parses various input overloads such as 'client-name:port_name',
('client-name','port-name), etc., returns Address. Raises exception
if Address(client_id, port_id) doesn't exist. Added new fd() public
accessor. Added tests/test_sequencer_address.py. Modified
examples/connect.py to accept 'client-name:port-name'.
Parses various input overloads such as 'client-name:port_name',
('client-name','port-name'), etc., returns Address. Raises exception
if Address(client_id, port_id) doesn't exist. Added new fd public
getter. Added tests/test_sequencer_address.py. Modified
examples/connect.py to accept 'client-name:port-name'
Update:
- Changed get_address() to resolve_address()
- Added @Property to fd() to make read-only fd
- Fixed test_sequencer_address.py to run under tox/pytest
- Changed whitespace,etc to pass tox style/flake8, except
  in test_sequencer_address.py
Parses various input overloads such as 'client-name:port_name',
('client-name','port-name'), etc., returns Address. Raises exception
if Address(client_id, port_id) doesn't exist. Added new fd public
getter. Added tests/test_sequencer_address.py. Modified
examples/connect.py to accept 'client-name:port-name'
Update:
- Changed get_address() to resolve_address()
- Added @Property to fd() to make read-only fd
- Fixed test_sequencer_address.py to run under tox/pytest
- Changed whitespace,etc to pass tox style/flake8, except
  in test_sequencer_address.py
Update:
- Whitespace/indentation changes, directives, and exclusions
  for for tox/pytest/isort.
- All tests pass without error.
client: add resolve_address() and fileno()

Parses various input overloads such as 'client-name:port_name',
('client-name','port-name'), etc., returns Address. Raises exception
if Address(client_id, port_id) doesn't exist. Added new fileno()
public accessor. Added tests/test_sequencer_address.py. Modified
examples/connect.py to accept 'client-name:port-name'
Update:
- Changed get_address() to resolve_address()
- Added @Property to fd() to make read-only fd
- Fixed test_sequencer_address.py to run under tox/pytest
- Changed whitespace,etc to pass tox style/flake8, except
  in test_sequencer_address.py
Update:
- Whitespace/indentation changes, directives, and exclusions
  for for tox/pytest/isort.
- All tests pass without error.
Update:
client.py:
- Removed "@Property\ndef fd(self):"
- Replaced with Jajcus-provided "fileno(self)"
- Removed typo/bug, redesigned/rewrote argument validation in resolve_address()
- Fixed typo introduced in docstring
test_sequencer_address.py
- Fixed bug, use of non-existent variable
- Removed unused variable
- Removed "# flake8: noqa"
- Reformatted code with autopep8
- Moved file-level docstring to top of file
- Added "import pytest" and "@pytest.mark.require_alsa_seq"
- Added more "# isort: skip" (imports in correct order, still produce errors)
- Added "# noqua: F824" (global variables *are* used, flake8 flags incorrectly)
tox.ini
- Removed "-exclude = tests/test_sequencer_address.py"
@Jajcus
Jajcus force-pushed the address_port_string branch from 3547441 to a3ed4a7 Compare October 21, 2026 15:55
not only Address but Port and PortInfo too, as the method signature says
@Jajcus
Jajcus force-pushed the address_port_string branch from a3ed4a7 to b16554b Compare October 21, 2026 16:15
@Jajcus
Jajcus merged commit 379fac5 into main Oct 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants