[pywin32-checkins] pywin32/win32/help py3k.html,1.2,1.3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: Mark H. <mha...@us...> - 2009-02-03 03:20:24
|
Update of /cvsroot/pywin32/pywin32/win32/help In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11097/win32/help Modified Files: py3k.html Log Message: update state of py3k work Index: py3k.html =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/help/py3k.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** py3k.html 31 Jan 2009 05:50:41 -0000 1.2 --- py3k.html 3 Feb 2009 03:20:20 -0000 1.3 *************** *** 12,20 **** </p> <h1>Unicode everywhere</h1> <p> ! In general, pywin32 on Python 2.x will accept both str and unicode ! objects and convert as appropriate. In Python 3.x byte() objects ! are generally not accepted; strings must be unicode. </p> <p> --- 12,29 ---- </p> + <p> + <strong>Important:</strong> This py3k support is experimental and + things are subject to change. In particular, we may occasionally + accept 'insane' args, such as accepting bytes when only a unicode + string object makes sense etc. We reserve the right to cleanup any + such issues that may arise in a backwards incompatible manner. + </p> + <h1>Unicode everywhere</h1> <p> ! In general, pywin32 on both Python 2.x and 3.x will accept both str ! and unicode objects and convert as appropriate. In py3k, bytes objects ! which need to be converted to str (unicode) are still decoded as ! 'mbcs' rather than the python default encoding. </p> <p> *************** *** 22,25 **** --- 31,57 ---- thus will call the Unicode versions of the Windows API. </p> + <h1>Specific module notes</h1> + <h2>isapi</h2> + <p> + The isapi package supports py3k, but note that currently only the + <code>redirector.py</code> sample has been converted to work in + both environments - in particular, subtle urllib changes will + probably require attention - see the redirector sample for details. + </p> + <p> + Note that ISAPI itself is a narrow-character based API. As a result, + functions such as + <a href="EXTENSION_CONTROL_BLOCK__GetServerVariable_meth.html">GetServerVariable()</a> + etc all return bytes objects - it is up to the application to + interpret those bytes. pywin32 detects server variables starting + with UNICODE_ and does return unicode objects in that case - see + the IIS documentation for more details. + </p> + <p>If you pass a unicode object to the ISAPI functions, it will be + automatically encoded using the default encoding rather than the + 'mbcs' encoding used by the rest of pywin32. In general this should + be avoided as IIS doesn't define an encoding. + </p> + <h1>datetime objects</h1> <p> *************** *** 34,37 **** --- 66,77 ---- </p> <p> + Note that it is possible we will support "time zone naive" objects + in the future, as supporting such objects in the future will be fully + backwards compatible. However, it is not yet clear that supporting + such objects is helpful due to the ambiguities that may arise, and + attempting to remove such support in the future would cause more + problems than enabling it. + </p> + <p> The <a href="win32timezone__now_meth.html">win32timezone.now</a> and <a href="win32timezone__utcnow_meth.html">win32timezone.utcnow</a> methods |