-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prepend_sys_path does not work with absolute paths on windows #1330
Labels
Comments
zzzeek
added
bug
Something isn't working
configuration
and removed
requires triage
New issue that requires categorization
labels
Oct 19, 2023
PRs with tests welcome here |
mwerezak
added a commit
to mwerezak/alembic
that referenced
this issue
Oct 19, 2023
Don't split using colons on windows Fixes sqlalchemy#1330
Proposed in #1331 we add a new config value with legacy fallback behavior as follows:
|
it's probably the most sensible option. it makes little sense to have the two paths in the config handled in a different way |
I guess if we were on pyproject.toml this whole thing would be a non issue since it supports lists :) |
does not support |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
If you put an absolute path in
prepend_sys_path
in your alembic.ini on windows (which will happen if you use%(here)s
), the path will get split on the':'
character that separates the drive letter.Expected behavior
Absolute paths to not get broken.
To Reproduce
Use an absolute path in
prepend_sys_path
likeC:/something
or%(here)s/something
Then print out
sys.path
, e.g.for path in sys.path: print(path)
you get:# Insert code here
Error
ModuleNotFoundError: No module named ...
because env.py can't import my modules.
Versions.
Additional context
alembic/alembic/script/base.py
Lines 212 to 218 in 3e48ed0
The text was updated successfully, but these errors were encountered: