Skip to content

Commit d1ebfcf

Browse files
fix some buildbreaks
1 parent ac6f0a1 commit d1ebfcf

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lib/pathlib/_local.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def __init__(self, *args, **kwargs):
504504

505505
def __new__(cls, *args, **kwargs):
506506
if cls is Path:
507-
cls = WindowsPath if os.name in ['nt', 'os2] else PosixPath
507+
cls = WindowsPath if os.name in ['nt', 'os2'] else PosixPath
508508
return object.__new__(cls)
509509

510510
def stat(self, *, follow_symlinks=True):
@@ -843,7 +843,7 @@ class PosixPath(Path, PurePosixPath):
843843
"""
844844
__slots__ = ()
845845

846-
if os.name == 'nt':
846+
if os.name in ['nt', 'os2']:
847847
def __new__(cls, *args, **kwargs):
848848
raise UnsupportedOperation(
849849
f"cannot instantiate {cls.__name__!r} on your system")
@@ -855,7 +855,7 @@ class WindowsPath(Path, PureWindowsPath):
855855
"""
856856
__slots__ = ()
857857

858-
if os.name !in ['nt', 'os2]:
858+
if os.name not in ['nt', 'os2']:
859859
def __new__(cls, *args, **kwargs):
860860
raise UnsupportedOperation(
861861
f"cannot instantiate {cls.__name__!r} on your system")

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6246,8 +6246,8 @@ AC_SUBST([LIBPYTHON])
62466246
MODULE_DEPS_SHARED='$(MODULE_DEPS_STATIC) $(EXPORTSYMS)'
62476247
LIBPYTHON=''
62486248

6249-
# On Android and Cygwin the shared libraries must be linked with libpython.
6250-
if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MACHDEP" = "cygwin"); then
6249+
# On Android, OS/2 and Cygwin the shared libraries must be linked with libpython.
6250+
if test "$PY_ENABLE_SHARED" = "1" && ( test -n "$ANDROID_API_LEVEL" || test "$MACHDEP" = "cygwin" || test "$MACHDEP" = "os2knix"); then
62516251
MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(LDLIBRARY)"
62526252
LIBPYTHON="\$(BLDLIBRARY)"
62536253
fi

0 commit comments

Comments
 (0)