- Add pyproject.toml with setuptools build requirement for PEP 517 compliance
- Replace distutils imports with setuptools equivalents
- Use setuptools error names directly (CompileError, ExecError, PlatformError)
- Fix macOS header collision with ntohll/htonll macros in endian.h
- Add a matrix of MacOS versions (macos-15-intel, macos-14, macos-15,
macos-26)
- Add a matrix of non-EOL Python versions for testing
- Remove MSVC2015 from the test matrix (very old).
- Support MSVC2022, the latest in AppVeyor.
- Upgrade tornado, twisted, and zope.interface versions to the first
that support Python 3.12.
- Try to make the test_socket, RunClientServer, and TestServer tests less flaky.
This fixes the ModuleNotFoundError: No module named 'distutils' error
when building thrift with Python 3.12+.
Add a new `cpp:private_optional` generator option for C++ that emits optional fields as private members and provides const getters, enabling stricter encapsulation while preserving access for generated helpers.
To keep the feature stable and exercised in automation, add fixture-based compiler tests and the minimal build/CI wiring required for those tests to build and run in the workflow (including MSVC).
### Example generated code (behavior change only, from `TestStruct`)
#### Default (no `cpp:private_optional`): optional fields stay public
```cpp
public:
int32_t required_field;
int32_t optional_field;
std::string optional_string;
```
With cpp:private_optional: optional fields become private + const getters
```cpp
public:
int32_t required_field;
const int32_t& __get_optional_field() const { return optional_field; }
const std::string& __get_optional_string() const { return optional_string; }
private:
int32_t optional_field;
std::string optional_string;
friend void swap(TestStruct &a, TestStruct &b) noexcept;
friend std::ostream& operator<<(std::ostream& out, const TestStruct& obj);
```
Client: py
Patch: Carel Combrink
This closes#3239
- Disclaimer: Claude came up with this
- Python 3.14 made files explicitly unpicklable for reasons
- The out can't be pickled in SummaryReporter
- stop in TestDispatcher is an instance method that should not be captured
Delay the imports to where they are needed
- Claude believes this is due to the way that the server is called vs the client is called and the server does not have enough time to set up completely
Attempt to fix issue with python 3.14
- Looks like python is getting more strict about scoping
- Decided to go with a local option instead of global or module variable
When a pre-release is created on GitHub for the repo it will publish
to the TestPyPI service, and if that pre-release is promoted to a
release, it will publish to the PyPI (real) service.
* Temporarily switch off shared build
- See THRIFT-5898
* Skip type_hints tests for python lower than 3.7
- PR#2929 called out that the changes breaks Python 3.5 since types came in in 3.6
- Python 3.6 errors out with 'from __future__ import annotations' since it looks like it was only added in 3.7
* More appveyer issues on Windows due to old python
* Remove enum tests for old python versions
- Getting `raise TApplicationException(TApplicationException.MISSING_RESULT, "testEnum failed: unknown result"` error
- PR#2825 state it is a breaking change, not sure why and for what version of Python
* Disable SSL tests for old Python
- Appveyor error: ` AttributeError: module 'ssl' has no attribute 'PROTOCOL_TLS_CLIENT'`
* Can't get the test to skip so revert the change that broke it
- See PR#3050
* THRIFT-5900: Pin the cross test stage to python 3.13
- See https://issues.apache.org/jira/browse/THRIFT-5900
- Remove usage of v0.16 thrift files for C++ since UUID support was added
- Need to install the locals for some of the unit tests
- Fix UUID support for THeaderProtocol
- Without this the protocol went into an infinite loop due to virtual function calls that recursed to itself
- Best case was a crash, worst case was process got stuck
- Fix UUID support for TProtocolTap
- Sorted the known failures
- Mark cpp and java ssl tests as known failures
1. Comment in the middle of multi-line shell command joined by \ does
not work, change to multiple individual commands instead.
2. Fix a py 2vs3 compat issue missed in 24df0a5 used in cross runner.
Client: nodets
This adds the tests for the "nodets" library. This isn't an actual library, and are just another set of tests for the nodejs library, but also using typescript. Therefore I have added them in the existing "nodejs" job.
Client: rust
This upgrades the version of rust in the rust-toolchain file, docs and dockerfiles. Doing so requires a few changes to the source, mainly to fix or silence new warnings.
Submitted on behalf of a third-party: Jiayu Liu
Derived from the following PR: https://github.com/apache/thrift/pull/3045
Co-authored-by: Jiayu Liu <jiayu@hey.com>
These tests exist, but don't currently run on github actions. This adds a new job to run these.
This also fixes the regression in the tests caused by https://github.com/apache/thrift/pull/3014.
* cmake to build with java and kotlin
* add kotlin
* turn off python in cmake
* cmake and cpack
---------
Co-authored-by: Jiayu Liu <jiayu.liu@airbnb.com>
Build and test the netstd library so there is some basic testing.
Run tests on ubuntu-22.04, as 20.04 wil be EoL soon and also had some issues with dotnet-sdk.
There were some recent changes causing six to be installed on the `make
install` step instead of (implicitly) on the `Python setup` step before,
and the six installed on `make install` step was not available to the
next `make check` step and causing errors.
Install six on `Python setup` step explicitly instead.
Client: go
With the release of go 1.23, update supported go versions to 1.22+1.23
according to our go support policy.
Also update the code to use the new range loop feature introduced in go
1.22 when appropriate.
Also fix a bug in TSSLServerSocket.Addr that it does not return the
listener address.