[ python-Bugs-1496315 ] strptime: wrong default values used to fill in missing data
Bugs item #1496315, was opened at 2006-05-28 11:26 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496315&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Markus Gritsch (markus_gritsch) Assigned to: Nobody/Anonymous (nobody) Summary: strptime: wrong default values used to fill in missing data Initial Comment: The documentation of strptime() says: """The default values used to fill in any missing data are (1900, 1, 1, 0, 0, 0, 0, 1, -1)""". As the example below shows, this is not the case. Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.strptime('', '') (1900, 1, 1, 0, 0, 0, 0, 1, -1) >>> time.strptime('2006', '%Y') (2006, 1, 1, 0, 0, 0, 6, 1, -1) >>> time.strptime('2006-05', '%Y-%m') (2006, 5, 1, 0, 0, 0, 0, 121, -1) >>> time.strptime('2006-05-26', '%Y-%m-%d') (2006, 5, 26, 0, 0, 0, 4, 146, -1) >>> time.strptime('2006-05-26 21', '%Y-%m-%d %H') (2006, 5, 26, 21, 0, 0, 4, 146, -1) >>> time.strptime('2006-05-26 21:06', '%Y-%m-%d %H:%M') (2006, 5, 26, 21, 6, 0, 4, 146, -1) >>> time.strptime('2006-05-26 21:06:11', '%Y-%m-%d %H:%M:%S') (2006, 5, 26, 21, 6, 11, 4, 146, -1) -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496315&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Feature Requests-1080727 ] Add encoding to DocFileSuite
Feature Requests item #1080727, was opened at 2004-12-08 01:47 Message generated for change (Comment added) made by quiver You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1080727&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Unicode Group: None >Status: Closed >Resolution: Accepted Priority: 5 Submitted By: Bjorn Tillenius (bjoti) Assigned to: Jim Fulton (dcjim) Summary: Add encoding to DocFileSuite Initial Comment: If one writes doctests within documentation strings of classes and functions, it's possible to use non-ASCII characters since one can specify the encoding used in the source file. But if one wants to combine the documentation and testing, by writing a text file, and thus use DocFileSuite, it's not possible to use non-ASCII characters in the tests. This is because there's no way of specifying which encoding the text file uses. Instead one has to \-quote all non-ASCII characters, and that makes the tests harder to read IMHO. -- >Comment By: George Yoshida (quiver) Date: 2006-05-29 02:14 Message: Logged In: YES user_id=671362 Thanks Bjorn. Commited in revision: 46502. -- Comment By: George Yoshida (quiver) Date: 2006-05-15 02:42 Message: Logged In: YES user_id=671362 Updated the patch for the trunk. Documentation is also included. If there is no objection, I'll commit it before 2.5 a3 rolled out. -- Comment By: Jim Fulton (dcjim) Date: 2005-11-15 07:50 Message: Logged In: YES user_id=73023 The patch looks good to me. I haven't looked at the tests, but I assume that they are good too. I will look at them. :) I'm also going to add PEP 263-style encoding specification. Thanks! -- Comment By: Bjorn Tillenius (bjoti) Date: 2005-09-14 05:12 Message: Logged In: YES user_id=1032069 Attaching new version of the patch that will apply cleanly against latest CVS -- Comment By: Tim Peters (tim_one) Date: 2005-09-14 03:59 Message: Logged In: YES user_id=31435 Ed, can you make time to review this patch? If not, please unassign it again. -- Comment By: Bjorn Tillenius (bjoti) Date: 2004-12-19 03:05 Message: Logged In: YES user_id=1032069 Uploaded new patch, which adds the possibility to specify an encoding to testfile as well, since I assume this is desirable. -- Comment By: Bjorn Tillenius (bjoti) Date: 2004-12-18 23:08 Message: Logged In: YES user_id=1032069 Added patch for Tim to review. -- Comment By: Tim Peters (tim_one) Date: 2004-12-15 12:09 Message: Logged In: YES user_id=31435 Unassigned myself -- can't make time to work on it. I'll be happy to review a patch (code/tests/docs) if one appears. I approve of the idea . -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1080727&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1496315 ] strptime: wrong default values used to fill in missing data
Bugs item #1496315, was opened at 2006-05-28 02:26 Message generated for change (Comment added) made by bcannon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496315&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Markus Gritsch (markus_gritsch) >Assigned to: Brett Cannon (bcannon) Summary: strptime: wrong default values used to fill in missing data Initial Comment: The documentation of strptime() says: """The default values used to fill in any missing data are (1900, 1, 1, 0, 0, 0, 0, 1, -1)""". As the example below shows, this is not the case. Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> time.strptime('', '') (1900, 1, 1, 0, 0, 0, 0, 1, -1) >>> time.strptime('2006', '%Y') (2006, 1, 1, 0, 0, 0, 6, 1, -1) >>> time.strptime('2006-05', '%Y-%m') (2006, 5, 1, 0, 0, 0, 0, 121, -1) >>> time.strptime('2006-05-26', '%Y-%m-%d') (2006, 5, 26, 0, 0, 0, 4, 146, -1) >>> time.strptime('2006-05-26 21', '%Y-%m-%d %H') (2006, 5, 26, 21, 0, 0, 4, 146, -1) >>> time.strptime('2006-05-26 21:06', '%Y-%m-%d %H:%M') (2006, 5, 26, 21, 6, 0, 4, 146, -1) >>> time.strptime('2006-05-26 21:06:11', '%Y-%m-%d %H:%M:%S') (2006, 5, 26, 21, 6, 11, 4, 146, -1) -- >Comment By: Brett Cannon (bcannon) Date: 2006-05-28 11:29 Message: Logged In: YES user_id=357491 The docs need to be fixed to say those are the default values except when strptime() can infer better ones. There is a lot of smarts in the algorithm that do calculations to fill in missing data as best as possible, and that is what is happening here. Thanks for the bug report. I will try to fix this some time this week. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496315&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1496501 ] tarfile.py: dict order dependency
Bugs item #1496501, was opened at 2006-05-28 18:42 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496501&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: Armin Rigo (arigo) Assigned to: Nobody/Anonymous (nobody) Summary: tarfile.py: dict order dependency Initial Comment: When guessing the type of a file, tarfile.py tries to open it in .tar, .tar.gz and .tar.bz2 modes successfully. The problem is that in conjunction with a fileobj argument, failed attempts can advance the current position of the fileobj, and cause the following attempts to fail as well. This didn't show up so far because, by chance, the order in which the OPEN_METH dictionary is enumerated is somehow the "correct" one. The problem can be seen by changing this order and re-running test_tarfile.py; for example, reverse the order (tarfile.py line 1013): for comptype in reversed(cls.OPEN_METH): -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496501&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1496539 ] Modules in cwd can't be imported in interactive mode
Bugs item #1496539, was opened at 2006-05-28 21:57 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496539&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.5 Status: Open Resolution: None Priority: 5 Submitted By: iga Seilnacht (zseil) Assigned to: Nobody/Anonymous (nobody) Summary: Modules in cwd can't be imported in interactive mode Initial Comment: Python puts an empty string as the first element of sys.path when the script directory is not available. Starting with revision 46372 this entry isn't interpreted as a marker for the current working directory any more. Windows doesn't have this problem, since current directory is explicitly inserted into sys.path. How to reproduce: Python 2.5a2 (trunk:46372M, May 28 2006, 21:29:19) [GCC 4.1.0 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> import sys >>> os.listdir(os.getcwd()) ['mymodule.pyc', 'mymodule.py'] >>> import mymodule Traceback (most recent call last): ... ImportError: No module named mymodule >>> sys.path_importer_cache[''] = True >>> import mymodule >>> I tested with revisions 46371, 46372 and 46504. The problem is not present in revision 46371, but is still present in 46504. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496539&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1496539 ] Modules in cwd can't be imported in interactive mode
Bugs item #1496539, was opened at 2006-05-28 19:57 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496539&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core Group: Python 2.5 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: iga Seilnacht (zseil) Assigned to: Nobody/Anonymous (nobody) Summary: Modules in cwd can't be imported in interactive mode Initial Comment: Python puts an empty string as the first element of sys.path when the script directory is not available. Starting with revision 46372 this entry isn't interpreted as a marker for the current working directory any more. Windows doesn't have this problem, since current directory is explicitly inserted into sys.path. How to reproduce: Python 2.5a2 (trunk:46372M, May 28 2006, 21:29:19) [GCC 4.1.0 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> import sys >>> os.listdir(os.getcwd()) ['mymodule.pyc', 'mymodule.py'] >>> import mymodule Traceback (most recent call last): ... ImportError: No module named mymodule >>> sys.path_importer_cache[''] = True >>> import mymodule >>> I tested with revisions 46371, 46372 and 46504. The problem is not present in revision 46371, but is still present in 46504. -- >Comment By: Georg Brandl (gbrandl) Date: 2006-05-28 20:11 Message: Logged In: YES user_id=849994 This was actually sitting around in my local trunk, having fixed it on the plane :) Thanks for reminding me, checked in the fix in rev. 46508. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496539&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1496561 ] Building Python 2.4.3 on Solaris 9/10 with Sun Studio 11
Bugs item #1496561, was opened at 2006-05-28 22:35 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1496561&group_id=5470 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Parser/Compiler Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Andreas (andyfloe) Assigned to: Nobody/Anonymous (nobody) Summary: Building Python 2.4.3 on Solaris 9/10 with Sun Studio 11 Initial Comment: If Python 2.4.3 is build on Solaris 9 or 10 with Sun Studio 11 [cc: Sun C 5.8 2005/10/13], some of the tests of roundup fail with a core dump of Python. If build with gcc [gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)] all runs as expected. I have compiled Python and bsd 4.3 on Solaris with Sun Studio as follows: ##-- rebuild Berkeley DB version 4.3.29 URL='http://www.sleepycat.com' BUILDDIR=/builddir SRCDIR=/mnt/a VERSION=4.3.29 PKG=db STAR="${PKG}"-"${VERSION}".tar.gz cd "$BUILDDIR" gunzip -d -c "${SRCDIR}"/"${STAR}" | tar xvf - cd "${PKG}-${VERSION}" PREFIX=/opt/db4 CC=cc; export CC CXX=CC; export CXX PATH=/opt/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin; export PATH unset LD_LIBRARY_PATH TIMESTAMP=`date +%Y%m%d%H%M%S` cd build_unix ../dist/configure --prefix="${PREFIX}" \ --enable-compat185 --disable-dump185 \ --enable-shared --enable-static --enable-cxx 2>&1 | \ tee /var/tmp/"${PKG}-${VERSION}"_configure_${TIMESTAMP} make 2>&1 | tee /var/tmp/"${PKG}-${VERSION}"_make_${TIMESTAMP} ##- install ## done as user 'root' #- source the above environment variables cd "$BUILDDIR"/"${PKG}"-"${VERSION}"/build_unix make install 2>&1 | \ tee /var/tmp/"${PKG}-${VERSION}"_make_install_`date '+%Y%m%d%H%M%S'` cd .. LIBS=' /opt/db4/lib/libdb-4.3.so /opt/db4/lib/libdb-4.3.la /opt/db4/lib/libdb_cxx-4.3.so /opt/db4/lib/libdb_cxx-4.3.la /opt/db4/lib/libdb-4.3.a /opt/db4/lib/libdb.a /opt/db4/lib/libdb_cxx-4.3.a /opt/db4/lib/libdb_cxx.a /opt/db4/lib/libdb_cxx.so ' ls -l $LIBS chown root:root $LIBS chmod 755 $LIBS cd /usr/include ## the setup.py script in the Python source only looks for specific ## locations for the header file for the bsddb ln -s /opt/db4/include /usr/include/db4 # chmod 755 /usr/lib/libdb*.so ##- installing Python 2.4.3 BUILDDIR=/builddir SRCDIR=/mnt/a VERSION=2.4.3 STAR=Python-2.4.3.tar.bz2 PKG=`echo $STAR | sed -e '[EMAIL PROTECTED]@@' -e '[EMAIL PROTECTED]@@' -e '[EMAIL PROTECTED]@@' ` CC=cc; export CC CXX=CC; export CXX PATH=/opt/SUNWspro/bin:/usr/ccs/bin:/usr/bin/:/opt/db4/bin:/sbin/bin; export PATH LDFLAGS='-R/opt/db4/lib -L/opt/db4/lib'; export LDFLAGS CPPFLAGS='-I/opt/db4/include'; export CPPFLAGS cd $BUILDDIR bunzip2 -c $SRCDIR/$STAR | /usr/sfw/bin/gtar -xvf - cd "$PKG" patch -p0 < /mnt/a/python_curses_1471938.patch ./configure --prefix=/usr --without-gcc \ | tee /var/tmp/"${PKG}"-"$VERSION"_configure_`date '+%Y%m%d%H%M%S'` make | tee /var/tmp/"${PKG}"-"$VERSION"_make_`date '+%Y%m%d%H%M%S'` make test | tee /var/tmp/"${PKG}"-"$VERSION"_make_test_`date '+%Y%m%d%H%M%S'` # done as user 'root' cd $BUILDDIR/"$PKG" make install | tee /var/tmp/"${PKG}"-"$VERSION"_make_install_`date '+%Y%m%d%H%M%S'` All Python 2.4.3 test run OK, see 256 tests OK. CAUTION: stdout isn't compared in verbose mode: a test that passes in verbose mode may fail without it. 1 test failed: test_nis 34 tests skipped: test_aepack test_al test_applesingle test_bsddb185 test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses test_gdbm test_gl test_imgfile test_linuxaudiodev test_locale test_macfs test_macostools test_normalization test_ossaudiodev test_pep277 test_plistlib test_scriptpackages test_socket_ssl test_socketserver test_tcl test_timeout test_unicode_file test_urllib2net test_urllibnet test_winreg test_winsound 2 skips unexpected on sunos5: test_tcl test_locale If running the tests of the software package roundup 1.1.2 if reveive a core dump from the Python interpreter. -bash-3.00$ python ./run_tests.py Running unit tests at level 1 Running unit tests from /export/home/builddir/roundup-1.1.2/. Including anydbm tests Skipping metakit tests Skipping mysql tests Skipping postgresql tests Including sqlite tests Skipping tsearch2 tests testDontRetireAdminOrAnonymous (test.test_actions.RetireActionTestCase) ... ok testNoPermission (test.test_actions.RetireActionTestCase) ... ok testRetireAction (test.test_actions.RetireActionTestCase) ... ok testNoPermission (test.test_actions.StandardSearchActionTestCase) ... ok testQueryName (test.test_actions.StandardSearchActionTestCase) ... ok testEmptyKey (test.test_actions.FakeFilterVarsTestCase) ... ok testEmptyMultilink (test.test_actions.FakeFilterVarsTestCase) ... ok testNonEmpty