Skip to content

Commit 9f46b9b

Browse files
cjwatsonmhy-pexip
authored andcommitted
Import Debian changes 10.0-6
humanfriendly (10.0-6) unstable; urgency=medium . * Team upload. * Replace pipes.quote with shlex.quote on Python 3 (xolox/python-humanfriendly#75, closes: #1084718). * Remove some Python 2 packaging leftovers. . humanfriendly (10.0-5) unstable; urgency=medium . * Team upload. * add d/gbp.conf matching what is done on Salsa * patch-out trivial usage of python3-mock . humanfriendly (10.0-4) unstable; urgency=medium . * remove myself
1 parent 1759ab4 commit 9f46b9b

File tree

10 files changed

+124
-7
lines changed

10 files changed

+124
-7
lines changed

debian/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/files

debian/changelog

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
humanfriendly (10.0-6) unstable; urgency=medium
2+
3+
* Team upload.
4+
* Replace pipes.quote with shlex.quote on Python 3
5+
(https://github.com/xolox/python-humanfriendly/pull/75, closes:
6+
#1084718).
7+
* Remove some Python 2 packaging leftovers.
8+
9+
-- Colin Watson <[email protected]> Mon, 07 Oct 2024 22:26:10 +0100
10+
11+
humanfriendly (10.0-5) unstable; urgency=medium
12+
13+
* Team upload.
14+
* add d/gbp.conf matching what is done on Salsa
15+
* patch-out trivial usage of python3-mock
16+
17+
-- Alexandre Detiste <[email protected]> Wed, 13 Mar 2024 02:33:56 +0100
18+
19+
humanfriendly (10.0-4) unstable; urgency=medium
20+
21+
* remove myself
22+
23+
-- Sandro Tosi <[email protected]> Wed, 28 Feb 2024 01:24:43 -0500
24+
125
humanfriendly (10.0-3) unstable; urgency=medium
226

327
[ Debian Janitor ]

debian/control

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ Section: python
33
Priority: optional
44
Maintainer: Debian Python Team <[email protected]>
55
Uploaders: Gaurav Juvekar <[email protected]>,
6-
Sandro Tosi <[email protected]>,
76
Build-Depends: debhelper-compat (= 13),
87
dh-python,
98
dh-sequence-python3,
109
python3-all,
1110
python3-coloredlogs <!nocheck>,
1211
python3-docutils <!nocheck>,
13-
python3-mock <!nocheck>,
1412
python3-setuptools,
1513
python3-sphinx <!nodoc>,
1614
Standards-Version: 4.6.1

debian/gbp.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[DEFAULT]
2+
debian-branch=debian/master
3+
pristine-tar = True
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
From: Alexandre Detiste <[email protected]>
2+
Subject: remove trivial usage of python3-mock
3+
Forwarded: https://github.com/xolox/python-humanfriendly/issues/62
4+
5+
--- a/humanfriendly/tests.py
6+
+++ b/humanfriendly/tests.py
7+
@@ -123,7 +123,7 @@
8+
)
9+
10+
# Test dependencies.
11+
-from mock import MagicMock
12+
+from unittest.mock import MagicMock
13+
14+
15+
class HumanFriendlyTestCase(TestCase):

debian/patches/series

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
tests_skip_capturer.patch
2+
remove-python3-mock.patch
3+
shlex-quote.patch

debian/patches/shlex-quote.patch

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
From: "Benjamin A. Beasley" <[email protected]>
2+
Date: Thu, 30 May 2024 23:05:14 -0400
3+
Subject: Replace pipes.quote with shlex.quote on Python 3
4+
5+
The shlex.quote() API is available from Python 3.3 on; pipes.quote() was
6+
never documented, and is removed in Python 3.13.
7+
8+
Fixes #73.
9+
10+
Origin: other, https://github.com/xolox/python-humanfriendly/pull/75
11+
Bug: https://github.com/xolox/python-humanfriendly/issues/73
12+
Bug-Debian: https://bugs.debian.org/1084718
13+
Last-Update: 2024-10-07
14+
---
15+
humanfriendly/cli.py | 8 ++++++--
16+
humanfriendly/testing.py | 8 ++++++--
17+
2 files changed, 12 insertions(+), 4 deletions(-)
18+
19+
diff --git a/humanfriendly/cli.py b/humanfriendly/cli.py
20+
index eb81db1..5dfc14a 100644
21+
--- a/humanfriendly/cli.py
22+
+++ b/humanfriendly/cli.py
23+
@@ -79,10 +79,14 @@ Supported options:
24+
# Standard library modules.
25+
import functools
26+
import getopt
27+
-import pipes
28+
import subprocess
29+
import sys
30+
31+
+try:
32+
+ from shlex import quote # Python 3
33+
+except ImportError:
34+
+ from pipes import quote # Python 2 (removed in 3.13)
35+
+
36+
# Modules included in our package.
37+
from humanfriendly import (
38+
Timer,
39+
@@ -176,7 +180,7 @@ def main():
40+
def run_command(command_line):
41+
"""Run an external command and show a spinner while the command is running."""
42+
timer = Timer()
43+
- spinner_label = "Waiting for command: %s" % " ".join(map(pipes.quote, command_line))
44+
+ spinner_label = "Waiting for command: %s" % " ".join(map(quote, command_line))
45+
with Spinner(label=spinner_label, timer=timer) as spinner:
46+
process = subprocess.Popen(command_line)
47+
while True:
48+
diff --git a/humanfriendly/testing.py b/humanfriendly/testing.py
49+
index f6abddf..f9d66e4 100644
50+
--- a/humanfriendly/testing.py
51+
+++ b/humanfriendly/testing.py
52+
@@ -25,13 +25,17 @@ its much better error reporting) but I've yet to publish a test suite that
53+
import functools
54+
import logging
55+
import os
56+
-import pipes
57+
import shutil
58+
import sys
59+
import tempfile
60+
import time
61+
import unittest
62+
63+
+try:
64+
+ from shlex import quote # Python 3
65+
+except ImportError:
66+
+ from pipes import quote # Python 2 (removed in 3.13)
67+
+
68+
# Modules included in our package.
69+
from humanfriendly.compat import StringIO
70+
from humanfriendly.text import random_string
71+
@@ -521,7 +525,7 @@ class MockedProgram(CustomSearchPath):
72+
pathname = os.path.join(directory, self.program_name)
73+
with open(pathname, 'w') as handle:
74+
handle.write('#!/bin/sh\n')
75+
- handle.write('echo > %s\n' % pipes.quote(self.program_signal_file))
76+
+ handle.write('echo > %s\n' % quote(self.program_signal_file))
77+
if self.program_script:
78+
handle.write('%s\n' % self.program_script.strip())
79+
handle.write('exit %i\n' % self.program_returncode)

debian/python-humanfriendly.docs

Lines changed: 0 additions & 1 deletion
This file was deleted.

debian/python-humanfriendly.install

Lines changed: 0 additions & 3 deletions
This file was deleted.

debian/rules

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#export DH_VERBOSE = 1
77
#export PYBUILD_NAME=humanfriendly
8-
#export PYBUILD_AFTER_INSTALL_python2=rm -rf {destdir}/usr/bin/
98
#export PYBUILD_AFTER_INSTALL_python3=rm -rf {destdir}/usr/bin/
109
#export PYBUILD_INSTALL_ARGS_python3 = --install-scripts=/dev/null
1110

0 commit comments

Comments
 (0)