You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ossie.apache.org by "MonkeyCanCode (via GitHub)" <gi...@apache.org> on 2026/07/14 07:02:27 UTC

[PR] Add version support for python models [ossie]

MonkeyCanCode opened a new pull request, #195:
URL: https://github.com/apache/ossie/pull/195

   Not sure if we want to add this, currently we can get version by looking at pip freeze...I am wondering if it makes senses to add standard `__version__` support here:
   ```
   (venv) ➜  python git:(python_add_version_support) ✗ python3
   Python 3.13.0 (v3.13.0:60403a5409f, Oct  7 2024, 00:37:40) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
   Type "help", "copyright", "credits" or "license" for more information.
   >>> import ossie; ossie.__version__
   '0.2.0.dev0'
   ```
   
   This is more nice to have convention but may not be necessary for spec library. Thoughts?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(python models): Add version support for python models [ossie]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #195:
URL: https://github.com/apache/ossie/pull/195#discussion_r4163461780


##########
python/src/ossie/__init__.py:
##########
@@ -15,6 +15,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
+from importlib.metadata import version, PackageNotFoundError
+
+try:
+    __version__ = version("apache-ossie")
+except PackageNotFoundError:
+    __version__ = "unknown"

Review Comment:
   This new public version contract is not covered by the Python test suite. Please add a packaging test that verifies `ossie.__version__` matches `importlib.metadata.version("apache-ossie")`, and cover the `PackageNotFoundError` fallback so regressions in either path are detected; the repository already tests the analogous contract in `converters/thoughtspot/tests/test_packaging.py:27-28`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(python models): Add version support for python models [ossie]

Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre merged PR #195:
URL: https://github.com/apache/ossie/pull/195


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ossie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org