GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Uses GitHub Actions for tests and releases. by fdcastel · Pull Request #61 · FirebirdSQL/python3-driver

Conversation

@fdcastel

@fdcastel fdcastel commented Nov 18, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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
All reactions
  • 👍 1 reaction
@fdcastel fdcastel changed the title Fix issue 60 Uses GitHub Actions for tests and releases. Nov 18, 2025
@fdcastel

fdcastel commented Nov 18, 2025

Copy link
Copy Markdown
Member Author

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@fdcastel
fdcastel force-pushed the fix-issue-60 branch from e1d9bab to 5986725 Compare April 18, 2026 01:36
@fdcastel

fdcastel commented Apr 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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:

  1. 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()).

  2. _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.

  3. 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.

  4. 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@fdcastel
fdcastel force-pushed the fix-issue-60 branch 2 times, most recently from aef9aa7 to a0ae985 Compare April 18, 2026 01:59
fdcastel added 7 commits April 17, 2026 22:59
@fdcastel
Add GitHub Actions CI workflow for testing and releases
1ca207a
@fdcastel
Fix DSN construction for remote server connections
7a8fc18
@fdcastel
Update test configuration to support remote servers with Docker
e97bd25
@fdcastel
Update tests to support remote server connections
571bc0a
@fdcastel
ci: Enable PyPI publishing for official repository builds.
b39beac
@fdcastel
ci: Adds hatch-vcs.
7397e04
@fdcastel
ci: replace Docker with PSFirebird for unified Windows/Linux testing
a0ae985
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
@fdcastel

fdcastel commented Apr 18, 2026

Copy link
Copy Markdown
Member Author

Rebased onto latest master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

1 participant

@fdcastel
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.