Skip to content

Typing vs Python2.7 support #560

@MihanixA

Description

@MihanixA

Problem description

Typing doesn't work with petl like an example below.

import petl

def transform(src: Tuple) -> Tuple[tuple, ...]:
    table = petl.wrap(src)
    res: petl.Table = table.addfield('new_field', lambda _: 'new value')
    return res.tupleoftuples()

In our project we use typing a lot and we believe it helps to deliver better code.

Versions

Typing is not compatible with Python 2 and is not fully compatible with some older versions. Adding typing would break support for Python 2.7 (which is deprecated tho).
POC: #559

Questions to discuss

Is there any plans to deprecate Python2.7 and add support for new features e.g. typing, or moving to new repo petl3 or so?

Metadata

Metadata

Assignees

Labels

MaintainabilityIssues for code modernization, improve development, testingUsabilityImprovement that benefit petl usage for end users

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions