Skip to content

protobuf and Python 3.6 compatibility problems - drop support for Python 3.6, support 3.7? #626

@benma

Description

@benma

Hi

tl;dr: can HWI drop support for Python 3.6 to be in line with the up to date protobuf package version, which also dropped support for Python 3.6? Also, Python 3.6 reached end-of-life on Dec 23, 2021 and is not receiving security fixes anymore.

Details:

protobuf v3.20 introduced a breaking change:

*[Breaking change] Protobuf Python generated codes are simplified. Descriptors and message
classes' definitions are now dynamic created in internal/builder.py.

This resulted in BitBox02 users reporting errors when using HWI (example) - their local protobuf version was higher than v3.20. To fix this, the bitbox02 dep now requires protobuf higher than 3.20 (PR), with updated protobuf files, and we released this as bitbox02 6.1.0.

Now I tried to update the HWI bitbox02 dep from 6.0.0 to 6.1.0, to solve this bug for e.g the Sparrow user above.

The problem is that the new protobuf version (from v3.20) requires Python 3.7, see this error when attempting to generate the poetry lock file for HWI after updating the bitbox02 version to 6.1.0:

  The current project's Python requirement (>=3.6,<4.0) is not compatible with some of the required packages Python requirement:
    - protobuf requires Python >=3.7, so it will not be satisfied for Python >=3.6,<3.7
    - protobuf requires Python >=3.7, so it will not be satisfied for Python >=3.6,<3.7
    - protobuf requires Python >=3.7, so it will not be satisfied for Python >=3.6,<3.7
    - protobuf requires Python >=3.7, so it will not be satisfied for Python >=3.6,<3.7
    - protobuf requires Python >=3.7, so it will not be satisfied for Python >=3.6,<3.7
                                                                                                                      
  Because no versions of protobuf match >=3.21,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4
   and protobuf (4.21.0) requires Python >=3.7, protobuf is forbidden.
  And because protobuf (4.21.1) requires Python >=3.7
   and protobuf (4.21.2) requires Python >=3.7, protobuf is forbidden.
  And because protobuf (4.21.3) requires Python >=3.7
   and protobuf (4.21.4) requires Python >=3.7, protobuf is forbidden.
  Because no versions of bitbox02 match >6.1.0,<7.0.0
   and bitbox02 (6.1.0) depends on protobuf (>=3.21), bitbox02 (>=6.1.0,<7.0.0) requires protobuf (>=3.21).
  Thus, bitbox02 is forbidden.             
  So, because hwi depends on bitbox02 (>=6.1.0,<7.0.0), version solving failed.

Can I make a PR that drops support for Python 3.6, requiring Python >=3.7?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions