Skip to content
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

Depecrate Python2 #350

Merged
merged 3 commits into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions pykeepass/attachment.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# FIXME python2
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from future.utils import python_2_unicode_compatible

import pykeepass.entry

from pykeepass.exceptions import BinaryError

# FIXME python2
@python_2_unicode_compatible
class Attachment(object):
def __init__(self, element=None, kp=None, id=None, filename=None):
self._element = element
Expand Down
4 changes: 1 addition & 3 deletions pykeepass/baseelement.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

import base64
import struct
import uuid
Expand All @@ -8,7 +6,7 @@
from datetime import datetime


class BaseElement(object):
class BaseElement():
"""Entry and Group inherit from this class"""

def __init__(self, element, kp=None, icon=None, expires=False,
Expand Down
6 changes: 0 additions & 6 deletions pykeepass/entry.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# FIXME python2
from __future__ import absolute_import, unicode_literals
from future.utils import python_2_unicode_compatible

import logging
from copy import deepcopy
from datetime import datetime
Expand All @@ -28,8 +24,6 @@
'otp'
]

# FIXME python2
@python_2_unicode_compatible
class Entry(BaseElement):

def __init__(self, title=None, username=None, password=None, url=None,
Expand Down
6 changes: 0 additions & 6 deletions pykeepass/group.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# FIXME python2
from __future__ import absolute_import, unicode_literals
from future.utils import python_2_unicode_compatible

from lxml.builder import E
from lxml.etree import Element, _Element
from lxml.objectify import ObjectifiedElement
Expand All @@ -10,8 +6,6 @@
from pykeepass.baseelement import BaseElement


# FIXME python2
@python_2_unicode_compatible
class Group(BaseElement):

def __init__(self, name=None, element=None, icon=None, notes=None,
Expand Down
9 changes: 1 addition & 8 deletions pykeepass/pykeepass.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# coding: utf-8

# FIXME python2
from __future__ import absolute_import, print_function, unicode_literals
from future.utils import python_2_unicode_compatible

import base64
import logging
import os
Expand Down Expand Up @@ -38,9 +33,7 @@
BLANK_DATABASE_PASSWORD = "password"


# FIXME python2
@python_2_unicode_compatible
class PyKeePass(object):
class PyKeePass():
"""Open a KeePass database

Args:
Expand Down
3 changes: 0 additions & 3 deletions pykeepass/xpath.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# FIXME python2
from __future__ import unicode_literals

attachment_xp = {
False: {
'id': '/Value[@Ref="{}"]/..',
Expand Down
1 change: 0 additions & 1 deletion requirements-rtd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ pycryptodomex==3.14.1
construct==2.10.68
argon2-cffi==21.3.0
python-dateutil==2.8.2
future==0.18.2
Sphinx>=3.2.1
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ pycryptodomex==3.14.1
construct==2.10.68
argon2-cffi==21.3.0
python-dateutil==2.8.2
future==0.18.2
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@
packages=find_packages(include=['pykeepass', 'pykeepass.*']),
install_requires=[
"python-dateutil",
# FIXME python2 - last version to support python2
"construct==2.10.68",
"construct",
"argon2_cffi",
"pycryptodomex>=3.6.2",
"lxml",
# FIXME python2
"future",
],
include_package_data=True,
)
3 changes: 0 additions & 3 deletions tests/tests.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# -*- coding: utf-8 -*-

# FIXME python2
from __future__ import unicode_literals

import logging
import os
import shutil
Expand Down
Loading