Skip to content

Conversation

@enobayram
Copy link
Contributor

Fixes #125

Seems like char columns can be wrapped as bytes values under certain circumstances. See #125

@enobayram
Copy link
Contributor Author

Not sure how to properly test these changes, since I don't know what realistic circumstances would cause the char columns to turn to bytes values on the Python side.

@codecov
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.81%. Comparing base (9c82d77) to head (7915f4e).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #126   +/-   ##
=======================================
  Coverage   89.81%   89.81%           
=======================================
  Files          86       86           
  Lines        4056     4056           
  Branches      841      841           
=======================================
  Hits         3643     3643           
  Misses        336      336           
  Partials       77       77           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Owner

@DanCardin DanCardin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test would probably be to do all postgres testing on asyncpg (since i believe im only doing psycopg3 right now, if anything?)

but adding a whole extra driver would be a more involved test refactor, so this is fine as-is!

@DanCardin
Copy link
Owner

Mind bumping the project patch version and adding it to the changelog, and i can release the merged PR directly?

@YaraslauZhylko
Copy link

YaraslauZhylko commented Aug 22, 2025

I applied those changes, and it works on my asyncpg setup:

$ poetry run alembic check
[info     ] Context impl PostgresqlImpl.   [alembic.runtime.migration]
[info     ] Will assume transactional DDL. [alembic.runtime.migration]
No new upgrade operations detected.
$ poetry run alembic downgrade -1
[info     ] Context impl PostgresqlImpl.   [alembic.runtime.migration]
[info     ] Will assume transactional DDL. [alembic.runtime.migration]
[info     ] Running downgrade 00226 -> 00225, Remove unique constraint from the 'test' table. [alembic.runtime.migration]
$ poetry run alembic upgrade head
[info     ] Context impl PostgresqlImpl.   [alembic.runtime.migration]
[info     ] Will assume transactional DDL. [alembic.runtime.migration]
[info     ] Running upgrade 00225 -> 00226, Remove unique constraint from the 'test' table. [alembic.runtime.migration]

Seems like `char` columns can be wrapped as `bytes` values under certain circumstances. See DanCardin#125
@enobayram enobayram force-pushed the explicit-text-cast-for-pg_proc-char-columns branch from 3a30204 to 7915f4e Compare August 22, 2025 06:04
@enobayram
Copy link
Contributor Author

@YaraslauZhylko Thanks for confirming.

@DanCardin done!

@DanCardin DanCardin merged commit 48cee2e into DanCardin:main Aug 22, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alembic check fails with invalid volatility value

3 participants