Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update natlink import namespacing #354

Open
MarkRx opened this issue Sep 2, 2021 · 4 comments
Open

Update natlink import namespacing #354

MarkRx opened this issue Sep 2, 2021 · 4 comments
Assignees
Labels
Compatibility Issues related to version compatibility NatLink Issues related to NatLink

Comments

@MarkRx
Copy link
Contributor

MarkRx commented Sep 2, 2021

Now that natlink is a module that can be installed with pip it has namespacing. References need to be updated to use the proper namespacing.

from natlinkcore import natlink

example

@drmfinlay drmfinlay self-assigned this Sep 7, 2021
@drmfinlay drmfinlay added Compatibility Issues related to version compatibility NatLink Issues related to NatLink labels Sep 7, 2021
@drmfinlay
Copy link
Member

drmfinlay commented Sep 7, 2021

I'll make the necessary changes.

As I have said elsewhere, Python 2.7 support will not be dropped for core features or for most of the SR engine back-ends, including the one for Natlink. Dragonfly will continue to support the way this was done in previous versions of Natlink, e.g. version 4.2.

@drmfinlay
Copy link
Member

It seems that the NatlinkModule/init.py file was changed to import everything from natlinkcore in October. This issue is out of date.

@quintijn
Copy link

sorry to read this only now. The calling of natlink functions (from the .pyd file, like execScript, playString etc) and the calling of the modules like loader and natlinkstatus may need another change, as we are still experimenting with the most clear procedure.

@drmfinlay drmfinlay reopened this Jul 19, 2022
drmfinlay added a commit that referenced this issue Jul 19, 2022
Re: #354.

Dragonfly will now attempt to import this module with the following
incantations (in order):

 1. import natlinkstatus
 2. from natlinkcore import natlinkstatus

This allows the library to work with older and newer versions of
Natlink.

I note that, apart from the `natlink' ext. module, `natlinkstatus'
is the only Natlink module used by this library.
@drmfinlay
Copy link
Member

That's all right, Quintijn. I am sorry to only reply to your comment today.

I have updated the procedures that use the natlinkstatus module. Dragonfly will attempt to import this module with the following incantations (in order):

  1. import natlinkstatus
  2. from natlinkcore import natlinkstatus

As we have discussed privately, no changes will be necessary to use the natlink ext. module, so what I've done should allow the library to work with older and newer versions of Natlink. The changes will be available in the next Dragonfly release version. I'll leave this issue open until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compatibility Issues related to version compatibility NatLink Issues related to NatLink
Projects
None yet
Development

No branches or pull requests

3 participants