GeezerVison is showing github.com — Uses GitHub Actions for tests and releases. by fdcastel · Pull Request #61 · FirebirdSQL/python3-driver
Conversation
fdcastel
commented
Nov 18, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fix #60.
ToDo:
- Update tests to use remote Firebird servers
- Use Docker for Firebird server
- Run tests on Linux
- Build and publish to GitHub Releases
- Run tests on Windows
- Set Python package version from Git Tag.
- Publish to PyPI (just test on official repository, after merge)
Abandoned:
-
Publish to GitHub Packages (unsupported)
Remarks:
- Tests no longer require a local Firebird server.
- They now run in the CI workflow using official Firebird Docker images.
- Unofficial builds are available at: https://github.com/fdcastel/python3-driver/releases
- The workflow should now publish to PyPI upon correct configuration.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
mariuz reacted with thumbs up emoji
|
Fixed the version using hatch-vcs.
Summary:
hatch-vcs automatically detects versions from git tags (e.g., v2.0.3-beta1 → 2.0.3b1)
- When you push a tag like
v2.0.3-beta1, the workflow will build packages with the correct version
- No manual version updates needed - just create and push git tags
- The version is baked into the package metadata at build time
- The
__VERSION__ variable imports from the package metadata at runtime
Tag Format:
hatch-vcs follows PEP 440 conventions:
v2.0.3 → 2.0.3
v2.0.3-beta1 → 2.0.3b1
v2.0.3-rc1 → 2.0.3rc1
v2.0.3-alpha1 → 2.0.3a1
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
fdcastel
commented
Apr 18, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Finally marked the last remaining task in this PR as completed 🎉
Replaced the old Docker CI setup (Linux-only) with PSFirebird, enabling a unified workflow that runs on both Ubuntu and Windows across Firebird 3, 4 and 5.
Main change: CI rewrite (ci.yml)
- PSFirebird v1.2.2 is installed in each job to manage Firebird lifecycle (download, configure, start, stop).
- SYSDBA initialization: archive-extracted Firebird ships with an empty security database. The workflow creates SYSDBA via an embedded
isql connection before starting the TCP server.
ISC_USER / ISC_PASSWORD are set as job-level env vars so the driver test suite picks them up automatically.
firebird.log seeding: the Service API get_log() tests assert the log is non-empty. An archive-extracted Firebird never writes startup messages to this file, so we seed it before the server starts.
- Client library path:
FirebirdEnvironment.GetClientLibraryPath() is used to pass the correct library path to the test suite on both platforms (no more OS-conditional path guessing).
Minor bugs fixed
These were uncovered while getting the test matrix fully green and are small enough not to warrant their own issues:
-
conftest.py — Path → str conversion for fb_client_library (tests/conftest.py): The driver_config.fb_client_library option is a StringOption and rejects Path objects. The fix is a one-character change (wrap with str()).
-
_connect_helper — missing / separator for Windows paths in protocol URLs (src/firebird/driver/core.py): When building inet:// URLs with a host, Windows drive-letter paths were concatenated directly onto the host string, producing malformed URLs like inet://localhost:3050D:\path. Added the / separator so the result is inet://localhost:3050/D:\path, which Firebird parses correctly.
-
test_connect_config — spurious utf8filename = true (tests/test_connection.py): The database config used in this test included utf8filename = true. That option causes the Firebird engine to interpret the filename as UTF-8 bytes, which breaks attachment on Windows with drive-letter paths, producing "unavailable database". Removed the option since test_connect_config is testing config-based connection routing, not UTF-8 filename encoding.
-
test_connect_helper — expected DSN values updated (tests/test_connection.py): The unit-test assertions for _connect_helper with Windows paths and a host in protocol-URL mode were updated to match the corrected (now correct) URL format.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Use PSFirebird (v1.2.2+) instead of Docker to run Firebird on both Ubuntu
and Windows runners. This removes the platform split where Linux used Docker
and Windows was untested.
Changes:
- Install PSFirebird module in each CI job
- Use New-FirebirdEnvironment / Start-FirebirdInstance / Stop-FirebirdInstance
to manage Firebird lifecycle on both platforms
- Initialize SYSDBA via embedded isql (archive-extracted Firebird ships with
an empty security database; embedded connections bypass authentication)
- Set ISC_USER / ISC_PASSWORD env vars at job level for driver test auth
- Seed firebird.log before server start so Service API get_log() tests pass
(archive-extracted Firebird never writes startup messages to this file)
- Use GetClientLibraryPath() on the FirebirdEnvironment object to pass the
correct client library to the test suite on both platforms
- Fix LASTEXITCODE false-failure workaround (PSFirebird 1.2.2 fixes the leak
in Get-FirebirdEnvironment / New-FirebirdEnvironment)
Minor bugs fixed (no separate Issue/PR needed):
- Convert client_lib Path to str before assigning to driver_config
(Path objects are not accepted by the StringOption config field)
- Fix inet:// protocol URL construction for Windows drive-letter paths:
_connect_helper was missing the '/' separator before the database path
when host is set, producing malformed URLs like inet://host:3050D:\\path
- Remove spurious utf8filename=true from test_connect_config database config
(caused 'unavailable database' on Windows when attaching to an existing DB)
- Fix test_connect_helper expected DSN values to match the corrected URL format
|
Rebased onto latest master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Publish from GitHub Actions?
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|