Skip to content

Commit

Permalink
build requirements: colorama grew a new build-time dependency :/
Browse files Browse the repository at this point in the history
or more like four:
```
$ pipdeptree
hatchling==1.11.1
  - editables [required: >=0.3, installed: 0.3]
  - packaging [required: >=21.3, installed: 21.3]
    - pyparsing [required: >=2.0.2,!=3.0.5, installed: 3.0.9]
  - pathspec [required: >=0.10.1, installed: 0.10.1]
  - pluggy [required: >=1.0.0, installed: 1.0.0]
  - tomli [required: >=1.2.2, installed: 2.0.1]
```

Let's monitor how the situation evolves, and whether other packages start requiring hatchling,
but for now I am not going to add four new packages into the trusted base set...
Pinning colorama to an older version for now.

related:
tartley/colorama#338
tartley/colorama#349
  • Loading branch information
SomberNight committed Nov 5, 2022
1 parent 326f8c4 commit 590abec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/requirements/requirements-build-android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ sh

# needed by python-for-android:
appdirs
colorama>=0.3.3
# colorama upper bound to avoid needing hatchling
colorama>=0.3.3,<0.4.6
jinja2
sh>=1.10
pep517
Expand Down
5 changes: 5 additions & 0 deletions contrib/requirements/requirements-hw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ pyserial>=3.5.0,<4.0.0
# prefer older protobuf (see #7922)
# (pulled in via e.g. keepkey and bitbox02)
protobuf>=3.12,<4

# prefer older colorama to avoid needing hatchling
# (pulled in via trezor -> click -> colorama)
# (pulled in via safet -> click -> colorama)
colorama<0.4.6

7 comments on commit 590abec

@ofek
Copy link

@ofek ofek commented on 590abec Nov 9, 2022

Choose a reason for hiding this comment

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

@mgorny
Copy link

@mgorny mgorny commented on 590abec Jan 4, 2023

Choose a reason for hiding this comment

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

@ofek, do you happen to have a link to a relevant discussion where the choice of hatchling was justified? I can't imagine the pain this is going to cause us when more projects choose to introduce cyclic dependencies between themselves and hatchling.

@ofek
Copy link

@ofek ofek commented on 590abec Jan 4, 2023

Choose a reason for hiding this comment

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

What do you mean by cyclic dependencies?

@mgorny
Copy link

@mgorny mgorny commented on 590abec Jan 4, 2023

Choose a reason for hiding this comment

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

What do you mean by cyclic dependencies?

I mean something like hatchling requiring editables, and editables requiring hatchling. You can't use hatchling until you install editables but you can't build wheel for editables until you install a working hatchling.

@ofek
Copy link

@ofek ofek commented on 590abec Jan 4, 2023

Choose a reason for hiding this comment

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

It uses setuptools https://github.com/pfmoore/editables/blob/main/setup.py

Hatchling has no cyclic dependencies that I am aware of

@mgorny
Copy link

@mgorny mgorny commented on 590abec Jan 4, 2023

Choose a reason for hiding this comment

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

Right now, yes. However, as it grows in popularity more projects will be using it, and then it could become a problem.

@ofek
Copy link

@ofek ofek commented on 590abec Jan 4, 2023

Choose a reason for hiding this comment

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

This bootstrapping problem is known which is why Hatchling will always have very few dependencies and special care is taken to make sure that no dependency uses Hatchling for builds. This will never be a problem 🙂

Please sign in to comment.