Skip to content

Document string types used by GitPython #312

Closed
@ghost

Description

I noticed that starting with GitPython 0.3.4 hexadecimal SHAs are no longer strs but unicodes. Since the expected type is not documented anywhere (assuming that changelog is not a documentation), users have to guess. A wrong guess may lead to errors in programs. E.g. GitPython 0.3.4 + Python 2.7:

>>> commit.hexsha + '\xc5\x99'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 0: ordinal not in range(128)

...this used to work before GitPython 0.3.4. This change also complicated writing programs that needs to be compatible with both GitPython < 0.3.4 and GitPython >= 0.3.4.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions