0001-prefer-shlex-over-pipes.patch 995 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From d81b703f3e8e29c1547386135c7e9ca539c1f054 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
  3. Date: Tue, 2 Aug 2022 14:40:37 +0100
  4. Subject: [PATCH] prefer shlex over pipes
  5. pipes is deprecated since python 3.10
  6. and slated for removal in python 3.13
  7. [Romain backport to 0.9.3]
  8. Upstream: https://github.com/pixelb/crudini/commit/e1650941054822faad4cda788bff6fe364eb4ca3
  9. Signed-off-by: Romain Naour <romain.naour@smile.fr>
  10. ---
  11. crudini | 4 +++-
  12. 1 file changed, 3 insertions(+), 1 deletion(-)
  13. diff --git a/crudini b/crudini
  14. index 669596b..a136241 100755
  15. --- a/crudini
  16. +++ b/crudini
  17. @@ -17,15 +17,17 @@ import getopt
  18. import hashlib
  19. import iniparse
  20. import os
  21. -import pipes
  22. +import re
  23. import shutil
  24. import string
  25. import tempfile
  26. if sys.version_info[0] >= 3:
  27. + import shlex as pipes
  28. from io import StringIO
  29. import configparser
  30. else:
  31. + import pipes
  32. from cStringIO import StringIO
  33. import ConfigParser as configparser
  34. --
  35. 2.34.3