Commit a488081
fix(python): derive __version__ from package metadata; align Node version sentinel (#1521)
* fix(python): derive __version__ from package metadata with dev sentinel
The Python SDK hardcoded __version__ = "0.1.0" in copilot/__init__.py and
version = "0.1.0" in pyproject.toml. The publish workflow only rewrites
pyproject.toml at release time, so the public runtime __version__ drifted
and always reported a stale version regardless of what was published.
Derive __version__ from installed package metadata via importlib.metadata,
falling back to a 0.0.0.dev0 sentinel (instead of a real-looking version)
when no metadata is present. Set the committed pyproject.toml version to the
same dev sentinel, matching the .NET and Rust SDKs; CI injects the real
version at publish time.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore(nodejs): use 0.0.0-dev version sentinel for consistency
The Node SDK committed a real-looking version (0.1.8) in package.json and
reset to 0.1.0 in the package script, unlike the .NET and Rust SDKs which
use a 0.0.0-dev sentinel. CI injects the real version at publish via
set-version.js, so the committed value should be an unmistakable dev
placeholder rather than a stale real version.
Align package.json, the package script, set-version.js default, and the
package-lock.json files (including nodejs/samples) to 0.0.0-dev.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 4d2df4c commit a488081
6 files changed
Lines changed: 20 additions & 8 deletions
File tree
- nodejs
- samples
- scripts
- python
- copilot
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
148 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
149 | 158 | | |
150 | 159 | | |
151 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
0 commit comments