Skip to content

Commit

Permalink
drop code for Python 3.2
Browse files Browse the repository at this point in the history
Signed-off-by: Inada Naoki <songofacandy@gmail.com>
  • Loading branch information
methane committed Feb 28, 2024
1 parent 6fe9748 commit 0d3e076
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
9 changes: 2 additions & 7 deletions fluent/handler.py
@@ -1,11 +1,6 @@
import json
import logging
import socket
import sys

try:
import simplejson as json
except ImportError: # pragma: no cover
import json

from fluent import sender

Expand Down Expand Up @@ -42,7 +37,7 @@ def __init__(
):
super().__init__(None, datefmt)

if sys.version_info[0:2] >= (3, 2) and style != "%":
if style != "%":
self.__style, basic_fmt_dict = {
"{": (
logging.StrFormatStyle,
Expand Down
7 changes: 0 additions & 7 deletions tests/test_asynchandler.py
@@ -1,5 +1,4 @@
import logging
import sys
import unittest

try:
Expand Down Expand Up @@ -81,9 +80,6 @@ def test_custom_fmt(self):
self.assertTrue("lineno" in data[0][2])
self.assertTrue("emitted_at" in data[0][2])

@unittest.skipUnless(
sys.version_info[0:2] >= (3, 2), "supported with Python 3.2 or above"
)
def test_custom_fmt_with_format_style(self):
handler = self.get_handler_class()("app.follow", port=self._port)

Expand All @@ -108,9 +104,6 @@ def test_custom_fmt_with_format_style(self):
self.assertTrue("lineno" in data[0][2])
self.assertTrue("emitted_at" in data[0][2])

@unittest.skipUnless(
sys.version_info[0:2] >= (3, 2), "supported with Python 3.2 or above"
)
def test_custom_fmt_with_template_style(self):
handler = self.get_handler_class()("app.follow", port=self._port)

Expand Down
7 changes: 0 additions & 7 deletions tests/test_handler.py
@@ -1,5 +1,4 @@
import logging
import sys
import unittest

import fluent.handler
Expand Down Expand Up @@ -139,9 +138,6 @@ def formatter(record):
self.assertEqual(1234, data[0][2]["x"])
self.assertEqual(1, data[0][2]["custom_value"])

@unittest.skipUnless(
sys.version_info[0:2] >= (3, 2), "supported with Python 3.2 or above"
)
def test_custom_fmt_with_format_style(self):
handler = fluent.handler.FluentHandler("app.follow", port=self._port)

Expand All @@ -167,9 +163,6 @@ def test_custom_fmt_with_format_style(self):
self.assertTrue("lineno" in data[0][2])
self.assertTrue("emitted_at" in data[0][2])

@unittest.skipUnless(
sys.version_info[0:2] >= (3, 2), "supported with Python 3.2 or above"
)
def test_custom_fmt_with_template_style(self):
handler = fluent.handler.FluentHandler("app.follow", port=self._port)

Expand Down

0 comments on commit 0d3e076

Please sign in to comment.