Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Conversation

@gabrielmscampos
Copy link
Member

This commit simply re-expose the __version__ variable in the package root to avoid a breaking change.

Breaking change introduced in 3.1.0-0

Users might programmatically fetch the package version using runregistry.__version__. From 3.1.0-0 users would have to access the version using runregistry.runregistry.__version__.

Test

Before

>>> import runregistry
>>>
>>> runregistry.__version__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'runregistry' has no attribute '__version__'
>>>
>>> runregistry.runregistry.__version__
'3.1.0-0'

After

>>> import runregistry
>>> runregistry.__version__
'3.1.0-0'
>>> runregistry.runregistry.__version__
'3.1.0-0'

This commit simply re-expose the `__version__` variable in the package
root to avoid a breaking change.

## Breaking change introduced in `3.1.0-0`

Users might programatically fetch the package version using
`runregistry.__version__`. From `3.1.0-0` users would have to access the
version using `runregistry.runregistry.__version__`.

## Test

### Before

```
>>> import runregistry
>>>
>>> runregistry.__version__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'runregistry' has no attribute '__version__'
>>>
>>> runregistry.runregistry.__version__
'3.1.0-0'
```

### After

```
>>> import runregistry
>>> runregistry.__version__
'3.1.0-0'
>>> runregistry.runregistry.__version__
'3.1.0-0'
```
@codecov
Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.52%. Comparing base (968704c) to head (2b54dff).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #14      +/-   ##
==========================================
+ Coverage   95.51%   95.52%   +0.01%     
==========================================
  Files           4        4              
  Lines         379      380       +1     
==========================================
+ Hits          362      363       +1     
  Misses         17       17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

gabrielmscampos added a commit that referenced this pull request Feb 15, 2025
@nothingface0 nothingface0 merged commit 3e35d69 into dev Feb 17, 2025
6 checks passed
@nothingface0
Copy link
Contributor

Thanks @gabrielmscampos !

@nothingface0 nothingface0 deleted the fix/expose-version-in-init branch February 17, 2025 10:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants