From 8bfc10dec63b3df9c731cce03435eb8100dc3092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 22 Mar 2024 15:07:30 +0100 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 python311 revision 3c94c6e041c7f48ff51c71d6f1144fe4 --- bsc1221260-test_asyncio-ResourceWarning.patch | 21 +++ no-skipif-doctests.patch | 152 +++++++++--------- python311.changes | 20 +++ python311.spec | 62 ++++--- skip-test_pyobject_freed_is_freed.patch | 17 +- 5 files changed, 158 insertions(+), 114 deletions(-) create mode 100644 bsc1221260-test_asyncio-ResourceWarning.patch diff --git a/bsc1221260-test_asyncio-ResourceWarning.patch b/bsc1221260-test_asyncio-ResourceWarning.patch new file mode 100644 index 0000000..40ff46b --- /dev/null +++ b/bsc1221260-test_asyncio-ResourceWarning.patch @@ -0,0 +1,21 @@ +From a3052035485bd2836e40f5284657ca105382cbfd Mon Sep 17 00:00:00 2001 +From: sobolevn +Date: Tue, 5 Mar 2024 20:24:16 +0300 +Subject: [PATCH] gh-116112: Fix `ResourceWarning` in + `test_asyncio.test_stream` + +Co-authored-by: @CendioOssman +--- + Lib/test/test_asyncio/test_streams.py | 1 + + 1 file changed, 1 insertion(+) + +--- a/Lib/test/test_asyncio/test_streams.py ++++ b/Lib/test/test_asyncio/test_streams.py +@@ -1156,6 +1156,7 @@ os.close(fd) + + def test_unhandled_cancel(self): + async def handle_echo(reader, writer): ++ writer.close() + asyncio.current_task().cancel() + messages = self._basetest_unhandled_exceptions(handle_echo) + self.assertEqual(messages, []) diff --git a/no-skipif-doctests.patch b/no-skipif-doctests.patch index 6df9d88..920b41c 100644 --- a/no-skipif-doctests.patch +++ b/no-skipif-doctests.patch @@ -6,7 +6,7 @@ unchanged: --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst -@@ -250,7 +250,6 @@ Turtle motion +@@ -440,7 +440,6 @@ Turtle motion turtle is headed. .. doctest:: @@ -14,7 +14,7 @@ unchanged: >>> turtle.position() (0.00,0.00) -@@ -277,7 +276,6 @@ Turtle motion +@@ -467,7 +466,6 @@ Turtle motion >>> turtle.goto(0, 0) .. doctest:: @@ -22,7 +22,7 @@ unchanged: >>> turtle.position() (0.00,0.00) -@@ -296,13 +294,11 @@ Turtle motion +@@ -486,13 +484,11 @@ Turtle motion orientation depends on the turtle mode, see :func:`mode`. .. doctest:: @@ -36,7 +36,7 @@ unchanged: >>> turtle.heading() 22.0 -@@ -321,13 +317,11 @@ Turtle motion +@@ -511,13 +507,11 @@ Turtle motion orientation depends on the turtle mode, see :func:`mode`. .. doctest:: @@ -50,7 +50,7 @@ unchanged: >>> turtle.heading() 22.0 -@@ -350,13 +344,11 @@ Turtle motion +@@ -540,13 +534,11 @@ Turtle motion not change the turtle's orientation. .. doctest:: @@ -64,7 +64,7 @@ unchanged: >>> tp = turtle.pos() >>> tp -@@ -380,13 +372,11 @@ Turtle motion +@@ -570,13 +562,11 @@ Turtle motion unchanged. .. doctest:: @@ -78,7 +78,7 @@ unchanged: >>> turtle.position() (0.00,240.00) -@@ -402,13 +392,11 @@ Turtle motion +@@ -592,13 +582,11 @@ Turtle motion Set the turtle's second coordinate to *y*, leave first coordinate unchanged. .. doctest:: @@ -92,7 +92,7 @@ unchanged: >>> turtle.position() (0.00,40.00) -@@ -435,7 +423,6 @@ Turtle motion +@@ -625,7 +613,6 @@ Turtle motion =================== ==================== .. doctest:: @@ -100,7 +100,7 @@ unchanged: >>> turtle.setheading(90) >>> turtle.heading() -@@ -448,14 +435,12 @@ Turtle motion +@@ -638,14 +625,12 @@ Turtle motion its start-orientation (which depends on the mode, see :func:`mode`). .. doctest:: @@ -115,7 +115,7 @@ unchanged: >>> turtle.heading() 90.0 -@@ -487,7 +472,6 @@ Turtle motion +@@ -677,7 +662,6 @@ Turtle motion calculated automatically. May be used to draw regular polygons. .. doctest:: @@ -123,7 +123,7 @@ unchanged: >>> turtle.home() >>> turtle.position() -@@ -516,7 +500,6 @@ Turtle motion +@@ -706,7 +690,6 @@ Turtle motion .. doctest:: @@ -131,7 +131,7 @@ unchanged: >>> turtle.home() >>> turtle.dot() -@@ -534,7 +517,6 @@ Turtle motion +@@ -724,7 +707,6 @@ Turtle motion it by calling ``clearstamp(stamp_id)``. .. doctest:: @@ -139,7 +139,7 @@ unchanged: >>> turtle.color("blue") >>> turtle.stamp() -@@ -550,7 +532,6 @@ Turtle motion +@@ -740,7 +722,6 @@ Turtle motion Delete stamp with given *stampid*. .. doctest:: @@ -147,7 +147,7 @@ unchanged: >>> turtle.position() (150.00,-0.00) -@@ -595,7 +576,6 @@ Turtle motion +@@ -785,7 +766,6 @@ Turtle motion undo actions is determined by the size of the undobuffer. .. doctest:: @@ -155,7 +155,7 @@ unchanged: >>> for i in range(4): ... turtle.fd(50); turtle.lt(80) -@@ -628,7 +608,6 @@ Turtle motion +@@ -818,7 +798,6 @@ Turtle motion turtle turn instantly. .. doctest:: @@ -163,7 +163,7 @@ unchanged: >>> turtle.speed() 3 -@@ -649,7 +628,6 @@ Tell Turtle's state +@@ -839,7 +818,6 @@ Tell Turtle's state Return the turtle's current location (x,y) (as a :class:`Vec2D` vector). .. doctest:: @@ -171,7 +171,7 @@ unchanged: >>> turtle.pos() (440.00,-0.00) -@@ -665,7 +643,6 @@ Tell Turtle's state +@@ -855,7 +833,6 @@ Tell Turtle's state orientation which depends on the mode - "standard"/"world" or "logo". .. doctest:: @@ -179,7 +179,7 @@ unchanged: >>> turtle.goto(10, 10) >>> turtle.towards(0,0) -@@ -677,7 +654,6 @@ Tell Turtle's state +@@ -867,7 +844,6 @@ Tell Turtle's state Return the turtle's x coordinate. .. doctest:: @@ -187,7 +187,7 @@ unchanged: >>> turtle.home() >>> turtle.left(50) -@@ -693,7 +669,6 @@ Tell Turtle's state +@@ -883,7 +859,6 @@ Tell Turtle's state Return the turtle's y coordinate. .. doctest:: @@ -195,7 +195,7 @@ unchanged: >>> turtle.home() >>> turtle.left(60) -@@ -710,7 +685,6 @@ Tell Turtle's state +@@ -900,7 +875,6 @@ Tell Turtle's state :func:`mode`). .. doctest:: @@ -203,7 +203,7 @@ unchanged: >>> turtle.home() >>> turtle.left(67) -@@ -727,7 +701,6 @@ Tell Turtle's state +@@ -917,7 +891,6 @@ Tell Turtle's state other turtle, in turtle step units. .. doctest:: @@ -211,7 +211,7 @@ unchanged: >>> turtle.home() >>> turtle.distance(30,40) -@@ -751,7 +724,6 @@ Settings for measurement +@@ -941,7 +914,6 @@ Settings for measurement Default value is 360 degrees. .. doctest:: @@ -219,7 +219,7 @@ unchanged: >>> turtle.home() >>> turtle.left(90) -@@ -774,7 +746,6 @@ Settings for measurement +@@ -964,7 +936,6 @@ Settings for measurement ``degrees(2*math.pi)``. .. doctest:: @@ -227,7 +227,7 @@ unchanged: >>> turtle.home() >>> turtle.left(90) -@@ -785,7 +756,6 @@ Settings for measurement +@@ -975,7 +946,6 @@ Settings for measurement 1.5707963267948966 .. doctest:: @@ -235,7 +235,7 @@ unchanged: :hide: >>> turtle.degrees(360) -@@ -821,7 +791,6 @@ Drawing state +@@ -1011,7 +981,6 @@ Drawing state thickness. If no argument is given, the current pensize is returned. .. doctest:: @@ -243,7 +243,7 @@ unchanged: >>> turtle.pensize() 1 -@@ -853,7 +822,6 @@ Drawing state +@@ -1043,7 +1012,6 @@ Drawing state attributes in one statement. .. doctest:: @@ -251,7 +251,7 @@ unchanged: :options: +NORMALIZE_WHITESPACE >>> turtle.pen(fillcolor="black", pencolor="red", pensize=10) -@@ -876,7 +844,6 @@ Drawing state +@@ -1066,7 +1034,6 @@ Drawing state Return ``True`` if pen is down, ``False`` if it's up. .. doctest:: @@ -259,7 +259,7 @@ unchanged: >>> turtle.penup() >>> turtle.isdown() -@@ -917,7 +884,6 @@ Color control +@@ -1107,7 +1074,6 @@ Color control newly set pencolor. .. doctest:: @@ -267,7 +267,7 @@ unchanged: >>> colormode() 1.0 -@@ -966,7 +932,6 @@ Color control +@@ -1156,7 +1122,6 @@ Color control with the newly set fillcolor. .. doctest:: @@ -275,7 +275,7 @@ unchanged: >>> turtle.fillcolor("violet") >>> turtle.fillcolor() -@@ -1005,7 +970,6 @@ Color control +@@ -1195,7 +1160,6 @@ Color control with the newly set colors. .. doctest:: @@ -283,7 +283,7 @@ unchanged: >>> turtle.color("red", "green") >>> turtle.color() -@@ -1022,7 +986,6 @@ Filling +@@ -1212,7 +1176,6 @@ Filling ~~~~~~~ .. doctest:: @@ -291,7 +291,7 @@ unchanged: :hide: >>> turtle.home() -@@ -1032,7 +995,6 @@ Filling +@@ -1222,7 +1185,6 @@ Filling Return fillstate (``True`` if filling, ``False`` else). .. doctest:: @@ -299,7 +299,7 @@ unchanged: >>> turtle.begin_fill() >>> if turtle.filling(): -@@ -1057,7 +1019,6 @@ Filling +@@ -1247,7 +1209,6 @@ Filling above may be either all yellow or have some white regions. .. doctest:: @@ -307,7 +307,7 @@ unchanged: >>> turtle.color("black", "red") >>> turtle.begin_fill() -@@ -1074,7 +1035,6 @@ More drawing control +@@ -1264,7 +1225,6 @@ More drawing control variables to the default values. .. doctest:: @@ -315,7 +315,7 @@ unchanged: >>> turtle.goto(0,-22) >>> turtle.left(100) -@@ -1125,7 +1085,6 @@ Visibility +@@ -1315,7 +1275,6 @@ Visibility drawing observably. .. doctest:: @@ -323,7 +323,7 @@ unchanged: >>> turtle.hideturtle() -@@ -1136,7 +1095,6 @@ Visibility +@@ -1326,7 +1285,6 @@ Visibility Make the turtle visible. .. doctest:: @@ -331,7 +331,7 @@ unchanged: >>> turtle.showturtle() -@@ -1167,7 +1125,6 @@ Appearance +@@ -1357,7 +1315,6 @@ Appearance deal with shapes see Screen method :func:`register_shape`. .. doctest:: @@ -339,7 +339,7 @@ unchanged: >>> turtle.shape() 'classic' -@@ -1193,7 +1150,6 @@ Appearance +@@ -1383,7 +1340,6 @@ Appearance ``resizemode("user")`` is called by :func:`shapesize` when used with arguments. .. doctest:: @@ -347,7 +347,7 @@ unchanged: >>> turtle.resizemode() 'noresize' -@@ -1217,7 +1173,6 @@ Appearance +@@ -1407,7 +1363,6 @@ Appearance of the shape's outline. .. doctest:: @@ -355,7 +355,7 @@ unchanged: >>> turtle.shapesize() (1.0, 1.0, 1) -@@ -1242,7 +1197,6 @@ Appearance +@@ -1432,7 +1387,6 @@ Appearance heading of the turtle are sheared. .. doctest:: @@ -363,7 +363,7 @@ unchanged: >>> turtle.shape("circle") >>> turtle.shapesize(5,2) -@@ -1259,7 +1213,6 @@ Appearance +@@ -1449,7 +1403,6 @@ Appearance change the turtle's heading (direction of movement). .. doctest:: @@ -371,7 +371,7 @@ unchanged: >>> turtle.reset() >>> turtle.shape("circle") -@@ -1279,7 +1232,6 @@ Appearance +@@ -1469,7 +1422,6 @@ Appearance (direction of movement). .. doctest:: @@ -379,7 +379,7 @@ unchanged: >>> turtle.reset() >>> turtle.shape("circle") -@@ -1305,7 +1257,6 @@ Appearance +@@ -1495,7 +1447,6 @@ Appearance turtle (its direction of movement). .. doctest:: @@ -387,7 +387,7 @@ unchanged: >>> turtle.reset() >>> turtle.shape("circle") -@@ -1334,7 +1285,6 @@ Appearance +@@ -1524,7 +1475,6 @@ Appearance given matrix. .. doctest:: @@ -395,7 +395,7 @@ unchanged: >>> turtle = Turtle() >>> turtle.shape("square") -@@ -1350,7 +1300,6 @@ Appearance +@@ -1540,7 +1490,6 @@ Appearance can be used to define a new shape or components of a compound shape. .. doctest:: @@ -403,7 +403,7 @@ unchanged: >>> turtle.shape("square") >>> turtle.shapetransform(4, -1, 0, 2) -@@ -1375,7 +1324,6 @@ Using events +@@ -1565,7 +1514,6 @@ Using events procedural way: .. doctest:: @@ -411,7 +411,7 @@ unchanged: >>> def turn(x, y): ... left(180) -@@ -1396,7 +1344,6 @@ Using events +@@ -1586,7 +1534,6 @@ Using events ``None``, existing bindings are removed. .. doctest:: @@ -419,7 +419,7 @@ unchanged: >>> class MyTurtle(Turtle): ... def glow(self,x,y): -@@ -1424,7 +1371,6 @@ Using events +@@ -1614,7 +1561,6 @@ Using events mouse-click event on that turtle. .. doctest:: @@ -427,7 +427,7 @@ unchanged: >>> turtle.ondrag(turtle.goto) -@@ -1452,7 +1398,6 @@ Special Turtle methods +@@ -1642,7 +1588,6 @@ Special Turtle methods Return the last recorded polygon. .. doctest:: @@ -435,7 +435,7 @@ unchanged: >>> turtle.home() >>> turtle.begin_poly() -@@ -1472,7 +1417,6 @@ Special Turtle methods +@@ -1662,7 +1607,6 @@ Special Turtle methods turtle properties. .. doctest:: @@ -443,7 +443,7 @@ unchanged: >>> mick = Turtle() >>> joe = mick.clone() -@@ -1485,7 +1429,6 @@ Special Turtle methods +@@ -1675,7 +1619,6 @@ Special Turtle methods return the "anonymous turtle": .. doctest:: @@ -451,7 +451,7 @@ unchanged: >>> pet = getturtle() >>> pet.fd(50) -@@ -1499,7 +1442,6 @@ Special Turtle methods +@@ -1689,7 +1632,6 @@ Special Turtle methods TurtleScreen methods can then be called for that object. .. doctest:: @@ -459,7 +459,7 @@ unchanged: >>> ts = turtle.getscreen() >>> ts -@@ -1517,7 +1459,6 @@ Special Turtle methods +@@ -1707,7 +1649,6 @@ Special Turtle methods ``None``, the undobuffer is disabled. .. doctest:: @@ -467,7 +467,7 @@ unchanged: >>> turtle.setundobuffer(42) -@@ -1527,7 +1468,6 @@ Special Turtle methods +@@ -1717,7 +1658,6 @@ Special Turtle methods Return number of entries in the undobuffer. .. doctest:: @@ -475,7 +475,7 @@ unchanged: >>> while undobufferentries(): ... undo() -@@ -1550,7 +1490,6 @@ below: +@@ -1740,7 +1680,6 @@ below: For example: .. doctest:: @@ -483,7 +483,7 @@ unchanged: >>> s = Shape("compound") >>> poly1 = ((0,0),(10,-5),(0,10),(-10,-5)) -@@ -1561,7 +1500,6 @@ below: +@@ -1751,7 +1690,6 @@ below: 3. Now add the Shape to the Screen's shapelist and use it: .. doctest:: @@ -491,7 +491,7 @@ unchanged: >>> register_shape("myshape", s) >>> shape("myshape") -@@ -1581,7 +1519,6 @@ Most of the examples in this section ref +@@ -1771,7 +1709,6 @@ Most of the examples in this section ref ``screen``. .. doctest:: @@ -499,7 +499,7 @@ unchanged: :hide: >>> screen = Screen() -@@ -1598,7 +1535,6 @@ Window control +@@ -1788,7 +1725,6 @@ Window control Set or return background color of the TurtleScreen. .. doctest:: @@ -507,7 +507,7 @@ unchanged: >>> screen.bgcolor("orange") >>> screen.bgcolor() -@@ -1690,7 +1626,6 @@ Window control +@@ -1880,7 +1816,6 @@ Window control distorted. .. doctest:: @@ -515,7 +515,7 @@ unchanged: >>> screen.reset() >>> screen.setworldcoordinates(-50,-7.5,50,7.5) -@@ -1701,7 +1636,6 @@ Window control +@@ -1891,7 +1826,6 @@ Window control ... left(45); fd(2) # a regular octagon .. doctest:: @@ -523,7 +523,7 @@ unchanged: :hide: >>> screen.reset() -@@ -1723,7 +1657,6 @@ Animation control +@@ -1913,7 +1847,6 @@ Animation control Optional argument: .. doctest:: @@ -531,7 +531,7 @@ unchanged: >>> screen.delay() 10 -@@ -1745,7 +1678,6 @@ Animation control +@@ -1935,7 +1868,6 @@ Animation control :func:`delay`). .. doctest:: @@ -539,7 +539,7 @@ unchanged: >>> screen.tracer(8, 25) >>> dist = 2 -@@ -1782,7 +1714,6 @@ Using screen events +@@ -1972,7 +1904,6 @@ Using screen events must have the focus. (See method :func:`listen`.) .. doctest:: @@ -547,7 +547,7 @@ unchanged: >>> def f(): ... fd(50) -@@ -1803,7 +1734,6 @@ Using screen events +@@ -1993,7 +1924,6 @@ Using screen events must have focus. (See method :func:`listen`.) .. doctest:: @@ -555,7 +555,7 @@ unchanged: >>> def f(): ... fd(50) -@@ -1828,7 +1758,6 @@ Using screen events +@@ -2018,7 +1948,6 @@ Using screen events named ``turtle``: .. doctest:: @@ -563,7 +563,7 @@ unchanged: >>> screen.onclick(turtle.goto) # Subsequently clicking into the TurtleScreen will >>> # make the turtle move to the clicked point. -@@ -1848,7 +1777,6 @@ Using screen events +@@ -2038,7 +1967,6 @@ Using screen events Install a timer that calls *fun* after *t* milliseconds. .. doctest:: @@ -571,7 +571,7 @@ unchanged: >>> running = True >>> def f(): -@@ -1930,7 +1858,6 @@ Settings and special methods +@@ -2120,7 +2048,6 @@ Settings and special methods ============ ========================= =================== .. doctest:: @@ -579,7 +579,7 @@ unchanged: >>> mode("logo") # resets turtle heading to north >>> mode() -@@ -1945,7 +1872,6 @@ Settings and special methods +@@ -2135,7 +2062,6 @@ Settings and special methods values of color triples have to be in the range 0..*cmode*. .. doctest:: @@ -587,7 +587,7 @@ unchanged: >>> screen.colormode(1) >>> turtle.pencolor(240, 160, 80) -@@ -1966,7 +1892,6 @@ Settings and special methods +@@ -2156,7 +2082,6 @@ Settings and special methods do with a Tkinter Canvas. .. doctest:: @@ -595,7 +595,7 @@ unchanged: >>> cv = screen.getcanvas() >>> cv -@@ -1978,7 +1903,6 @@ Settings and special methods +@@ -2168,7 +2093,6 @@ Settings and special methods Return a list of names of all currently available turtle shapes. .. doctest:: @@ -603,7 +603,7 @@ unchanged: >>> screen.getshapes() ['arrow', 'blank', 'circle', ..., 'turtle'] -@@ -2002,7 +1926,6 @@ Settings and special methods +@@ -2192,7 +2116,6 @@ Settings and special methods coordinates: Install the corresponding polygon shape. .. doctest:: @@ -611,7 +611,7 @@ unchanged: >>> screen.register_shape("triangle", ((5,-3), (0,5), (-5,-3))) -@@ -2018,7 +1941,6 @@ Settings and special methods +@@ -2208,7 +2131,6 @@ Settings and special methods Return the list of turtles on the screen. .. doctest:: @@ -619,7 +619,7 @@ unchanged: >>> for turtle in screen.turtles(): ... turtle.color("red") -@@ -2080,7 +2002,6 @@ Methods specific to Screen, not inherite +@@ -2270,7 +2192,6 @@ Methods specific to Screen, not inherite center window vertically .. doctest:: @@ -627,7 +627,7 @@ unchanged: >>> screen.setup (width=200, height=200, startx=0, starty=0) >>> # sets window to 200x200 pixels, in upper left of screen -@@ -2096,7 +2017,6 @@ Methods specific to Screen, not inherite +@@ -2286,7 +2207,6 @@ Methods specific to Screen, not inherite Set title of turtle window to *titlestring*. .. doctest:: @@ -635,7 +635,7 @@ unchanged: >>> screen.title("Welcome to the turtle zoo!") -@@ -2167,7 +2087,6 @@ Public classes +@@ -2357,7 +2277,6 @@ Public classes Example: .. doctest:: @@ -643,7 +643,7 @@ unchanged: >>> poly = ((0,0),(10,-5),(0,10),(-10,-5)) >>> s = Shape("compound") -@@ -2518,7 +2437,6 @@ Changes since Python 3.0 +@@ -2743,7 +2662,6 @@ Changes since Python 3.0 .. doctest:: diff --git a/python311.changes b/python311.changes index 2e9d819..3f1a401 100644 --- a/python311.changes +++ b/python311.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Tue Mar 12 08:44:47 UTC 2024 - Matej Cepl + +- Rewrite %prep to use %autosetup et al. for compatibility with + rpm 4.20. + +------------------------------------------------------------------- +Tue Mar 12 08:13:34 UTC 2024 - Matej Cepl + +- bsc#1221260 add bsc1221260-test_asyncio-ResourceWarning.patch + to eliminate ResourceWarning which broke the test suite in + test_asyncio. + +------------------------------------------------------------------- +Wed Mar 6 14:13:58 UTC 2024 - Pedro Monreal + +- Use the system-wide crypto-policies [bsc#1211301] + * Use the system default cipher list instead of hardcoded values + * Add the --with-ssl-default-suites=openssl configure option + ------------------------------------------------------------------- Fri Feb 23 01:06:42 UTC 2024 - Matej Cepl diff --git a/python311.spec b/python311.spec index 002a178..e33a6c0 100644 --- a/python311.spec +++ b/python311.spec @@ -134,43 +134,46 @@ Source100: PACKAGING-NOTES Patch02: F00251-change-user-install-location.patch # PATCH-FEATURE-UPSTREAM distutils-reproducible-compile.patch gh#python/cpython#8057 mcepl@suse.com # Improve reproduceability -Patch06: distutils-reproducible-compile.patch +Patch03: distutils-reproducible-compile.patch # support finding packages in /usr/local, install to /usr/local by default -Patch07: python-3.3.0b1-localpath.patch +Patch04: python-3.3.0b1-localpath.patch # replace DATE, TIME and COMPILER by fixed definitions to aid reproducible builds -Patch08: python-3.3.0b1-fix_date_time_compiler.patch +Patch05: python-3.3.0b1-fix_date_time_compiler.patch # POSIX_FADV_WILLNEED throws EINVAL. Use a different constant in test -Patch09: python-3.3.0b1-test-posix_fadvise.patch +Patch06: python-3.3.0b1-test-posix_fadvise.patch # Raise timeout value for test_subprocess -Patch15: subprocess-raise-timeout.patch +Patch07: subprocess-raise-timeout.patch # PATCH-FEATURE-UPSTREAM bpo-31046_ensurepip_honours_prefix.patch bpo#31046 mcepl@suse.com # ensurepip should honour the value of $(prefix) -Patch29: bpo-31046_ensurepip_honours_prefix.patch +Patch08: bpo-31046_ensurepip_honours_prefix.patch # PATCH-FIX-SLE no-skipif-doctests.patch jsc#SLE-13738 mcepl@suse.com # SLE-15 version of Sphinx doesn't know about skipif directive in doctests. -Patch33: no-skipif-doctests.patch +Patch09: no-skipif-doctests.patch # PATCH-FIX-SLE skip-test_pyobject_freed_is_freed.patch mcepl@suse.com # skip a test failing on SLE-15 -Patch34: skip-test_pyobject_freed_is_freed.patch +Patch10: skip-test_pyobject_freed_is_freed.patch # PATCH-FIX-SLE fix_configure_rst.patch bpo#43774 mcepl@suse.com # remove duplicate link targets and make documentation with old Sphinx in SLE -Patch35: fix_configure_rst.patch +Patch11: fix_configure_rst.patch # PATCH-FIX-UPSTREAM support-expat-CVE-2022-25236-patched.patch jsc#SLE-21253 mcepl@suse.com # Makes Python resilient to changes of API of libexpat -Patch36: support-expat-CVE-2022-25236-patched.patch +Patch12: support-expat-CVE-2022-25236-patched.patch # PATCH-FIX-UPSTREAM skip_if_buildbot-extend.patch gh#python/cpython#103053 mcepl@suse.com # Skip test_freeze_simple_script -Patch39: skip_if_buildbot-extend.patch +Patch13: skip_if_buildbot-extend.patch # PATCH-FIX-UPSTREAM CVE-2023-27043-email-parsing-errors.patch bsc#1210638 mcepl@suse.com # Detect email address parsing errors and return empty tuple to # indicate the parsing error (old API) -Patch40: CVE-2023-27043-email-parsing-errors.patch +Patch14: CVE-2023-27043-email-parsing-errors.patch # PATCH-FIX-UPSTREAM libexpat260.patch gh#python/cpython#115289 # Fix tests for XMLPullParser with Expat 2.6.0 -Patch41: libexpat260.patch +Patch15: libexpat260.patch # PATCH-FIX-UPSTREAM CVE-2023-6597-TempDir-cleaning-symlink.patch bsc#1219666 mcepl@suse.com # tempfile.TemporaryDirectory: fix symlink bug in cleanup (from gh#python/cpython!99930) -Patch42: CVE-2023-6597-TempDir-cleaning-symlink.patch +Patch16: CVE-2023-6597-TempDir-cleaning-symlink.patch +# PATCH-FIX-UPSTREAM bsc1221260-test_asyncio-ResourceWarning.patch bsc#1221260 mcepl@suse.com +# prevent ResourceWarning in test_asyncio tests +Patch17: bsc1221260-test_asyncio-ResourceWarning.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: fdupes @@ -412,27 +415,13 @@ This package contains libpython3.2 shared library for embedding in other applications. %prep -%setup -q -n %{tarname} -%patch -P 02 -p1 +%autosetup -p1 -N -n %{tarname} +%autopatch -p1 -M 08 -%patch -P 06 -p1 -%patch -P 07 -p1 -%patch -P 08 -p1 -%patch -P 09 -p1 -%patch -P 15 -p1 -%patch -P 29 -p1 %if 0%{?suse_version} <= 1500 -%patch -P 33 -p1 +%patch -P 09 -p1 %endif -%if 0%{?sle_version} && 0%{?sle_version} <= 150300 -%patch -P 34 -p1 -%endif -%patch -P 35 -p1 -%patch -P 36 -p1 -%patch -P 39 -p1 -%patch -P 40 -p1 -%patch -P 41 -p1 -%patch -P 42 -p1 +%autopatch -p1 -m 10 # drop Autoconf version requirement sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac @@ -506,6 +495,9 @@ export CFLAGS="%{optflags} -IVendor/" --with-system-ffi \ --with-system-expat \ --with-lto \ +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150400 + --with-ssl-default-suites=openssl \ +%endif %if %{with profileopt} --enable-optimizations \ %endif @@ -537,6 +529,8 @@ LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH \ %endif %check +export SUSE_VERSION="0%{?suse_version}" +export SLE_VERSION="0%{?sle_version}" %if %{with general} # exclude test_gdb -- it doesn't run in buildservice anyway, and fails on missing debuginfos # when you install gdb into your test env @@ -750,7 +744,7 @@ find "$PDOCS" -name "*.bat" -delete install -m 755 -D Tools/gdb/libpython.py %{buildroot}%{_datadir}/gdb/auto-load/%{_libdir}/libpython%{python_abi}.so.%{so_major}.%{so_minor}-gdb.py # install devel files to /config -#cp Makefile Makefile.pre.in Makefile.pre $RPM_BUILD_ROOT%{sitedir}/config-%{python_abi}/ +#cp Makefile Makefile.pre.in Makefile.pre $RPM_BUILD_ROOT%%{sitedir}/config-%%{python_abi}/ # RPM macros %if %{primary_interpreter} @@ -910,7 +904,7 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo %{_mandir}/man1/python3.1%{?ext_man} %endif %{_mandir}/man1/python%{python_version}.1%{?ext_man} -%if %{suse_version} > 1550 +%if 0%{?suse_version} > 1550 # PEP-0668 %{sitedir}/EXTERNALLY-MANAGED %endif diff --git a/skip-test_pyobject_freed_is_freed.patch b/skip-test_pyobject_freed_is_freed.patch index ebf82a9..4555335 100644 --- a/skip-test_pyobject_freed_is_freed.patch +++ b/skip-test_pyobject_freed_is_freed.patch @@ -1,14 +1,23 @@ --- - Lib/test/test_capi/test_misc.py | 1 + - 1 file changed, 1 insertion(+) + Lib/test/test_capi/test_misc.py | 3 +++ + 1 file changed, 3 insertions(+) --- a/Lib/test/test_capi/test_misc.py +++ b/Lib/test/test_capi/test_misc.py -@@ -1236,6 +1236,7 @@ class PyMemDebugTests(unittest.TestCase) +@@ -40,6 +40,8 @@ import _testinternalcapi + # Were we compiled --with-pydebug or with #define Py_DEBUG? + Py_DEBUG = hasattr(sys, 'gettotalrefcount') + ++# Which version of the SLE distro we build on? ++SLE_VERSION = int(os.environ.get('SLE_VERSION', '0'), 10) + + NULL = None + +@@ -1281,6 +1283,7 @@ class PyMemDebugTests(unittest.TestCase) def test_pyobject_forbidden_bytes_is_freed(self): self.check_pyobject_is_freed('check_pyobject_forbidden_bytes_is_freed') -+ @unittest.skip('Failing on Leap 15.*') ++ @unittest.skipIf(0 < SLE_VERSION < 150300, 'Failing on Leap 15.*') def test_pyobject_freed_is_freed(self): self.check_pyobject_is_freed('check_pyobject_freed_is_freed')