Skip to content

Commit a89b916

Browse files
committed
Remove code for Python < 3.9
1 parent a256b85 commit a89b916

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
AUDIO_REQUIRE = [
142142
"soundfile>=0.12.1",
143143
"librosa",
144-
"soxr>=0.4.0; python_version>='3.9'", # Supports numpy-2
144+
"soxr>=0.4.0", # Supports numpy-2
145145
]
146146

147147
VISION_REQUIRE = [

tests/test_arrow_dataset.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3142,12 +3142,11 @@ def test_tf_dataset_options(self, in_memory):
31423142
self.assertEqual(len(tf_dataset), 2) # One batch of 3 and one batch of 1
31433143
self.assertEqual(len(tf_dataset_with_drop), 1) # Incomplete batch of 1 is dropped
31443144
# Test that `NotImplementedError` is raised `batch_size` is None and `num_workers` is > 0
3145-
if sys.version_info >= (3, 8):
3146-
with self._create_dummy_dataset(in_memory, tmp_dir.name, multiple_columns=True) as dset:
3147-
with self.assertRaisesRegex(
3148-
NotImplementedError, "`batch_size` must be specified when using multiple workers"
3149-
):
3150-
dset.to_tf_dataset(columns="col_1", batch_size=None, num_workers=2)
3145+
with self._create_dummy_dataset(in_memory, tmp_dir.name, multiple_columns=True) as dset:
3146+
with self.assertRaisesRegex(
3147+
NotImplementedError, "`batch_size` must be specified when using multiple workers"
3148+
):
3149+
dset.to_tf_dataset(columns="col_1", batch_size=None, num_workers=2)
31513150
del tf_dataset # For correct cleanup
31523151
del tf_dataset_with_drop
31533152

0 commit comments

Comments
 (0)