dynamist / phabfive

A command line tool to interact with Phabricator
Apache License 2.0
4 stars 2 forks source link

python-anyconfig 0.12.x introduces backward incompatible handling of ignore_missing #39

Closed holmboe closed 2 years ago

holmboe commented 2 years ago

Environment

Steps to Reproduce

  1. Clone master branch from GH
  2. pipenv install -e .
  3. Try to execute phabfive K1 and watch it error out

Expected Behavior

It to return the K1 passphrase.

Observed Behavior

Traceback (most recent call last):
  File "/home/nn/code/github.com/dynamist/phabfive/.venv/bin/phabfive", line 11, in <module>
    load_entry_point('phabfive', 'console_scripts', 'phabfive')()
  File "/home/nn/code/github.com/dynamist/phabfive/phabfive/cli.py", line 278, in cli_entrypoint
    sys.exit(run(cli_args, sub_args))
  File "/home/nn/code/github.com/dynamist/phabfive/phabfive/cli.py", line 169, in run
    p = passphrase.Passphrase()
  File "/home/nn/code/github.com/dynamist/phabfive/phabfive/passphrase.py", line 22, in __init__
    super(Passphrase, self).__init__()
  File "/home/nn/code/github.com/dynamist/phabfive/phabfive/core.py", line 50, in __init__
    self.conf = self.load_config()
  File "/home/nn/code/github.com/dynamist/phabfive/phabfive/core.py", line 114, in load_config
    anyconfig.load(site_conf_file, ignore_missing=True)
  File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/api/_load.py", line 295, in load
    return single_load(iois[0], ac_parser=ac_parser, ac_dict=ac_dict,
  File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/api/_load.py", line 146, in single_load
    cnf = _single_load(ioi, ac_parser=ac_parser, ac_template=ac_template,
  File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/api/_load.py", line 86, in _single_load
    return psr.load(ioi, **options)
  File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/backend/base/loaders.py", line 208, in load
    cnf = self.load_from_path(ioi.path, container, **options)
  File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/backend/base/loaders.py", line 289, in load_from_path
    with self.ropen(filepath) as inp:
  File "/home/nn/code/github.com/dynamist/phabfive/.venv/lib/python3.8/site-packages/anyconfig/backend/base/loaders.py", line 74, in ropen
    return open(  # pylint: disable=consider-using-with
FileNotFoundError: [Errno 2] No such file or directory: '/etc/phabfive.yaml'
holmboe commented 2 years ago

pip install -U anyconfig==0.11.1 gives the same error as described in this bug.

pip install -U anyconfig==0.10.1 makes it work as expected again. `