seps = '\\/'
colon = ':'
try:
+ if not paths:
+ path[:0] + sep #23780: Ensure compatible data type even if p is null.
result_drive, result_path = splitdrive(path)
for p in paths:
p_drive, p_path = splitdrive(p)
self.pathmodule.join(42, 'str')
with self.assertRaisesRegex(TypeError, errmsg % 'int'):
self.pathmodule.join('str', 42)
+ with self.assertRaisesRegex(TypeError, errmsg % 'int'):
+ self.pathmodule.join(42)
+ with self.assertRaisesRegex(TypeError, errmsg % 'list'):
+ self.pathmodule.join([])
with self.assertRaisesRegex(TypeError, errmsg % 'bytearray'):
self.pathmodule.join(bytearray(b'foo'), bytearray(b'bar'))
Library
-------
+- Issue #23780: Improved error message in os.path.join() with single argument.
+
- Issue #6598: Increased time precision and random number range in
email.utils.make_msgid() to strengthen the uniqueness of the message ID.