Compare commits
3 Commits
c8a7b8fa1b
...
3bf05327c2
Author | SHA1 | Date |
---|---|---|
Ross | 3bf05327c2 | |
Dong-hee Na | de6f20a6de | |
Dong-hee Na | ec3165320e |
|
@ -4,7 +4,7 @@ Copyright
|
|||
|
||||
Python and this documentation is:
|
||||
|
||||
Copyright © 2001-2020 Python Software Foundation. All rights reserved.
|
||||
Copyright © 2001-2021 Python Software Foundation. All rights reserved.
|
||||
|
||||
Copyright © 2000 BeOpen.com. All rights reserved.
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ PSF LICENSE AGREEMENT FOR PYTHON |release|
|
|||
analyze, test, perform and/or display publicly, prepare derivative works,
|
||||
distribute, and otherwise use Python |release| alone or in any derivative
|
||||
version, provided, however, that PSF's License Agreement and PSF's notice of
|
||||
copyright, i.e., "Copyright © 2001-2020 Python Software Foundation; All Rights
|
||||
copyright, i.e., "Copyright © 2001-2021 Python Software Foundation; All Rights
|
||||
Reserved" are retained in Python |release| alone or in any derivative version
|
||||
prepared by Licensee.
|
||||
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -84,7 +84,7 @@ analyze, test, perform and/or display publicly, prepare derivative works,
|
|||
distribute, and otherwise use Python alone or in any derivative version,
|
||||
provided, however, that PSF's License Agreement and PSF's notice of copyright,
|
||||
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation;
|
||||
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Python Software Foundation;
|
||||
All Rights Reserved" are retained in Python alone or in any derivative version
|
||||
prepared by Licensee.
|
||||
|
||||
|
|
|
@ -1082,7 +1082,8 @@ class LMTP(SMTP):
|
|||
# Handle Unix-domain sockets.
|
||||
try:
|
||||
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
self.sock.settimeout(self.timeout)
|
||||
if self.timeout is not socket._GLOBAL_DEFAULT_TIMEOUT:
|
||||
self.sock.settimeout(self.timeout)
|
||||
self.file = None
|
||||
self.sock.connect(host)
|
||||
except OSError:
|
||||
|
|
|
@ -107,6 +107,9 @@ class MockSocket:
|
|||
def close(self):
|
||||
pass
|
||||
|
||||
def connect(self, host):
|
||||
pass
|
||||
|
||||
|
||||
def socket(family=None, type=None, proto=None):
|
||||
return MockSocket(family)
|
||||
|
@ -152,8 +155,12 @@ error = socket_module.error
|
|||
|
||||
|
||||
# Constants
|
||||
_GLOBAL_DEFAULT_TIMEOUT = socket_module._GLOBAL_DEFAULT_TIMEOUT
|
||||
AF_INET = socket_module.AF_INET
|
||||
AF_INET6 = socket_module.AF_INET6
|
||||
SOCK_STREAM = socket_module.SOCK_STREAM
|
||||
SOL_SOCKET = None
|
||||
SO_REUSEADDR = None
|
||||
|
||||
if hasattr(socket_module, 'AF_UNIX'):
|
||||
AF_UNIX = socket_module.AF_UNIX
|
||||
|
|
|
@ -82,7 +82,7 @@ class NetworkedNNTPTestsMixin:
|
|||
desc = self.server.description(self.GROUP_NAME)
|
||||
_check_desc(desc)
|
||||
# Another sanity check
|
||||
self.assertIn("Python", desc)
|
||||
self.assertIn(self.DESC, desc)
|
||||
# With a pattern
|
||||
desc = self.server.description(self.GROUP_PAT)
|
||||
_check_desc(desc)
|
||||
|
@ -309,6 +309,7 @@ class NetworkedNNTPTests(NetworkedNNTPTestsMixin, unittest.TestCase):
|
|||
NNTP_HOST = 'news.trigofacile.com'
|
||||
GROUP_NAME = 'fr.comp.lang.python'
|
||||
GROUP_PAT = 'fr.comp.lang.*'
|
||||
DESC = 'Python'
|
||||
|
||||
NNTP_CLASS = NNTP
|
||||
|
||||
|
@ -343,8 +344,11 @@ class NetworkedNNTP_SSLTests(NetworkedNNTPTests):
|
|||
# 400 connections per day are accepted from each IP address."
|
||||
|
||||
NNTP_HOST = 'nntp.aioe.org'
|
||||
GROUP_NAME = 'comp.lang.python'
|
||||
GROUP_PAT = 'comp.lang.*'
|
||||
# bpo-42794: aioe.test is one of the official groups on this server
|
||||
# used for testing: https://news.aioe.org/manual/aioe-hierarchy/
|
||||
GROUP_NAME = 'aioe.test'
|
||||
GROUP_PAT = 'aioe.*'
|
||||
DESC = 'test'
|
||||
|
||||
NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None)
|
||||
|
||||
|
|
|
@ -165,6 +165,17 @@ class LMTPGeneralTests(GeneralTests, unittest.TestCase):
|
|||
|
||||
client = smtplib.LMTP
|
||||
|
||||
@unittest.skipUnless(hasattr(socket, 'AF_UNIX'), "test requires Unix domain socket")
|
||||
def testUnixDomainSocketTimeoutDefault(self):
|
||||
local_host = '/some/local/lmtp/delivery/program'
|
||||
mock_socket.reply_with(b"220 Hello world")
|
||||
try:
|
||||
client = self.client(local_host, self.port)
|
||||
finally:
|
||||
mock_socket.setdefaulttimeout(None)
|
||||
self.assertIsNone(client.sock.gettimeout())
|
||||
client.close()
|
||||
|
||||
def testTimeoutZero(self):
|
||||
super().testTimeoutZero()
|
||||
local_host = '/some/local/lmtp/delivery/program'
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<key>CFBundleExecutable</key>
|
||||
<string>IDLE</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>%version%, © 2001-2020 Python Software Foundation</string>
|
||||
<string>%version%, © 2001-2021 Python Software Foundation</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>IDLE.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<key>CFBundleExecutable</key>
|
||||
<string>Python Launcher</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>%VERSION%, © 2001-2020 Python Software Foundation</string>
|
||||
<string>%VERSION%, © 2001-2021 Python Software Foundation</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>PythonLauncher.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>%version%, (c) 2001-2020 Python Software Foundation.</string>
|
||||
<string>%version%, (c) 2001-2021 Python Software Foundation.</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Python</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Configure LMTP Unix-domain socket to use socket global default timeout when
|
||||
a timeout is not explicitly provided.
|
|
@ -0,0 +1,2 @@
|
|||
Update test_nntplib to use offical group name of news.aioe.org for testing.
|
||||
Patch by Dong-hee Na.
|
|
@ -5,7 +5,7 @@
|
|||
#include "winver.h"
|
||||
|
||||
#define PYTHON_COMPANY "Python Software Foundation"
|
||||
#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2016 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC."
|
||||
#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2021 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC."
|
||||
|
||||
#define MS_WINDOWS
|
||||
#include "modsupport.h"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
static const char cprt[] =
|
||||
"\
|
||||
Copyright (c) 2001-2020 Python Software Foundation.\n\
|
||||
Copyright (c) 2001-2021 Python Software Foundation.\n\
|
||||
All Rights Reserved.\n\
|
||||
\n\
|
||||
Copyright (c) 2000 BeOpen.com.\n\
|
||||
|
|
|
@ -22,7 +22,7 @@ This is Python version 3.10.0 alpha 3
|
|||
:target: https://python.zulipchat.com
|
||||
|
||||
|
||||
Copyright (c) 2001-2020 Python Software Foundation. All rights reserved.
|
||||
Copyright (c) 2001-2021 Python Software Foundation. All rights reserved.
|
||||
|
||||
See the end of this file for further copyright and license information.
|
||||
|
||||
|
@ -250,7 +250,7 @@ See :pep:`619` for Python 3.10 release details.
|
|||
Copyright and License Information
|
||||
---------------------------------
|
||||
|
||||
Copyright (c) 2001-2020 Python Software Foundation. All rights reserved.
|
||||
Copyright (c) 2001-2021 Python Software Foundation. All rights reserved.
|
||||
|
||||
Copyright (c) 2000 BeOpen.com. All rights reserved.
|
||||
|
||||
|
|
Loading…
Reference in New Issue