Skip to content

Commit

Permalink
Remove support of Python 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
socketpair committed Jun 13, 2023
1 parent d6e9ffc commit adb3a3a
Show file tree
Hide file tree
Showing 12 changed files with 207 additions and 248 deletions.
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ classifiers = [
"Development Status :: 6 - Mature",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Systems Administration :: Authentication/Directory",
]
Expand All @@ -32,9 +33,7 @@ include = [
repository = "https://github.com/pyradius/pyrad"

[tool.poetry.dependencies]
python = "^2.7 || ^3.6"
six = "^1.15.0"
netaddr = "^0.8"
python = "^3.6"

[tool.poetry.dev-dependencies]
nose = "^0.10.0b1"
3 changes: 1 addition & 2 deletions pyrad/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import select
import socket
import time
import six
import struct
from pyrad import host
from pyrad import packet
Expand All @@ -34,7 +33,7 @@ class Client(host.Host):
:type timeout: float
"""
def __init__(self, server, authport=1812, acctport=1813,
coaport=3799, secret=six.b(''), dict=None, retries=3, timeout=5):
coaport=3799, secret=b'', dict=None, retries=3, timeout=5):

"""Constructor.
Expand Down
3 changes: 1 addition & 2 deletions pyrad/client_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from datetime import datetime
import asyncio
import six
import logging
import random

Expand Down Expand Up @@ -175,7 +174,7 @@ class ClientAsync:
"""
# noinspection PyShadowingBuiltins
def __init__(self, server, auth_port=1812, acct_port=1813,
coa_port=3799, secret=six.b(''), dict=None,
coa_port=3799, secret=b'', dict=None,
loop=None, retries=3, timeout=30,
logger_name='pyrad'):

Expand Down
5 changes: 1 addition & 4 deletions pyrad/dictfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"""

import os
import six


class _Node(object):
Expand Down Expand Up @@ -54,10 +53,8 @@ def __init__(self, fil):
self.__ReadNode(fil)

def __ReadNode(self, fil):
node = None
parentdir = self.__CurDir()
if isinstance(fil, six.string_types):
fname = None
if isinstance(fil, str):
if os.path.isabs(fil):
fname = fil
else:
Expand Down
Loading

0 comments on commit adb3a3a

Please sign in to comment.