FS#78798 - [python-hatch] Add python-tomli as dependency

Attached to Project: Arch Linux
Opened by Andrew Martens (mrtilo) - Thursday, 15 June 2023, 19:13 GMT
Last edited by Toolybird (Toolybird) - Thursday, 15 June 2023, 20:45 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I have run `hatch new --init` and run into the following error:

```
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/lib/python3.11/site-packages/hatch/cli/__init__.py:206 in main │
│ │
│ 203 │
│ 204 def main(): # no cov │
│ 205 │ try: │
│ ❱ 206 │ │ return hatch(prog_name='hatch', windows_expand_args=False) │
│ 207 │ except Exception: │
│ 208 │ │ from rich.console import Console │
│ 209 │
│ │
│ /usr/lib/python3.11/site-packages/click/core.py:1130 in __call__ │
│ │
│ /usr/lib/python3.11/site-packages/click/core.py:1055 in main │
│ │
│ /usr/lib/python3.11/site-packages/click/core.py:1654 in invoke │
│ │
│ /usr/lib/python3.11/site-packages/click/core.py:1404 in invoke │
│ │
│ /usr/lib/python3.11/site-packages/click/core.py:760 in invoke │
│ │
│ /usr/lib/python3.11/site-packages/click/decorators.py:26 in new_func │
│ │
│ /usr/lib/python3.11/site-packages/hatch/cli/__init__.py:123 in hatch │
│ │
│ 120 │ │ │ app.display_waiting('No config file found, creating one with default setting │
│ 121 │ │ │
│ 122 │ │ try: │
│ ❱ 123 │ │ │ app.config_file.restore() │
│ 124 │ │ │ if app.verbose: │
│ 125 │ │ │ │ app.display_success('Success! Please see `hatch config`.') │
│ 126 │ │ except OSError: # no cov │
│ │
│ /usr/lib/python3.11/site-packages/hatch/config/user.py:47 in restore │
│ │
│ 44 │ │ return tomli_w.dumps(config.raw_data) │
│ 45 │ │
│ 46 │ def restore(self): │
│ ❱ 47 │ │ import tomli_w │
│ 48 │ │ │
│ 49 │ │ config = RootConfig({}) │
│ 50 │ │ config.parse_fields() │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'tomli_w'
```

The error went away after `sudo pacman -S python-tomli-w`

I believe `python-tomli-w` should be added as dependency
This task depends upon

Closed by  Toolybird (Toolybird)
Thursday, 15 June 2023, 20:45 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#75479 

Loading...