scaramallion: No coverage due to [bug ](https://github.com/codecov/codecov-bash/issues/198)in uploader...
sanjayankur31: Not a review, but I can confirm that this fixes the Fedora build with python3.8. I've cherry-picked the patch and will carry it until it gets included in a new release. Thanks very much!

https://koji.fedoraproject.org/koji/taskinfo?taskID=37218006
scaramallion: I pushed [another commit](https://github.com/pydicom/pydicom/compare/master...scaramallion:fix-py38) but its not showing up... I'm going to change back to WIP until things sort themselves out.
diff --git a/pydicom/valuerep.py b/pydicom/valuerep.py
index 38e36fe30..f6491559b 100644
--- a/pydicom/valuerep.py
+++ b/pydicom/valuerep.py
@@ -346,11 +346,12 @@ class DSfloat(float):
     def __str__(self):
         if hasattr(self, 'original_string'):
             return self.original_string
-        else:
-            return super(DSfloat, self).__str__()
+
+        # Issue #937 (Python 3.8 compatibility)
+        return repr(self)[1:-1]
 
     def __repr__(self):
-        return "\"" + str(self) + "\""
+        return '"{}"'.format(super(DSfloat, self).__repr__())
 
 
 class DSdecimal(Decimal):
@@ -513,11 +514,15 @@ class IS(int):
         elif isinstance(val, IS) and hasattr(val, 'original_string'):
             self.original_string = val.original_string
 
-    def __repr__(self):
+    def __str__(self):
         if hasattr(self, 'original_string'):
-            return "\"" + self.original_string + "\""
-        else:
-            return "\"" + int.__str__(self) + "\""
+            return self.original_string
+
+        # Issue #937 (Python 3.8 compatibility)
+        return repr(self)[1:-1]
+
+    def __repr__(self):
+        return '"{}"'.format(super(IS, self).__repr__())
 
 
 def MultiString(val, valtype=str):

[python 3.8] failing tests: various issues but "max recursion depth reached" seems to be one
#### Description
Fedora is beginning to test python packages against python 3.8. Pydicom builds but tests fail with errors.

#### Steps/Code to Reproduce

```
python setup.py build
python setup.py install
pytest
```

The complete build log is attached. It includes the complete build process. The root log is also attached. These are the versions of other python libraries that are in use:

```
python3-dateutil-1:2.8.0-5.fc32.noarch
python3-devel-3.8.0~b3-4.fc32.x86_64
python3-numpy-1:1.17.0-3.fc32.x86_64
python3-numpydoc-0.9.1-3.fc32.noarch
python3-pytest-4.6.5-3.fc32.noarch
python3-setuptools-41.0.1-8.fc32.noarch
python3-six-1.12.0-5.fc32.noarch
```

[build-log.txt](https://github.com/pydicom/pydicom/files/3527558/build-log.txt)
[root-log.txt](https://github.com/pydicom/pydicom/files/3527559/root-log.txt)

diff --git a/pydicom/tests/test_valuerep.py b/pydicom/tests/test_valuerep.py
index 3d7190f79..8fc76f2fd 100644
--- a/pydicom/tests/test_valuerep.py
+++ b/pydicom/tests/test_valuerep.py
@@ -90,7 +90,6 @@ class TestDA(object):
 
 class TestDS(object):
     """Unit tests for DS values"""
-
     def test_empty_value(self):
         assert DS(None) is None
         assert '' == DS('')
@@ -106,7 +105,6 @@ class TestDS(object):
 
 class TestDSfloat(object):
     """Unit tests for pickling DSfloat"""
-
     def test_pickling(self):
         # Check that a pickled DSFloat is read back properly
         x = pydicom.valuerep.DSfloat(9.0)
@@ -116,10 +114,25 @@ class TestDSfloat(object):
         assert x.real == x2.real
         assert x.original_string == x2.original_string
 
+    def test_str(self):
+        """Test DSfloat.__str__()."""
+        val = pydicom.valuerep.DSfloat(1.1)
+        assert '1.1' == str(val)
+
+        val = pydicom.valuerep.DSfloat('1.1')
+        assert '1.1' == str(val)
+
+    def test_repr(self):
+        """Test DSfloat.__repr__()."""
+        val = pydicom.valuerep.DSfloat(1.1)
+        assert '"1.1"' == repr(val)
+
+        val = pydicom.valuerep.DSfloat('1.1')
+        assert '"1.1"' == repr(val)
+
 
 class TestDSdecimal(object):
     """Unit tests for pickling DSdecimal"""
-
     def test_pickling(self):
         # Check that a pickled DSdecimal is read back properly
         # DSdecimal actually prefers original_string when
@@ -142,7 +155,6 @@ class TestDSdecimal(object):
 
 class TestIS(object):
     """Unit tests for IS"""
-
     def test_empty_value(self):
         assert IS(None) is None
         assert '' == IS('')
@@ -182,6 +194,22 @@ class TestIS(object):
             pydicom.valuerep.IS(3103050000)
         config.enforce_valid_values = original_flag
 
+    def test_str(self):
+        """Test IS.__str__()."""
+        val = pydicom.valuerep.IS(1)
+        assert '1' == str(val)
+
+        val = pydicom.valuerep.IS('1')
+        assert '1' == str(val)
+
+    def test_repr(self):
+        """Test IS.__repr__()."""
+        val = pydicom.valuerep.IS(1)
+        assert '"1"' == repr(val)
+
+        val = pydicom.valuerep.IS('1')
+        assert '"1"' == repr(val)
+
 
 class TestBadValueRead(object):
     """Unit tests for handling a bad value for a VR

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov
apt-get update apt-get install -y gcc
3.9
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
coverage==7.8.0
exceptiongroup==1.2.2
iniconfig==2.1.0
packaging==24.2
pluggy==1.5.0
-e git+https://github.com/pydicom/pydicom.git@6d8ef0bfcec983e5f8bd8a2e359ff318fe9fcf65#egg=pydicom
pytest==8.3.5
pytest-cov==6.0.0
tomli==2.2.1

name: pydicom
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==7.8.0
      - exceptiongroup==1.2.2
      - iniconfig==2.1.0
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - tomli==2.2.1
prefix: /opt/conda/envs/pydicom

pydicom/tests/test_valuerep.py::TestDSfloat::test_str pydicom/tests/test_valuerep.py::TestDSfloat::test_repr pydicom/tests/test_valuerep.py::TestIS::test_str pydicom/tests/test_valuerep.py::TestIS::test_repr
pydicom/tests/test_valuerep.py::TestBadValueRead::test_read_bad_value_in_VR_default pydicom/tests/test_valuerep.py::TestBadValueRead::test_read_bad_value_in_VR_enforce_valid_value pydicom/tests/test_valuerep.py::TestDecimalString::test_valid_decimal_strings pydicom/tests/test_valuerep.py::TestDecimalString::test_invalid_decimal_strings
pydicom/tests/test_valuerep.py::TestTM::test_pickling pydicom/tests/test_valuerep.py::TestDT::test_pickling pydicom/tests/test_valuerep.py::TestDA::test_pickling pydicom/tests/test_valuerep.py::TestDS::test_empty_value pydicom/tests/test_valuerep.py::TestDS::test_float_values pydicom/tests/test_valuerep.py::TestDSfloat::test_pickling pydicom/tests/test_valuerep.py::TestDSdecimal::test_pickling pydicom/tests/test_valuerep.py::TestDSdecimal::test_float_value pydicom/tests/test_valuerep.py::TestIS::test_empty_value pydicom/tests/test_valuerep.py::TestIS::test_valid_value pydicom/tests/test_valuerep.py::TestIS::test_invalid_value pydicom/tests/test_valuerep.py::TestIS::test_pickling pydicom/tests/test_valuerep.py::TestIS::test_longint pydicom/tests/test_valuerep.py::TestIS::test_overflow pydicom/tests/test_valuerep.py::TestPersonName::test_last_first pydicom/tests/test_valuerep.py::TestPersonName::test_copy pydicom/tests/test_valuerep.py::TestPersonName::test_three_component pydicom/tests/test_valuerep.py::TestPersonName::test_formatting pydicom/tests/test_valuerep.py::TestPersonName::test_unicode_kr pydicom/tests/test_valuerep.py::TestPersonName::test_unicode_jp_from_bytes pydicom/tests/test_valuerep.py::TestPersonName::test_unicode_jp_from_bytes_comp_delimiter pydicom/tests/test_valuerep.py::TestPersonName::test_unicode_jp_from_bytes_caret_delimiter pydicom/tests/test_valuerep.py::TestPersonName::test_unicode_jp_from_unicode pydicom/tests/test_valuerep.py::TestPersonName::test_not_equal pydicom/tests/test_valuerep.py::TestPersonName::test_encoding_carried pydicom/tests/test_valuerep.py::TestPersonName::test_hash pydicom/tests/test_valuerep.py::TestDateTime::test_date pydicom/tests/test_valuerep.py::TestDateTime::test_date_time pydicom/tests/test_valuerep.py::TestDateTime::test_time
pydicom/valuerep.py
pydicom/valuerep.py