Releases: tonybaloney/CSnakes
v1.0.25
What's Changed
- Use system mutex in
RedistributableLocator
during installation by @atifaziz in #330 - reduce package installer noise in logs by @tonybaloney in #335
Full Changelog: v1.0.24...v1.0.25
v1.0.24
What's Changed
CSnakes now has the ability to install packages using uv
instead of pip
, which is significantly faster and improves app startup times.
Installing dependencies with uv
uv
is an alternative to pip that can also install requirements from a file like requirements.txt
or pyproject.toml
. UV has a major benefit in a 10-100x speedup over pip, so your CSnakes applications will be faster to start.
To use uv to install packages:
...
services
.WithPython()
.WithVirtualEnvironment(Path.Join(home, ".venv"))
.WithUvInstaller("requirements.txt"); // Optional - give the name of the requirements file, or pyproject.toml
Some other important notes about this implementation.
- Only uses uv to install packages and does not use uv to create projects or virtual environments.
- Must be used with
WithVirtualEnvironment()
, as pip requires a virtual environment to install packages into. - Will use the
UV_CACHE_DIR
environment variable to cache the packages in a directory if set. - Will disable the cache if the
UV_NO_CACHE
environment variable is set.
Features
- Add a UV package installer by @tonybaloney in #327
Bug Fixes
Other Updates
- Reduce logging noise and move pip/env output to debug logs by @tonybaloney in #325
- Reuse computed installation lock file path by @atifaziz in #328
Full Changelog: v1.0.23...v1.0.24
v1.0.23
What's Changed
This release has a new method for making it easier to distribute .NET packages which use a Python component by fetching Python for you, removing the need to install Python (or specify where it is).
You can replace all FromXXX()
locators with a single FromRedistributable()
and it will download Python 3.12, put it into %APP_DATA%/CSnakes and use that for all of the integration.
https://tonybaloney.github.io/CSnakes/reference/#redistributable-locator
In future, we will allow overriding the major Python version (to say, 3.13)
Major Improvements
- Add a new Locator that downloads and installs Python for you by @tonybaloney in #323
- Allow support for Conda environments being a different version of Python than Conda by @tonybaloney in #321
- Generate doc summaries with references to Python function by @atifaziz in #293
Bug Fixes
- Improved handling of name generation with single-character segments by @jozefhornik in #320
Other Changes
- Use
ReadOnlySpan
where writing isn't needed by @atifaziz in #282 - Enable F5 debugging of source generator in Visual Studio by @atifaziz in #281
- Make generated code pretty to read (and write) by @atifaziz in #280
- Optimise generator iterator type instantiation by @atifaziz in #285
- Set variance of
IGeneratorIterator<,,>
type parameters by @atifaziz in #286 - Get error cause once by @atifaziz in #287
- Complete generator support for return value by @atifaziz in #288
- Use
System.Threading.Lock
on .NET 9. by @AaronRobinsonMSFT in #289 - Target .NET 9 if SDK is available by @atifaziz in #294
- Add missing reference to Superpower in test project by @atifaziz in #297
- Rename tokenizers that are actually parsers by @atifaziz in #298
- Avoid temp compilation artefacts during source generator tests by @atifaziz in #300
- Update the Aspire demo to .net 9 and the new aspire releases by @tonybaloney in #312
- Update samples/simple references by @emmanuel-ferdman in #316
New Contributors
- @emmanuel-ferdman made their first contribution in #316
- @jozefhornik made their first contribution in #320
Full Changelog: v1.0.21...v1.0.22
v1.0.22
What's Changed
This release has a new method for making it easier to distribute .NET packages which use a Python component by fetching Python for you, removing the need to install Python (or specify where it is).
You can replace all FromXXX()
locators with a single FromRedistributable()
and it will download Python 3.12, put it into %APP_DATA%/CSnakes and use that for all of the integration.
https://tonybaloney.github.io/CSnakes/reference/#redistributable-locator
In future, we will allow overriding the major Python version (to say, 3.13)
Major Improvements
- Add a new Locator that downloads and installs Python for you by @tonybaloney in #323
- Allow support for Conda environments being a different version of Python than Conda by @tonybaloney in #321
- Generate doc summaries with references to Python function by @atifaziz in #293
Bug Fixes
- Improved handling of name generation with single-character segments by @jozefhornik in #320
Other Changes
- Use
ReadOnlySpan
where writing isn't needed by @atifaziz in #282 - Enable F5 debugging of source generator in Visual Studio by @atifaziz in #281
- Make generated code pretty to read (and write) by @atifaziz in #280
- Optimise generator iterator type instantiation by @atifaziz in #285
- Set variance of
IGeneratorIterator<,,>
type parameters by @atifaziz in #286 - Get error cause once by @atifaziz in #287
- Complete generator support for return value by @atifaziz in #288
- Use
System.Threading.Lock
on .NET 9. by @AaronRobinsonMSFT in #289 - Target .NET 9 if SDK is available by @atifaziz in #294
- Add missing reference to Superpower in test project by @atifaziz in #297
- Rename tokenizers that are actually parsers by @atifaziz in #298
- Avoid temp compilation artefacts during source generator tests by @atifaziz in #300
- Update the Aspire demo to .net 9 and the new aspire releases by @tonybaloney in #312
- Update samples/simple references by @emmanuel-ferdman in #316
New Contributors
- @emmanuel-ferdman made their first contribution in #316
- @jozefhornik made their first contribution in #320
Full Changelog: v1.0.21...v1.0.22
v1.0.21
What's Changed
Major improvements
- Added support for Hot Reload of Python code whilst debugging
Other changes
- Consolidate patterns for
IPyBuffer
by @atifaziz in #266 - Make type name patterns explicit where
typing.
qualification is optional by @atifaziz in #267 - Make generated signature tests stricter by @atifaziz in #268
- Add reload module functionality and connect generated classes to Hot Reload by @tonybaloney in #259
- Immortalising -1, 0 and 1 by @aaronpowell in #274
Full Changelog: v1.0.20...v1.0.21
v1.0.20
What's Changed
Full Changelog: v1.0.19...v1.0.20
v1.0.19
What's Changed
Major Changes
- Support macOS free-threaded mode by @tonybaloney in #22
- Add Conda Environment Management and Locator Support by @tonybaloney in #232
- Support single point precision downcast and conversion by @tonybaloney in #231
Bug fixes and Dev Changes
- Update README.md by @jamesmontemagno in #229
- Add github to docs page by @tonybaloney in #222
- Remove second package from aspire demo and fix warning on insecure ve… by @tonybaloney in #223
4 - Use invariant culture when converting float constant to string by @atifaziz in #245
- Pre-allocate list based on source length by @atifaziz in #206
- Improve Aspire sample using large data set and Pandas. Use buffer protocol in kmeans demo by @tonybaloney in #230
- Fix test for
NuGetLocator
whenNUGET_PACKAGES
is defined by @atifaziz in #233 - Refactor
PythonConstant
types into a true union by @atifaziz in #234 - Generate fields per function instead of dictionary by @atifaziz in #236
- Bump System.Text.Json from 8.0.4 to 8.0.5 in /samples/Aspire/CSnakesAspire.AppHost by @dependabot in #246
- Use 3.13 GA by @tonybaloney in #247
- Bump versions by @RussKie in #252
- Fixing how the assemblies are referenced in NuGet by @aaronpowell in #253
- Have generated module interfaces inherit from
IDisposable
by @atifaziz in #249 - Consolidate redundant patterns in
MethodReflection.FromMethod
by @atifaziz in #248 - Fix GIL acquisition during Python runtime finalization by @atifaziz in #239
New Contributors
- @jamesmontemagno made their first contribution in #229
- @dependabot made their first contribution in #246
Full Changelog: v1.0.18...v1.0.19
v1.0.18
Main Changes
- Raised Exceptions support
InnerException
where the Python exception has a__cause__
property - Converged to a single package,
CSnakes.Runtime
- Support .NET 9
- Support for Buffer protocol
What's Changed
- Qualified typenames by @tonybaloney in #182
- Add integer overflow test by @tonybaloney in #185
- Optimize Managed -> Python dictionary conversions by @tonybaloney in #184
- Use integrated eventing for the profile project by @tonybaloney in #186
- Fix path to read-me doc in VS solution file by @atifaziz in #191
- Fix NuGet packages override path combination by @atifaziz in #190
- Use CI version of Python by @RussKie in #194
- Fix broken links to examples in docs by @atifaziz in #197
- Have direct integration example implement
IDisposable
by @atifaziz in #198 - Resolve reported paths by @RussKie in #196
- Make PyDictionary and PyList convertable back to PyObject without marshalling by @tonybaloney in #200
- Run Windows tests against the supplied Python version by @RussKie in #203
- Fix CS8604 (possible null dereferencing) warnings by @atifaziz in #205
- Parser supports additional syntax for type arguments by @tonybaloney in #201
- Reuse
PyEnumerable
, removing need forPyKeyValuePairEnumerable
by @atifaziz in #204 - Support .NET 9 by @RussKie in #202
- Reference Tensor by @RussKie in #213
- Add support for inner exceptions using the cause property. by @tonybaloney in #215
- Convert ndarray scalars to Span using the buffer protocol by @tonybaloney in #187
- Rename CSnakes project to CSnake.SourceGeneration and unify nupkgs by @RussKie in #211
- Improve test coverage by @RussKie in #217
- Fix LD_PRELOAD workarounds by @tonybaloney in #220
- Adding F# sample by @aaronpowell in #207
New Contributors
Full Changelog: v1.0.17...v1.0.18
v1.0.17
What's Changed
- Add methods to
PyObject
forIs
,Equals
andNotEquals
by @tonybaloney in #151 - Aspire tracing tweaks by @tonybaloney in #158
- Chill the logging out a bit by @tonybaloney in #157
- Implement <, >, <=, >= by @AaronRobinsonMSFT in #156
- Compiler conversions by @aaronpowell in #171
- Improve performance by 2x and add a basic benchmark test by @tonybaloney in #159
- Reducing the calls to ConvertTo/ConvertFrom so we can refactor them easier by @aaronpowell in #174
- Make the returned dictionary and list types lazy by @tonybaloney in #178
Internals
- refactor the profile into a benchmark by @tonybaloney in #175
- Caching nuget packages between runs by @aaronpowell in #160
- More work on test reporting by @aaronpowell in #155
- Experimenting with test reporter by @aaronpowell in #152
Full Changelog: v1.0.16...v1.0.17
v1.0.16
What's Changed
- Marshal
SafeHandle
impls through the P/Invoke by @AaronRobinsonMSFT in #137 - Public method for creating a PyObject from a CLR type. by @aaronpowell in #138
- Allow conversion between Python
int
andSystem.Numerics.BigInteger
by @tonybaloney in #136 - Don't use the TypeConverter API directly from the source generator or docs by @tonybaloney in #139
- Use NUGET_PACKAGES override in Nuget locator by @tonybaloney in #143
- Fixing how we generate packages with debug info by @aaronpowell in #145
- Implement Generator Iterators by @tonybaloney in #141
- type converter perf by @aaronpowell in #149
- Add IsNone and None static attribute for PyObject by @tonybaloney in #148
New Contributors
- @AaronRobinsonMSFT made their first contribution in #137
Full Changelog: v1.0.15...v1.0.16