summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-04-09 08:37:03 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-04-09 08:37:03 (GMT)
commit5e69685999c0f44af3536ac71a2a59e70b7ea185 (patch)
tree7746b70fbbdad4ecf455e0b1bba93dd27b8cafa8 /PC
parentf91197c6d51e5518372df281026a7ab897f6a5d1 (diff)
downloadcpython-5e69685999c0f44af3536ac71a2a59e70b7ea185.zip
cpython-5e69685999c0f44af3536ac71a2a59e70b7ea185.tar.gz
cpython-5e69685999c0f44af3536ac71a2a59e70b7ea185.tar.bz2
Merged revisions 62194,62197-62198,62204-62205,62214,62219-62221,62227,62229-62231,62233-62235,62237-62239 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r62194 | jeffrey.yasskin | 2008-04-07 01:04:28 +0200 (Mon, 07 Apr 2008) | 7 lines Add enough debugging information to diagnose failures where the HandlerBException is ignored, and fix one such problem, where it was thrown during the __del__ method of the previous Popen object. We may want to find a better way of printing verbose information so it's not spammy when the test passes. ........ r62197 | mark.hammond | 2008-04-07 03:53:39 +0200 (Mon, 07 Apr 2008) | 2 lines Issue #2513: enable 64bit cross compilation on windows. ........ r62198 | mark.hammond | 2008-04-07 03:59:40 +0200 (Mon, 07 Apr 2008) | 2 lines correct heading underline for new "Cross-compiling on Windows" section ........ r62204 | gregory.p.smith | 2008-04-07 08:33:21 +0200 (Mon, 07 Apr 2008) | 4 lines Use the new PyFile_IncUseCount & PyFile_DecUseCount calls appropriatly within the standard library. These modules use PyFile_AsFile and later release the GIL while operating on the previously returned FILE*. ........ r62205 | mark.summerfield | 2008-04-07 09:39:23 +0200 (Mon, 07 Apr 2008) | 4 lines changed "2500 components" to "several thousand" since the number keeps growning:-) ........ r62214 | georg.brandl | 2008-04-07 20:51:59 +0200 (Mon, 07 Apr 2008) | 2 lines #2525: update timezone info examples in the docs. ........ r62219 | andrew.kuchling | 2008-04-08 01:57:07 +0200 (Tue, 08 Apr 2008) | 1 line Write PEP 3127 section; add items ........ r62220 | andrew.kuchling | 2008-04-08 01:57:21 +0200 (Tue, 08 Apr 2008) | 1 line Typo fix ........ r62221 | andrew.kuchling | 2008-04-08 03:33:10 +0200 (Tue, 08 Apr 2008) | 1 line Typographical fix: 32bit -> 32-bit, 64bit -> 64-bit ........ r62227 | andrew.kuchling | 2008-04-08 23:22:53 +0200 (Tue, 08 Apr 2008) | 1 line Add items ........ r62229 | amaury.forgeotdarc | 2008-04-08 23:27:42 +0200 (Tue, 08 Apr 2008) | 7 lines Issue2564: Prevent a hang in "import test.autotest", which runs the entire test suite as a side-effect of importing the module. - in test_capi, a thread tried to import other modules - re.compile() imported sre_parse again on every call. ........ r62230 | amaury.forgeotdarc | 2008-04-08 23:51:57 +0200 (Tue, 08 Apr 2008) | 2 lines Prevent an error when inspect.isabstract() is called with something else than a new-style class. ........ r62231 | amaury.forgeotdarc | 2008-04-09 00:07:05 +0200 (Wed, 09 Apr 2008) | 8 lines Issue 2408: remove the _types module It was only used as a helper in types.py to access types (GetSetDescriptorType and MemberDescriptorType), when they can easily be obtained with python code. These expressions even work with Jython. I don't know what the future of the types module is; (cf. discussion in http://bugs.python.org/issue1605 ) at least this change makes it simpler. ........ r62233 | amaury.forgeotdarc | 2008-04-09 01:10:07 +0200 (Wed, 09 Apr 2008) | 2 lines Add a NEWS entry for previous checkin ........ r62234 | trent.nelson | 2008-04-09 01:47:30 +0200 (Wed, 09 Apr 2008) | 37 lines - Issue #2550: The approach used by client/server code for obtaining ports to listen on in network-oriented tests has been refined in an effort to facilitate running multiple instances of the entire regression test suite in parallel without issue. test_support.bind_port() has been fixed such that it will always return a unique port -- which wasn't always the case with the previous implementation, especially if socket options had been set that affected address reuse (i.e. SO_REUSEADDR, SO_REUSEPORT). The new implementation of bind_port() will actually raise an exception if it is passed an AF_INET/SOCK_STREAM socket with either the SO_REUSEADDR or SO_REUSEPORT socket option set. Furthermore, if available, bind_port() will set the SO_EXCLUSIVEADDRUSE option on the socket it's been passed. This currently only applies to Windows. This option prevents any other sockets from binding to the host/port we've bound to, thus removing the possibility of the 'non-deterministic' behaviour, as Microsoft puts it, that occurs when a second SOCK_STREAM socket binds and accepts to a host/port that's already been bound by another socket. The optional preferred port parameter to bind_port() has been removed. Under no circumstances should tests be hard coding ports! test_support.find_unused_port() has also been introduced, which will pass a temporary socket object to bind_port() in order to obtain an unused port. The temporary socket object is then closed and deleted, and the port is returned. This method should only be used for obtaining an unused port in order to pass to an external program (i.e. the -accept [port] argument to openssl's s_server mode) or as a parameter to a server-oriented class that doesn't give you direct access to the underlying socket used. Finally, test_support.HOST has been introduced, which should be used for the host argument of any relevant socket calls (i.e. bind and connect). The following tests were updated to following the new conventions: test_socket, test_smtplib, test_asyncore, test_ssl, test_httplib, test_poplib, test_ftplib, test_telnetlib, test_socketserver, test_asynchat and test_socket_ssl. It is now possible for multiple instances of the regression test suite to run in parallel without issue. ........ r62235 | gregory.p.smith | 2008-04-09 02:25:17 +0200 (Wed, 09 Apr 2008) | 3 lines Fix zlib crash from zlib.decompressobj().flush(val) when val was not positive. It tried to allocate negative or zero memory. That fails. ........ r62237 | trent.nelson | 2008-04-09 02:34:53 +0200 (Wed, 09 Apr 2008) | 1 line Fix typo with regards to self.PORT shadowing class variables with the same name. ........ r62238 | andrew.kuchling | 2008-04-09 03:08:32 +0200 (Wed, 09 Apr 2008) | 1 line Add items ........ r62239 | jerry.seutter | 2008-04-09 07:07:58 +0200 (Wed, 09 Apr 2008) | 1 line Changed test so it no longer runs as a side effect of importing. ........
Diffstat (limited to 'PC')
-rw-r--r--PC/VC6/pythoncore.dsp4
-rw-r--r--PC/VS7.1/pythoncore.vcproj3
-rw-r--r--PC/VS8.0/pythoncore.vcproj4
-rw-r--r--PC/_winreg.c8
-rw-r--r--PC/config.c2
-rw-r--r--PC/example_nt/readme.txt34
-rw-r--r--PC/example_nt/setup.py22
7 files changed, 54 insertions, 23 deletions
diff --git a/PC/VC6/pythoncore.dsp b/PC/VC6/pythoncore.dsp
index 9c815c6..001c821 100644
--- a/PC/VC6/pythoncore.dsp
+++ b/PC/VC6/pythoncore.dsp
@@ -169,10 +169,6 @@ SOURCE=..\..\PC\_subprocess.c
# End Source File
# Begin Source File
-SOURCE=..\..\Modules\_typesmodule.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Modules\_weakref.c
# End Source File
# Begin Source File
diff --git a/PC/VS7.1/pythoncore.vcproj b/PC/VS7.1/pythoncore.vcproj
index e252981..552f199 100644
--- a/PC/VS7.1/pythoncore.vcproj
+++ b/PC/VS7.1/pythoncore.vcproj
@@ -395,9 +395,6 @@
RelativePath="..\..\Pc\_subprocess.c">
</File>
<File
- RelativePath="..\..\Modules\_typesmodule.c">
- </File>
- <File
RelativePath="..\..\Modules\_weakref.c">
</File>
<File
diff --git a/PC/VS8.0/pythoncore.vcproj b/PC/VS8.0/pythoncore.vcproj
index 2a5392e..a4189e1 100644
--- a/PC/VS8.0/pythoncore.vcproj
+++ b/PC/VS8.0/pythoncore.vcproj
@@ -1019,10 +1019,6 @@
>
</File>
<File
- RelativePath="..\..\Modules\_typesmodule.c"
- >
- </File>
- <File
RelativePath="..\..\Modules\_weakref.c"
>
</File>
diff --git a/PC/_winreg.c b/PC/_winreg.c
index 9d2014a..8ba4863 100644
--- a/PC/_winreg.c
+++ b/PC/_winreg.c
@@ -290,20 +290,20 @@ PyDoc_STRVAR(SetValueEx_doc,
"the configuration registry. This helps the registry perform efficiently.");
PyDoc_STRVAR(DisableReflectionKey_doc,
-"Disables registry reflection for 32bit processes running on a 64bit\n"
+"Disables registry reflection for 32-bit processes running on a 64-bit\n"
"Operating System. Will generally raise NotImplemented if executed on\n"
-"a 32bit Operating System.\n"
+"a 32-bit Operating System.\n"
"If the key is not on the reflection list, the function succeeds but has no effect.\n"
"Disabling reflection for a key does not affect reflection of any subkeys.");
PyDoc_STRVAR(EnableReflectionKey_doc,
"Restores registry reflection for the specified disabled key.\n"
-"Will generally raise NotImplemented if executed on a 32bit Operating System.\n"
+"Will generally raise NotImplemented if executed on a 32-bit Operating System.\n"
"Restoring reflection for a key does not affect reflection of any subkeys.");
PyDoc_STRVAR(QueryReflectionKey_doc,
"bool = QueryReflectionKey(hkey) - Determines the reflection state for the specified key.\n"
-"Will generally raise NotImplemented if executed on a 32bit Operating System.\n");
+"Will generally raise NotImplemented if executed on a 32-bit Operating System.\n");
/* PyHKEY docstrings */
PyDoc_STRVAR(PyHKEY_doc,
diff --git a/PC/config.c b/PC/config.c
index fee254a..c246e7e 100644
--- a/PC/config.c
+++ b/PC/config.c
@@ -58,7 +58,6 @@ extern void init_codecs_tw(void);
extern void init_subprocess(void);
extern void init_lsprof(void);
extern void init_ast(void);
-extern void init_types(void);
extern void init_fileio(void);
extern void initatexit(void);
@@ -146,7 +145,6 @@ struct _inittab _PyImport_Inittab[] = {
{"builtins", NULL},
{"sys", NULL},
- {"_types", init_types},
{"_fileio", init_fileio},
{"atexit", initatexit},
diff --git a/PC/example_nt/readme.txt b/PC/example_nt/readme.txt
index 37a9c29..b83888c 100644
--- a/PC/example_nt/readme.txt
+++ b/PC/example_nt/readme.txt
@@ -2,12 +2,34 @@ Example Python extension for Windows NT
=======================================
This directory contains everything needed (except for the Python
-distribution!) to build a Python extension module using Microsoft VC++
-("Developer Studio") version 7.1. It has been tested with VC++ 7.1 on
-Python 2.4. You can also use earlier versions of VC to build Python
-extensions, but the sample VC project file (example.dsw in this directory)
-is in VC 7.1 format. Notice that you need to use the same compiler version
-that was used to build Python itself.
+distribution!) to build a Python extension module using Microsoft VC++.
+Notice that you need to use the same compiler version that was used to build
+Python itself.
+
+The simplest way to build this example is to use the distutils script
+'setup.py'. To do this, simply execute:
+
+ % python setup.py install
+
+after everything builds and installs, you can test it:
+
+ % python -c "import example; example.foo()"
+ Hello, world
+
+See setup.py for more details. alternatively, see below for instructions on
+how to build inside the Visual Studio environment.
+
+Visual Studio Build Instructions
+================================
+
+These are instructions how to build an extension using Visual C++. The
+instructions and project files have not been updated to the latest VC
+version. In general, it is recommended you use the 'setup.py' instructions
+above.
+
+It has been tested with VC++ 7.1 on Python 2.4. You can also use earlier
+versions of VC to build Python extensions, but the sample VC project file
+(example.dsw in this directory) is in VC 7.1 format.
COPY THIS DIRECTORY!
--------------------
diff --git a/PC/example_nt/setup.py b/PC/example_nt/setup.py
new file mode 100644
index 0000000..0443bc7
--- /dev/null
+++ b/PC/example_nt/setup.py
@@ -0,0 +1,22 @@
+# This is an example of a distutils 'setup' script for the example_nt
+# sample. This provides a simpler way of building your extension
+# and means you can avoid keeping MSVC solution files etc in source-control.
+# It also means it should magically build with all compilers supported by
+# python.
+
+# USAGE: you probably want 'setup.py install' - but execute 'setup.py --help'
+# for all the details.
+
+# NOTE: This is *not* a sample for distutils - it is just the smallest
+# script that can build this. See distutils docs for more info.
+
+from distutils.core import setup, Extension
+
+example_mod = Extension('example', sources = ['example.c'])
+
+
+setup(name = "example",
+ version = "1.0",
+ description = "A sample extension module",
+ ext_modules = [example_mod],
+)