mobilityhouse / ocpp

Python implementation of the Open Charge Point Protocol (OCPP).
MIT License
766 stars 298 forks source link

remove the python 3.7 #566

Closed MuhammadHasnain77 closed 7 months ago

OrangeTux commented 8 months ago

Thanks for your PR. It's still missing a few things, though.

See https://github.com/mobilityhouse/ocpp/issues/565 for a list it things that need to be done.

MuhammadHasnain77 commented 8 months ago

check it out is it correct.

OrangeTux commented 8 months ago

The asynctest dependency is still referenced in the tests. See:

$ ag asynctest tests/ -B5
tests/v201/conftest.py
1-try:
2-    from unittest.mock import AsyncMock
3-except ImportError:
4-    # Python 3.7 and below don't include unittest.mock.AsyncMock. Hence,
5-    # we need to resolve to a package on pypi.
6:    from asynctest import CoroutineMock as AsyncMock

tests/v16/conftest.py
1-try:
2-    from unittest.mock import AsyncMock
3-except ImportError:
4-    # Python 3.7 and below don't include unittest.mock.AsyncMock. Hence,
5-    # we need to resolve to a package on pypi.
6:    from asynctest import CoroutineMock as AsyncMock

tests/conftest.py
1-try:
2-    from unittest.mock import AsyncMock
3-except ImportError:
4-    # Python 3.7 and below don't include unittest.mock.AsyncMock. Hence,
5-    # we need to resolve to a package on pypi.
6:    from asynctest import CoroutineMock as AsyncMock

tests/v20/conftest.py
1-try:
2-    from unittest.mock import AsyncMock
3-except ImportError:
4-    # Python 3.7 and below don't include unittest.mock.AsyncMock. Hence,
5-    # we need to resolve to a package on pypi.
6:    from asynctest import CoroutineMock as AsyncMock

Those references must be removed.

Also, the poetry.lock still lists asynctest. Make sure to run poetry lock --no-update to generate a new lockfile.

MuhammadHasnain77 commented 7 months ago

See is it correct

MuhammadHasnain77 commented 7 months ago

I have completely remove all the python 3.7 version from the required files aslo asynctest

OrangeTux commented 7 months ago

No its not ready yet, please read my all my comments.

Jared-Newell-Mobility commented 7 months ago

Sorry, this issue became important to resolve, so I have opened a PR to replace it in this OCPP library - https://github.com/mobilityhouse/ocpp/pull/585 - therefore, I will close this.