Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 608d34a

Browse files
author
Anselm Kruis
committed
Merge with branch 3.3 just before the conversion to git.
2 parents 9fbbf8b + c276ffa commit 608d34a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+756
-718
lines changed

Doc/README.txt

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -108,27 +108,3 @@ and we will process your request as soon as possible.
108108

109109
If you want to help the Documentation Team, you are always welcome. Just send
110110
111-
112-
113-
Copyright notice
114-
================
115-
116-
The Python source is copyrighted, but you can freely use and copy it
117-
as long as you don't change or remove the copyright notice:
118-
119-
----------------------------------------------------------------------
120-
Copyright (c) 2000-2014 Python Software Foundation.
121-
All rights reserved.
122-
123-
Copyright (c) 2000 BeOpen.com.
124-
All rights reserved.
125-
126-
Copyright (c) 1995-2000 Corporation for National Research Initiatives.
127-
All rights reserved.
128-
129-
Copyright (c) 1991-1995 Stichting Mathematisch Centrum.
130-
All rights reserved.
131-
132-
See the file "license.rst" for information on usage and redistribution
133-
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
134-
----------------------------------------------------------------------

Doc/copyright.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright
44

55
Python and this documentation is:
66

7-
Copyright © 2001-2015 Python Software Foundation. All rights reserved.
7+
Copyright © 2001-2016 Python Software Foundation. All rights reserved.
88

99
Copyright © 2000 BeOpen.com. All rights reserved.
1010

Doc/howto/urllib2.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,11 @@ setting up a `Basic Authentication`_ handler: ::
538538
through a proxy. However, this can be enabled by extending urllib.request as
539539
shown in the recipe [#]_.
540540

541+
.. note::
542+
543+
`HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see
544+
the documentation on :func:`~urllib.request.getproxies`.
545+
541546

542547
Sockets and Layers
543548
==================

Doc/library/urllib.request.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,14 @@ The :mod:`urllib.request` module defines the following functions:
161161
cannot find it, looks for proxy information from Mac OSX System
162162
Configuration for Mac OS X and Windows Systems Registry for Windows.
163163

164+
.. note::
165+
166+
If the environment variable ``REQUEST_METHOD`` is set, which usually
167+
indicates your script is running in a CGI environment, the environment
168+
variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
169+
because that variable can be injected by a client using the "Proxy:" HTTP
170+
header. If you need to use an HTTP proxy in a CGI environment use
171+
``ProxyHandler`` explicitly.
164172

165173
The following classes are provided:
166174

@@ -265,6 +273,11 @@ The following classes are provided:
265273

266274
To disable autodetected proxy pass an empty dictionary.
267275

276+
.. note::
277+
278+
``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set;
279+
see the documentation on :func:`~urllib.request.getproxies`.
280+
268281

269282
.. class:: HTTPPasswordMgr()
270283

Doc/license.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Terms and conditions for accessing or otherwise using Python
8484
analyze, test, perform and/or display publicly, prepare derivative works,
8585
distribute, and otherwise use Python |release| alone or in any derivative
8686
version, provided, however, that PSF's License Agreement and PSF's notice of
87-
copyright, i.e., "Copyright © 2001-2015 Python Software Foundation; All Rights
87+
copyright, i.e., "Copyright © 2001-2017 Python Software Foundation; All Rights
8888
Reserved" are retained in Python |release| alone or in any derivative version
8989
prepared by Licensee.
9090

LICENSE

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ analyze, test, perform and/or display publicly, prepare derivative works,
7474
distribute, and otherwise use Python alone or in any derivative version,
7575
provided, however, that PSF's License Agreement and PSF's notice of copyright,
7676
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
77-
2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved"
78-
are retained in Python alone or in any derivative version prepared by Licensee.
77+
2011, 2012, 2013, 2014, 2015, 2016, 2017 Python Software Foundation; All Rights
78+
Reserved" are retained in Python alone or in any derivative version prepared by
79+
Licensee.
7980

8081
3. In the event Licensee prepares a derivative work that is based on
8182
or incorporates Python or any part thereof, and wants to make

Lib/ctypes/test/test_callbacks.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import functools
12
import unittest
23
from ctypes import *
34
import _ctypes_test
@@ -243,6 +244,40 @@ def callback(a, b, c, d, e):
243244
self.assertEqual(result,
244245
callback(1.1*1.1, 2.2*2.2, 3.3*3.3, 4.4*4.4, 5.5*5.5))
245246

247+
def test_callback_large_struct(self):
248+
class Check: pass
249+
250+
class X(Structure):
251+
_fields_ = [
252+
('first', c_ulong),
253+
('second', c_ulong),
254+
('third', c_ulong),
255+
]
256+
257+
def callback(check, s):
258+
check.first = s.first
259+
check.second = s.second
260+
check.third = s.third
261+
262+
check = Check()
263+
s = X()
264+
s.first = 0xdeadbeef
265+
s.second = 0xcafebabe
266+
s.third = 0x0bad1dea
267+
268+
CALLBACK = CFUNCTYPE(None, X)
269+
dll = CDLL(_ctypes_test.__file__)
270+
func = dll._testfunc_cbk_large_struct
271+
func.argtypes = (X, CALLBACK)
272+
func.restype = None
273+
# the function just calls the callback with the passed structure
274+
func(s, CALLBACK(functools.partial(callback, check)))
275+
self.assertEqual(check.first, s.first)
276+
self.assertEqual(check.second, s.second)
277+
self.assertEqual(check.third, s.third)
278+
self.assertEqual(check.first, 0xdeadbeef)
279+
self.assertEqual(check.second, 0xcafebabe)
280+
self.assertEqual(check.third, 0x0bad1dea)
246281

247282
################################################################
248283

Lib/distutils/__init__.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
setup (...)
99
"""
1010

11-
# Distutils version
12-
#
13-
# Updated automatically by the Python release process.
14-
#
15-
#--start constants--
16-
__version__ = "3.3.6"
17-
#--end constants--
11+
import sys
12+
13+
__version__ = sys.version[:sys.version.index(' ')]

Lib/distutils/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class PyPIRCCommand(Command):
2222
"""Base command that knows how to handle the .pypirc file
2323
"""
24-
DEFAULT_REPOSITORY = 'https://pypi.python.org/pypi'
24+
DEFAULT_REPOSITORY = 'https://upload.pypi.org/legacy/'
2525
DEFAULT_REALM = 'pypi'
2626
repository = None
2727
realm = None

Lib/distutils/tests/test_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_server_registration(self):
8787

8888
config = list(sorted(config.items()))
8989
waited = [('password', 'secret'), ('realm', 'pypi'),
90-
('repository', 'https://pypi.python.org/pypi'),
90+
('repository', 'https://upload.pypi.org/legacy/'),
9191
('server', 'server1'), ('username', 'me')]
9292
self.assertEqual(config, waited)
9393

@@ -96,7 +96,7 @@ def test_server_registration(self):
9696
config = cmd._read_pypirc()
9797
config = list(sorted(config.items()))
9898
waited = [('password', 'secret'), ('realm', 'pypi'),
99-
('repository', 'https://pypi.python.org/pypi'),
99+
('repository', 'https://upload.pypi.org/legacy/'),
100100
('server', 'server-login'), ('username', 'tarek')]
101101
self.assertEqual(config, waited)
102102

0 commit comments

Comments
 (0)