-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove support of Python 2.x #181
Conversation
Since we already user |
Seems CI has some problems. Not in the code I have changed. |
Well, seems someone retriggered CI. Anyway, fail again. not in my code. |
Seems like an issue with Coveralls. I will check as soon as possible. |
@GIC-de please review and merge |
@@ -158,15 +157,12 @@ def EncodeDate(num): | |||
return struct.pack('!I', num) | |||
|
|||
|
|||
def DecodeString(str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this function return different data types in success and unsuccess path ? I don't known what Author meant...
Any chance to merge this PR and release new version? 🤔 |
Just tested this PR and looks like pytest fails in 3 units Here is pytest output:+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pyrad-2.4-10.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pyrad-2.4-10.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network' tests/__init__.py tests/mock.py tests/testBidict.py tests/testClient.py tests/testDictionary.py tests/testHost.py tests/testPacket.py tests/testProxy.py tests/testServer.py tests/testTools.py
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/pyrad-2.4
configfile: pyproject.toml
plugins: timeout-2.3.1, asyncio-0.23.6, syrupy-4.6.1, mock-3.14.0, anyio-4.3.0, aspectlib-2.0.0, benchmark-4.0.0, rerunfailures-12.0, aiohttp-1.0.5, forked-1.6.0, localserver-0.8.1, django-4.8.0
asyncio: mode=strict
collected 202 items
tests/testBidict.py ....... [ 3%]
tests/testClient.py ...F..F......F.... [ 12%]
tests/testDictionary.py ..................................... [ 30%]
tests/testHost.py ........ [ 34%]
tests/testPacket.py ................................................................................ [ 74%]
tests/testProxy.py ...... [ 77%]
tests/testServer.py ......................... [ 89%]
tests/testTools.py ..................... [100%]
========================================================================================= FAILURES ==========================================================================================
_________________________________________________________________________________ SocketTests.testAuthDelay _________________________________________________________________________________
self = <tests.testClient.SocketTests testMethod=testAuthDelay>
def testAuthDelay(self):
self.client.retries = 2
self.client.timeout = 1
packet = MockPacket(AccessRequest)
> self.assertRaises(Timeout, self.client._SendPacket, packet, 432)
tests/testClient.py:124:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyrad/client.py:158: in _SendPacket
rawreply = self._socket.recv(4096)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def recv(self, buffer):
> return self.data[:buffer]
E AttributeError: 'MockSocket' object has no attribute 'data'
tests/mock.py:62: AttributeError
____________________________________________________________________________ SocketTests.testDoubleAccountDelay _____________________________________________________________________________
self = <tests.testClient.SocketTests testMethod=testDoubleAccountDelay>
def testDoubleAccountDelay(self):
self.client.retries = 3
self.client.timeout = 1
packet = MockPacket(AccountingRequest)
> self.assertRaises(Timeout, self.client._SendPacket, packet, 432)
tests/testClient.py:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyrad/client.py:158: in _SendPacket
rawreply = self._socket.recv(4096)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def recv(self, buffer):
> return self.data[:buffer]
E AttributeError: 'MockSocket' object has no attribute 'data'
tests/mock.py:62: AttributeError
____________________________________________________________________________ SocketTests.testSingleAccountDelay _____________________________________________________________________________
self = <tests.testClient.SocketTests testMethod=testSingleAccountDelay>
def testSingleAccountDelay(self):
self.client.retries = 2
self.client.timeout = 1
packet = MockPacket(AccountingRequest)
> self.assertRaises(Timeout, self.client._SendPacket, packet, 432)
tests/testClient.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyrad/client.py:158: in _SendPacket
rawreply = self._socket.recv(4096)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def recv(self, buffer):
> return self.data[:buffer]
E AttributeError: 'MockSocket' object has no attribute 'data'
tests/mock.py:62: AttributeError
================================================================================== short test summary info ==================================================================================
FAILED tests/testClient.py::SocketTests::testAuthDelay - AttributeError: 'MockSocket' object has no attribute 'data'
FAILED tests/testClient.py::SocketTests::testDoubleAccountDelay - AttributeError: 'MockSocket' object has no attribute 'data'
FAILED tests/testClient.py::SocketTests::testSingleAccountDelay - AttributeError: 'MockSocket' object has no attribute 'data'
=============================================================================== 3 failed, 199 passed in 2.68s =============================================================================== |
However looks like those fails are not caused by this PR because tese fails are exactly the same as in my ticket #165 |
@kloczek would you merge this PR ? |
I have no permnission. |
@kloczek who has ? |
Maintainer |
Huge thanks! Could you please make a new git tag + increment version ? |
Yes, but I need to run some tests before release. |
No description provided.