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

Migrate from sonic-daemon-base package to sonic-py-common package #103

Merged
merged 6 commits into from
Aug 5, 2020
Merged

Migrate from sonic-daemon-base package to sonic-py-common package #103

merged 6 commits into from
Aug 5, 2020

Conversation

jleveque
Copy link
Contributor

As part of consolidating all common Python-based functionality into the new sonic-py-common package, this pull request migrates from importing the sonic-daemon-base package to importing the sonic-py-common package. This is the next step toward resolving sonic-net/sonic-buildimage#4999.

  • Also reorganize imports for consistency

@jleveque
Copy link
Contributor Author

Removed "Request for 201911 Branch" label, as backporting this change and the related changes will most likely be better performed by creating new PRs against the 201911 branch.

@@ -24,6 +24,10 @@
'sonic_sfp',
'sonic_thermal',
],
install_requires=[
'sonic-config-engine', # For portconfig. TODO: Remove this dependency
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This dependency was always needed, but was never explicitly specified. I added it here along with a TODO to eventually remove it (portconfig should eventually be moved into sonic-py-common).

@@ -24,6 +24,10 @@
'sonic_sfp',
'sonic_thermal',
],
install_requires=[
'sonic-config-engine', # For portconfig. TODO: Remove this dependency
'sonic-py-common'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do you name the python3 version? sonic-py3-common?

Copy link
Contributor Author

@jleveque jleveque Aug 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The installed package has the exact same name. They reside in different Python directories (/usr/local/lib/python2.X/dist-packages/sonic_py_common and /usr/local/lib/python3.X/dist-packages/sonic_py_common. This will help ease the transition from Python 2 to Python 3.

The .whl files have -py2 and -py3 suffices to differentiate.

@jleveque jleveque merged commit f8bfbc9 into sonic-net:master Aug 5, 2020
@jleveque jleveque deleted the use_sonic-py-common branch August 5, 2020 07:22
@abdosi
Copy link
Contributor

abdosi commented Sep 6, 2020

@JLevesque84 FYI, I had to cherry-pick some part of PR to fix the compilation error generated when doing:

[Submodule update] sonic-platform-common
Multi-Asic changes PR #100 , commit into 201911.

Please create PR for 201911 with other changes. Thanks !!

@judyjoseph

@JLevesque84
Copy link

JLevesque84 commented Sep 6, 2020 via email

@abdosi
Copy link
Contributor

abdosi commented Sep 6, 2020

You all keep tagging me on this, and I’m pretty sure im the wrong person

oops Sorry. Tagging @jleveque

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants