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 a bunch of old Python 2 compatible code #20

Merged
merged 1 commit into from
Aug 13, 2024
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
2 changes: 0 additions & 2 deletions json_store/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import

from .json_store import JSONStore

__version__ = "4.0"
Expand Down
15 changes: 2 additions & 13 deletions json_store/json_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,11 @@
This is for small stores. Everything is in memory and sync() always writes
everything out to disk.
"""
from __future__ import absolute_import
from __future__ import unicode_literals

import json
import os
from collections.abc import MutableMapping
from tempfile import NamedTemporaryFile

try:
import simplejson as json
except ImportError:
import json

try:
from collections.abc import MutableMapping
except ImportError:
from collections import MutableMapping

__all__ = ["JSONStore"]

MODE_600 = int("600", 8)
Expand Down
2 changes: 0 additions & 2 deletions json_store/shelve2json.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#! /usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, print_function, unicode_literals

"""Naïvely create a json_store file from a shelve DB."""

import os
Expand Down
8 changes: 1 addition & 7 deletions tests/test_json_store.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
# encoding: utf-8
from __future__ import absolute_import, unicode_literals

import json
import os
import platform
import shutil
import stat
from tempfile import NamedTemporaryFile

try:
import simplejson as json
except ImportError:
import json

import json_store


Expand Down
Loading