sqlalchemy / sqlalchemy/alembic

`alembic.config.Config('nonexisting.ini')` doesn't fail

Open
#931 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

expected behavior
Dominant language
Python
Stars
4.4k
Forks
375
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

The Config() object doesn't fail when a config file given in the constructor doesn't exist.

Expected behavior

Fail with an error if supplied config can not be found.

To Reproduce

>>> import alembic.config
>>> alembic.config.Config('nonexisting.ini')
<alembic.config.Config object at 0x7f5a2df6c280>

Versions.

  • Alembic: 1.7.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documented alembic.config.Config constructor and reproduce Config('nonexisting.ini') using the example in the issue. Trace how the supplied filename is handled, then verify that a missing configuration file produces an error instead of returning a Config object.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.