Imported Upstream version 58.0.4 upstream/58.0.4
authorJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:36 +0000 (17:02 +0900)
committerJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:36 +0000 (17:02 +0900)
.bumpversion.cfg
CHANGES.rst
setup.cfg
setuptools/command/setopt.py
setuptools/tests/test_setopt.py

index c95f09ebc60a28cb275dd29a8d4c76f66c2d426e..4871a5ea1cf7eb6fa7d72e14ddbd92bd8671a1d0 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 58.0.3
+current_version = 58.0.4
 commit = True
 tag = True
 
index a919b310d69b294c443ee704aa4408de2e36e88b..dab740079496b30776fb1ec3c8863ce7916d6d5b 100644 (file)
@@ -1,3 +1,12 @@
+v58.0.4
+-------
+
+
+Misc
+^^^^
+* #2773: Retain case in setup.cfg during sdist.
+
+
 v58.0.3
 -------
 
index fbf82af10e3ed89c28ad026fb1206391b3b79179..fb25e6cbd4d0dcf662577b1277a127ccae9b7472 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [metadata]
 name = setuptools
-version = 58.0.3
+version = 58.0.4
 author = Python Packaging Authority
 author_email = distutils-sig@python.org
 description = Easily download, build, install, upgrade, and uninstall Python packages
index e18057c81ec2f33f24a8ffc36f437303558ed2e0..6358c0451b2d0036e3821d897fb6f7ab436ee4a9 100644 (file)
@@ -39,6 +39,7 @@ def edit_config(filename, settings, dry_run=False):
     """
     log.debug("Reading configuration from %s", filename)
     opts = configparser.RawConfigParser()
+    opts.optionxform = lambda x: x
     opts.read([filename])
     for section, options in settings.items():
         if options is None:
index 0163f9af64d8710668f00f4cb76330a103229f7c..61dc68b61885337029c7db0c5dd23c12b704b244 100644 (file)
@@ -28,3 +28,11 @@ class TestEdit:
         parser = self.parse_config(str(config))
         assert parser.get('names', 'jaraco') == 'джарако'
         assert parser.get('names', 'other') == 'yes'
+
+    def test_case_retained(self, tmpdir):
+        """
+        """
+        config = tmpdir.join('setup.cfg')
+        self.write_text(str(config), '[names]\nJARACO=jaraco')
+        setopt.edit_config(str(config), dict())
+        assert 'JARACO' in config.read_text(encoding='ascii')