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

Remove dependency on future and imports from __future__ #346

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 0 additions & 2 deletions pykeepass/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
from __future__ import absolute_import
from .pykeepass import PyKeePass, create_database

from pykeepass.version import __version__
9 changes: 1 addition & 8 deletions pykeepass/attachment.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
# 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
2 changes: 0 additions & 2 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 Down
7 changes: 1 addition & 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,7 @@
'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
8 changes: 0 additions & 8 deletions pykeepass/pykeepass.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# 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,8 +32,6 @@
BLANK_DATABASE_PASSWORD = "password"


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

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
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
"argon2_cffi",
"pycryptodomex>=3.6.2",
"lxml",
# FIXME python2
"future",
],
include_package_data=True,
)
5 changes: 0 additions & 5 deletions tests/tests.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# -*- coding: utf-8 -*-

# FIXME python2
from __future__ import unicode_literals

import logging
import os
import shutil
Expand Down