Skip to content

Commit 13ff245

Browse files
authored
bpo-32593: Drop FreeBSD 9 and older support (#5232)
Drop support of FreeBSD 9 and older.
1 parent b0a7a03 commit 13ff245

File tree

18 files changed

+23
-108
lines changed

18 files changed

+23
-108
lines changed

Doc/library/time.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ These constants are used as parameters for :func:`clock_getres` and
792792

793793
High-resolution per-process timer from the CPU.
794794

795-
Availability: FreeBSD 3 or later, NetBSD 7 or later, OpenBSD.
795+
Availability: FreeBSD, NetBSD 7 or later, OpenBSD.
796796

797797
.. versionadded:: 3.7
798798

@@ -812,7 +812,7 @@ These constants are used as parameters for :func:`clock_getres` and
812812
suspended, providing accurate uptime measurement, both absolute and
813813
interval.
814814

815-
Availability: FreeBSD 7 or later, OpenBSD 5.5 or later.
815+
Availability: FreeBSD, OpenBSD 5.5 or later.
816816

817817
.. versionadded:: 3.7
818818

Doc/whatsnew/3.7.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,11 @@ Windows Only
806806
Removed
807807
=======
808808

809+
Platform Support Removals
810+
-------------------------
811+
812+
* FreeBSD 9 and older are no longer supported.
813+
809814
API and Feature Removals
810815
------------------------
811816

Include/py_curses.h

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,15 @@
1212
#endif
1313
#endif /* __APPLE__ */
1414

15-
#ifdef __FreeBSD__
16-
/*
17-
** On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
18-
** against multiple definition of wchar_t and wint_t.
19-
*/
20-
#ifdef _XOPEN_SOURCE_EXTENDED
21-
#ifndef __FreeBSD_version
22-
#include <osreldate.h>
23-
#endif
24-
#if __FreeBSD_version >= 500000
25-
#ifndef __wchar_t
26-
#define __wchar_t
27-
#endif
28-
#ifndef __wint_t
29-
#define __wint_t
30-
#endif
31-
#else
32-
#ifndef _WCHAR_T
33-
#define _WCHAR_T
34-
#endif
35-
#ifndef _WINT_T
36-
#define _WINT_T
37-
#endif
38-
#endif
39-
#endif
15+
/* On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
16+
against multiple definition of wchar_t and wint_t. */
17+
#if defined(__FreeBSD__) && defined(_XOPEN_SOURCE_EXTENDED)
18+
# ifndef __wchar_t
19+
# define __wchar_t
20+
# endif
21+
# ifndef __wint_t
22+
# define __wint_t
23+
# endif
4024
#endif
4125

4226
#if !defined(HAVE_CURSES_IS_PAD) && defined(WINDOW_HAS_FLAGS)

Include/pyport.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -564,18 +564,8 @@ extern char * _getpty(int *, int, mode_t, int);
564564
* workaround was provided by Tim Robbins of FreeBSD project.
565565
*/
566566

567-
#ifdef __FreeBSD__
568-
#include <osreldate.h>
569-
#if (__FreeBSD_version >= 500040 && __FreeBSD_version < 602113) || \
570-
(__FreeBSD_version >= 700000 && __FreeBSD_version < 700054) || \
571-
(__FreeBSD_version >= 800000 && __FreeBSD_version < 800001)
572-
# define _PY_PORT_CTYPE_UTF8_ISSUE
573-
#endif
574-
#endif
575-
576-
577567
#if defined(__APPLE__)
578-
# define _PY_PORT_CTYPE_UTF8_ISSUE
568+
# define _PY_PORT_CTYPE_UTF8_ISSUE
579569
#endif
580570

581571
#ifdef _PY_PORT_CTYPE_UTF8_ISSUE

Lib/test/test_asyncio/test_events.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,8 +1471,6 @@ async def connect():
14711471
@unittest.skipUnless(sys.platform != 'win32',
14721472
"Don't support pipes for Windows")
14731473
@unittest.skipIf(sys.platform == 'darwin', 'test hangs on MacOS')
1474-
# Issue #20495: The test hangs on FreeBSD 7.2 but pass on FreeBSD 9
1475-
@support.requires_freebsd_version(8)
14761474
def test_read_pty_output(self):
14771475
proto = MyReadPipeProto(loop=self.loop)
14781476

Lib/test/test_io.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4107,8 +4107,6 @@ def test_interrupted_write_unbuffered(self):
41074107
def test_interrupted_write_buffered(self):
41084108
self.check_interrupted_write(b"xy", b"xy", mode="wb")
41094109

4110-
# Issue #22331: The test hangs on FreeBSD 7.2
4111-
@support.requires_freebsd_version(8)
41124110
def test_interrupted_write_text(self):
41134111
self.check_interrupted_write("xy", b"xy", mode="w", encoding="ascii")
41144112

Lib/test/test_logging.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -773,14 +773,7 @@ def serve_forever(self, poll_interval):
773773
:func:`select` or :func:`poll` call by
774774
:func:`asyncore.loop`.
775775
"""
776-
try:
777-
asyncore.loop(poll_interval, map=self._map)
778-
except OSError:
779-
# On FreeBSD 8, closing the server repeatably
780-
# raises this error. We swallow it if the
781-
# server has been closed.
782-
if self.connected or self.accepting:
783-
raise
776+
asyncore.loop(poll_interval, map=self._map)
784777

785778
def stop(self, timeout=None):
786779
"""

Lib/test/test_os.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -782,9 +782,7 @@ def test_environb(self):
782782
value_str = value.decode(sys.getfilesystemencoding(), 'surrogateescape')
783783
self.assertEqual(os.environ['bytes'], value_str)
784784

785-
# On FreeBSD < 7 and OS X < 10.6, unsetenv() doesn't return a value (issue
786-
# #13415).
787-
@support.requires_freebsd_version(7)
785+
# On OS X < 10.6, unsetenv() doesn't return a value (bpo-13415).
788786
@support.requires_mac_ver(10, 6)
789787
def test_unset_error(self):
790788
if sys.platform == "win32":

Lib/test/test_posix.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ def test_makedev(self):
559559
self.assertRaises(TypeError, posix.minor)
560560
self.assertRaises((ValueError, OverflowError), posix.minor, -1)
561561

562+
# FIXME: reenable these tests on FreeBSD with the kernel fix
562563
if sys.platform.startswith('freebsd') and dev >= 0x1_0000_0000:
563564
self.skipTest("bpo-31044: on FreeBSD CURRENT, minor() truncates "
564565
"64-bit dev to 32-bit")

Lib/test/test_resource.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ def test_linux_constants(self):
138138
with contextlib.suppress(AttributeError):
139139
self.assertIsInstance(getattr(resource, 'RLIMIT_' + attr), int)
140140

141-
@support.requires_freebsd_version(9)
142141
def test_freebsd_contants(self):
143142
for attr in ['SWAP', 'SBSIZE', 'NPTS']:
144143
with contextlib.suppress(AttributeError):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy