RussBaz / enforce

Python 3.5+ runtime type checking for integration testing and data validation
543 stars 21 forks source link

Implement 3.5, 3.6, 3.7, 3.8, 3.9, and 3.10 support; black; GitHub Actions; upgrade deps #81

Open SamuelMarks opened 2 years ago

SamuelMarks commented 2 years ago

New features / changes (thus far):

RussBaz commented 2 years ago

Hi. Thanks a lot for the pull request. I will try giving a code review (of sorts) as soon as I can, even if it is a symbolic one. I am currently traveling a bit and therefore I cannot promise how quickly I will do it. I truly hope to do so before the end of the year.

If all the old and new tests are green, I will be very happy to upload it to pypi.

RussBaz commented 2 years ago

I tried running running it on a fresh installation of 3.10 but I could not make tests run due to import errors and so on. It will require reading through all the change logs since 3.5 before it can run on 3.10 . . . I think the support for anything older than 3.10 needs to be dropped in order to revive the package. Otherwise, the workload might be too much for anyone doing it as a hobby.

Any opinions?

SamuelMarks commented 2 years ago

@RussBaz On 3.10.1 I get 55 tests passing and 27 failing. You can try python setup.py test or python -m unittest

RussBaz commented 2 years ago

Hey, @SamuelMarks, I was fooling around and managed to make the test suite run. The main issue was with the line 273 in parsers.py. Replacing it for now with sys.version_info < (3, 6) fixed it for me. I got 55 failed and 1 ignored out of 178 tests. 122 tests passed. Why are we having the different number of tests? Could you check on your side again? Thanks.

PS. I am running the test suite on MacOS 12.1 with Python 3.10.1

SamuelMarks commented 2 years ago

@RussBaz Hmm… I'm at 53a41936da42bd6c9953a2eafb4747664197d19f on macOS 12.0.1 with Python 3.10.1.

Let me try fixing the line you referenced…

EDIT: Yep, now getting same as you. Added commit.