Metadata-Version: 2.1
Name: py2dataclasses
Version: 3.14.112
Summary: PEP-557 compatible dataclasses backport for Python 2.7+
Home-page: https://github.com/nev3rfail/py2dataclasses
Author: nev3rfail
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=2.7
Description-Content-Type: text/markdown
Requires-Dist: six (>=1.17)
Requires-Dist: dictproxyhack (>=1.1) ; python_version < "3.0"
Requires-Dist: funcsigs (>=1.0) ; python_version < "3.0"
Requires-Dist: typing (>=3.7) ; python_version < "3.5"
Requires-Dist: unittest-xml-reporting (>=1.17.0) ; python_version < "3.5"
Requires-Dist: typing-extensions (>=3.7) ; python_version < "3.8"
Requires-Dist: unittest-xml-reporting (>=4.0.0) ; python_version > "3.5"

# py2dataclasses

This project is a PEP-557 compatible dataclass implementation for Python 2.7.

## Usage

On Python 2.7 there is no annotation syntax (`x: int`), so fields are declared using `field()` descriptors:

```python
from dataclasses import dataclass, field

@dataclass
class Point(object):
    x = field(int)
    y = field(int)

p = Point(3, 4)
print(p)        # Point(x=3, y=4)
print(p.x)      # 3
print(p == Point(3, 4))  # True
```

## Disclaimer

Sometimes systems have a proprietary legacy that is not possible
to port to newer versions of languages. But people
still need to work, systems using python 2 still have to be supported and extended.

### ⚠ WARNING

* Please, DO NOT use Python 2.7 in 2026


## Development

- This is quite a straightforward convertion of dataclasses into a py2 syntax/standard done initially by neural network,
  and after that it was reviewed, fixed and finished by human.
- Tests are taken from the cpython 3.14 branch and converted to py2

## Testing

- This project aims to pass all the tests from Python 3.14
- It also aims to pass all backported tests.


