# Module Package versioning: Best-practice?

**URL:** https://discuss.tryton.org/t/module-package-versioning-best-practice/7071
**Category:** Developer
**Created:** [March 8, 2024, 11:17pm UTC](https://discuss.tryton.org/t/module-package-versioning-best-practice/7071 "2024-03-08T23:17:54Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![htgoebel](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/htgoebel/32/1256_2.png) [@htgoebel](https://discuss.tryton.org/u/htgoebel)
#### Post date: [March 8, 2024, 11:17pm UTC](https://discuss.tryton.org/t/module-package-versioning-best-practice/7071/1 "2024-03-08T23:17:54Z")

</div>

I’m trying to make up my mind about version numbers for 3rd-party module packages.

Official Tryton modules have their version numbers aligned with the version of trytond. This makes sense since they belong to the same “product”.

For 3d-party modules I’ve seen quite some using the same scheme. Just a few weeks ago I learned that some are not following this schema but [give versions to their modules as it suites. them](https://discuss.tryton.org/t/remove-support-for-entry-points-for-all-supported-series/6846/5).

I’d like to hear your opinion/ and thought: For 3rd-party modules:

1. Does is make sense to align the module version with the supported Tryton version?
2. Does it make sense to `require` specific (supported) version of trytond and modules?
3. Does it make sense to list the supported Python versions in the PyPI classifiers?
4. Would it be useful to have PyPI classifiers for Tryton versions (like Django and Odoo)?

I’m looking forward reading your thoughts.

---

<div class="post-metadata">

### Author: ![yangoon](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/y/67e7ee/32.png) [@yangoon](https://discuss.tryton.org/u/yangoon)
#### Post date: [March 9, 2024, 4:32pm UTC](https://discuss.tryton.org/t/module-package-versioning-best-practice/7071/2 "2024-03-09T16:32:36Z")

</div>

> [@htgoebel](#):
>
> - Does is make sense to align the module version with the supported Tryton version?

For me: yes. A module should declare in some way the used API. If you don’t follow the trytond versioning you have to declare in some way a mapping with which trytond API (=version) you are compatible (e.g. gnuhealth modules), which is always an additional maintenance load.

At least that is the easiest way. If you are deploying from source it may be sufficient to read API compatibility via the branches of the VCS, if they are maintained in one.

> [@htgoebel](#):
>
> Does it make sense to `require` specific (supported) version of trytond and modules?

If your module depends on a specific trytond version (=API), then ist should be declared.

> [@htgoebel](#):
>
> Does it make sense to list the supported Python versions in the PyPI classifiers?

Of course it is nice to know explicitly about supported Python versions. OTOH those classifiers tend more easily to get out of sync. More important is the declaration of the minimal required Python version in your packaging.

> [@htgoebel](#):
>
> Would it be useful to have PyPI classifiers for Tryton versions (like Django and Odoo)?

Could you point me to an example? I didn’t find such a classifier for [django](https://github.com/django/django/blob/main/setup.cfg).

---

<div class="post-metadata">

### Author: ![udono](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/udono/32/2114_2.png) [@udono](https://discuss.tryton.org/u/udono)
#### Post date: [March 12, 2024, 7:59pm UTC](https://discuss.tryton.org/t/module-package-versioning-best-practice/7071/3 "2024-03-12T19:59:28Z")

</div>

> [@yangoon](#):
>
> Could you point me to an example? I didn’t find such a classifier for [django](https://github.com/django/django/blob/main/setup.cfg).

When you lookup the [Classifiers · PyPI](https://pypi.org/classifiers/) for Django you can find the versions. E.g. [Framework :: Django :: 1.11](https://pypi.org/search/?c=Framework+%3A%3A+Django+%3A%3A+1.11)

---

<div class="post-metadata">

### Author: ![yangoon](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/y/67e7ee/32.png) [@yangoon](https://discuss.tryton.org/u/yangoon)
#### Post date: [March 12, 2024, 8:30pm UTC](https://discuss.tryton.org/t/module-package-versioning-best-practice/7071/4 "2024-03-12T20:30:35Z")

</div>

And where are they used?

---

<div class="post-metadata">

### Author: ![htgoebel](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/htgoebel/32/1256_2.png) [@htgoebel](https://discuss.tryton.org/u/htgoebel)
#### Post date: [March 15, 2024, 9:33am UTC](https://discuss.tryton.org/t/module-package-versioning-best-practice/7071/5 "2024-03-15T09:33:42Z")

</div>

They are used (only) as categories when searching packages in PyPI WebUI. pip does not care about them.

---

<div class="post-metadata">

### Author: ![yangoon](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/y/67e7ee/32.png) [@yangoon](https://discuss.tryton.org/u/yangoon)
#### Post date: [March 24, 2024, 9:51am UTC](https://discuss.tryton.org/t/module-package-versioning-best-practice/7071/6 "2024-03-24T09:51:19Z")

</div>

Yes, but the [main project](https://github.com/django/django/blob/main/setup.cfg) seems to not care about which makes them questionable IMHO.
