Skip to content

How to provide version in a CPython compatible way. #1173

Closed
@danicampora

Description

@danicampora

In d460a30
@dpgeorge commented:

There was a discussion in #440 about how to provide the "version" in a CPython compatible way. The outcome of that discussion was to use sys.implementation (https://docs.python.org/3.3/library/sys.html#sys.implementation) but it was never implemented. I guess now is the time to do it. Eg sys.implementation would return: (name='micropython', version=(1.4.0)). We are free to add named fields to this tuple (as long as they begin with an underscore), so could add something like _board="pyboard" or _board="wipy" etc. Probably we need an issue to discuss this :)

I was not aware of that discussion, but I agree with the proposal. So, we can add _board to specify a board name, but how to include the version of the "port"?

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