[issue5094] datetime lacks concrete tzinfo impl. for UTC
Brett Cannon br...@python.org added the comment: I'm still leary of supporting any form of DST. A proper DST implementation would need to have some conditional code to account for the datetime object passed into dst, and yet the version you have prototyped doesn't handle it. So a proper timezone supporting DST would still need to subclass any concrete class. I still say keep it as simple as possible and let users subclass as needed to add DST support. Subclassing __init__ and dst() is not difficult if you want to add proper DST support, especially if dst() is set to return timdelta(0) and utcoffset() always returns CONSTANT + self.dst(). And just to mention it, the instance attributes you had in your example, Alexander, were not private. For any final code, make sure you make them private else you are asking for trouble from people starting to rely on those attributes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8894] urllib2 authentication manager retries forever if password is wrong
New submission from jurjen Bos j.bos-inter...@xs4all.nl: If you use an authentication manager from urllib2, it will submit user code and password if authentication fails. However, if the password is wrong, the authentication manager will happily try again, again with the same password. A simple way to circumvent this is attached: it modifies the password manager's behaviour to submit each password only once. One problem I see is in cases where a program needs to log in multiple times in the same site: I propose an extra call to the password manager to reset the visited flag. More details and sample code are in the file. -- components: Library (Lib) files: circumvent.py messages: 107009 nosy: Jurjen priority: normal severity: normal status: open title: urllib2 authentication manager retries forever if password is wrong type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file17545/circumvent.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8894 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8894] urllib2 authentication manager retries forever if password is wrong
Senthil Kumaran orsent...@gmail.com added the comment: There was a fix made in issue8797, which adopts a retry approach before failing for wrong password. This is present for Basic Auth and Digest Auth, so the problem wont be faced. Jurjen, do you have any comments before I mark this as Invalid. I see you have adopted a different approach for the patch, but the result would be same (no infinite retries) -- assignee: - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8894 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8894] urllib2 authentication manager retries forever if password is wrong
jurjen Bos j.bos-inter...@xs4all.nl added the comment: Yep you're right. In that thread they are talking about the exact same problem as I was having. Obviously, I didn't find that one when I was looking for the problem in the database before I posted this. I do have my doubts about the 5 retries they propose though, I am not sure that the web site I use will not block the account if someone does 5 attempts. - Jurjen -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8894 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8890] Module logging has dangerous examples
Henri Salo he...@nerv.fi added the comment: Please note that there is other similar examples as well. Even on the same page. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8894] urllib2 authentication manager retries forever if password is wrong
Senthil Kumaran orsent...@gmail.com added the comment: Okay, so there is another negative vote 5 retries in the basic auth. But yeah, this bug can be marked duplicate. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8894 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8894] urllib2 authentication manager retries forever if password is wrong
Senthil Kumaran orsent...@gmail.com added the comment: Duplicate of issue8797 -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8894 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp
jurjen Bos j.bos-inter...@xs4all.nl added the comment: I would like to point out that this is not going to work if someone visits more than 5 sites with the same authentication manager. This would have to be documentated, at least. We could fix this by putting the retry counter in the HTTPPasswordMgr; it is not hard to put in an extra field in the password database with the retry counter. See also my remarks in issue8894 -- nosy: +Jurjen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8890] Module logging has dangerous examples
Henri Salo he...@nerv.fi added the comment: We should review all of these: install/index.rst: python setup.py build --build-base=/tmp/pybuild/foo-1.0 install/index.rst: python setup.py install --install-base=/tmp install/index.rst:would install pure modules to :file:`{/tmp/python/lib}` in the first case, and install/index.rst:to :file:`{/tmp/lib}` in the second case. (For the second case, you probably install/index.rst:want to supply an installation base of :file:`/tmp/python`.) library/pipes.rst:f=t.open('/tmp/1', 'w') library/pipes.rst:open('/tmp/1').read() library/mailcap.rst:mailcap.findmatch(d, 'video/mpeg', filename='/tmp/tmp1223') library/mailcap.rst: ('xmpeg /tmp/tmp1223', {'view': 'xmpeg %s'}) library/logging.rst: LOG_FILENAME = '/tmp/logging_rotatingfile_example.out' library/logging.rst: /tmp/logging_rotatingfile_example.out library/logging.rst: /tmp/logging_rotatingfile_example.out.1 library/logging.rst: /tmp/logging_rotatingfile_example.out.2 library/logging.rst: /tmp/logging_rotatingfile_example.out.3 library/logging.rst: /tmp/logging_rotatingfile_example.out.4 library/logging.rst: /tmp/logging_rotatingfile_example.out.5 library/logging.rst:The most current file is always :file:`/tmp/logging_rotatingfile_example.out`, library/logging.rst: filename='/tmp/myapp.log', library/logging.rst:which results in output (written to ``/tmp/myapp.log``) which should look library/atexit.rst: _count = int(open(/tmp/counter).read()) library/atexit.rst: open(/tmp/counter, w).write(%d % _count) library/imghdr.rst:imghdr.what('/tmp/bass.gif') library/tempfile.rst: '/var/folders/5q/5qTPn6xq2RaWqk+1Ytw3-U+++TI/-Tmp-/tmpG7V1Y0' library/tempfile.rst: * On all other platforms, the directories :file:`/tmp`, :file:`/var/tmp`, and library/tempfile.rst::file:`/usr/tmp`, in that order. library/posixfile.rst: file = posixfile.open('/tmp/test', 'w') library/cgi.rst: cgitb.enable(display=0, logdir=/tmp) library/optparse.rst: prog -v --report /tmp/report.txt foo bar library/optparse.rst:takes one argument, ``/tmp/report.txt`` is an option argument. ``foo`` and library/rexec.rst: :file:`/tmp` or uploading it to the :file:`/incoming` directory of your public library/rexec.rst::file:`/tmp` to be written, we can subclass the :class:`RExec` class:: library/rexec.rst: # check filename : must begin with /tmp/ library/rexec.rst: if file[:5]!='/tmp/': library/rexec.rst: raise IOError(can't write outside /tmp) library/rexec.rst:called :file:`/tmp/foo/../bar`. To fix this, the :meth:`r_open` method would library/rexec.rst:have to simplify the filename to :file:`/tmp/bar`, which would require splitting library/compiler.rst::file:`/tmp/doublelib.py`. :: library/compiler.rst:mod = compiler.parseFile(/tmp/doublelib.py) library/zipimport.rst:subdirectory. For example, the path :file:`/tmp/example.zip/lib/` would only library/zipimport.rst: $ unzip -l /tmp/example.zip library/zipimport.rst: Archive: /tmp/example.zip library/zipimport.rst:sys.path.insert(0, '/tmp/example.zip') # Add .zip file to front of path library/zipimport.rst: '/tmp/example.zip/jwzthreading.py' library/trace.rst: # make a report, placing output in /tmp library/trace.rst: r.write_results(show_missing=True, coverdir=/tmp) library/nntplib.rst:f = open('/tmp/article') library/bsddb.rst:db = bsddb.btopen('/tmp/spam.db', 'c') library/sqlite3.rst::file:`/tmp/example` file:: library/sqlite3.rst: conn = sqlite3.connect('/tmp/example') tutorial/inputoutput.rst:f = open('/tmp/workfile', 'w') tutorial/inputoutput.rst: open file '/tmp/workfile', mode 'w' at 80a0960 tutorial/inputoutput.rst:f = open('/tmp/workfile', 'r+') tutorial/inputoutput.rst: with open('/tmp/workfile', 'r') as f: whatsnew/2.3.rst: a...@nyman:~/src/python$ unzip -l /tmp/example.zip whatsnew/2.3.rst: Archive: /tmp/example.zip whatsnew/2.3.rst:sys.path.insert(0, '/tmp/example.zip') # Add .zip file to front of path whatsnew/2.3.rst: '/tmp/example.zip/jwzthreading.py' whatsnew/2.3.rst:subdirectory; for example, the path :file:`/tmp/example.zip/lib/` would only whatsnew/2.3.rst: os.stat(/tmp).st_mtime whatsnew/2.3.rst: os.stat(/tmp).st_mtime whatsnew/2.0.rst: output = UTF8_streamwriter( open( '/tmp/output', 'wb') ) whatsnew/2.0.rst: input = UTF8_streamreader( open( '/tmp/output', 'rb') ) whatsnew/2.6.rst: shutil.copytree('Doc/library', '/tmp/library', whatsnew/2.6.rst:# to the /tmp directory. whatsnew/2.6.rst:z.extract('Python/sysmodule.c', '/tmp') whatsnew/2.6.rst:plistlib.writePlist(data_struct, '/tmp/customizations.plist') whatsnew/2.6.rst:new_struct = plistlib.readPlist('/tmp/customizations.plist') whatsnew/2.7.rst:- ./python.exe argparse-example.py -v -o /tmp/output -C 4 file1 file2 whatsnew/2.7.rst:{'output': '/tmp/output', whatsnew/2.4.rst: sts
[issue8895] newline arg/attribute in the module io
New submission from Jean-Michel Fauth wxjmfa...@gmail.com: I was confused about the newline argument/attribute in the misc. classes of the io module until I realize there is a spelling issue between the docs and the real implementation. (Py 2.6.5, Py2.7b2). Py 3.x not tested. sys.version 2.7b2 (r27b2:81019, May 9 2010, 11:33:14) [MSC v.1500 32 bit (Intel)] sio = io.StringIO(u'abc') sio.encoding, type(sio.encoding) (None, type 'NoneType') sio.errors, type(sio.errors) (None, type 'NoneType') sio.newline, type(sio.newline) Traceback (most recent call last): File psi last command, line 1, in module AttributeError: '_io.StringIO' object has no attribute 'newline' sio.newlines, type(sio.newlines) (None, type 'NoneType') tio = io.TextIOWrapper(io.BytesIO()) tio.buffer, type(tio.buffer) (_io.BytesIO object at 0x02E6E600, type '_io.BytesIO') tio.encoding, type(tio.encoding) ('cp1252', type 'str') tio.errors, type(tio.errors) ('strict', type 'str') tio.line_buffering, type(tio.line_buffering) (False, type 'bool') tio.newline, type(tio.newline) Traceback (most recent call last): File psi last command, line 1, in module AttributeError: '_io.TextIOWrapper' object has no attribute 'newline' tio.newlines, type(tio.newlines) (None, type 'NoneType') sys.version 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] import io tio = io.TextIOWrapper(io.BytesIO()) tio.encoding, type(tio.encoding) ('cp1252', type 'str') tio.line_buffering, type(tio.line_buffering) (False, type 'bool') tio.errors, type(tio.errors) (u'strict', type 'unicode') tio.newline, type(tio.newline) Traceback (most recent call last): File psi last command, line 1, in module AttributeError: 'TextIOWrapper' object has no attribute 'newline' tio.newlines, type(tio.newlines) (None, type 'NoneType') [e for e in dir(tio) if 'new' in e] ['__new__', 'newlines'] -- components: IO messages: 107017 nosy: jmfauth priority: normal severity: normal status: open title: newline arg/attribute in the module io versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4487] Add utf8 alias for email charsets
Marc-Andre Lemburg m...@egenix.com added the comment: R. David Murray wrote: R. David Murray rdmur...@bitdance.com added the comment: For various reasons the email module has a table of character sets. What might be most effective would be for the email module to look a character set name up in the codecs module and find out the cannonical name of the character set, and then look that up in its table (ie: remove the aliases table from email completely, and instead depend on codecs to resolve the cannonical name). Unfortunately the codecs module does not recognize all of the aliases used by email, nor is there necessarily any guarantee that the two modules will agree on the proper cannonical name. I think that the encodings package should be the only source of valid aliases and encoding names - after all, you wouldn't be able to process email content using names or aliases not appearing in the encodings package tables. If there are aliases missing, then we can add them there. If the email packages needs different canonical names, it can apply its own map on the canonical names returned by the encodings package. -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4487 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Antoine Pitrou pit...@free.fr added the comment: You should write your patch against Python 3.x (py3k). -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
anatoly techtonik techto...@gmail.com added the comment: On Fri, Jun 4, 2010 at 1:11 AM, Éric Araujo rep...@bugs.python.org wrote: Sorry for writing when tired. Clearer first sentence: If it does not change the code to match the docs or to fix a regression from an older version, it’s a feature. This is the biggest problem with rigidness Python process. In this specific case the patch doesn't make Python any more unstable and according to policy it won't be integrated into Python 2.7 unless release manager chooses otherwise. But! release manager is overwhelmed, so it is VERY unlikely that he will include this patch, because it is a distraction, and there are always more important stuff to judge. In addition RM can be incompetent in this particular part of Python dist and just couldn't take the risk of making random decisions. To resolve this bottleneck and help release managers make decisions, community members should be able to vote on patches. Then release managers could be able to make releases that satisfy more Python users. In addition the part of this decision for particular component of Python dist could be delegated to component maintainers preserving RM's right to veto any opinion. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
Tarek Ziadé ziade.ta...@gmail.com added the comment: community members should be able to vote on patches *or* the core dev responsible for the development of the incriminated package, which is me for distutils. This is an improvement, not a feature, and this won't make it to 2.7. While distutils is now frozen, I agree that we can add it in 3.2 -- priority: normal - low versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
Tarek Ziadé ziade.ta...@gmail.com added the comment: by the way, I am not sure what you call a binary sirting of zip files (since two equivalent zip files can have different metadata) but if you mean comparing a unzip -l output, you could use zipinfo instead, to sort the output. Overall, you need to compare the size and CRC of each file. I don't know if zipinfo does this. Maybe this could be a feature in the zipfile module in python. a same_archive() function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
Éric Araujo mer...@netwok.org added the comment: “This is an improvement, not a feature” I used the two terms with the same meaning :) Do we add this to distutils in 3.2 and distutils2 too? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Forest Bond for...@alittletooquiet.net added the comment: I haven't yet touched Python 3.0, and may not have time to dig in at the moment. It wouldn't be suitable to provide a patch against 2.7? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Antoine Pitrou pit...@free.fr added the comment: I haven't yet touched Python 3.0, and may not have time to dig in at the moment. It wouldn't be suitable to provide a patch against 2.7? 2.7 is almost in release candidate phase, which means it's much too late for new features now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8895] newline vs. newlines in io module
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. Could you check the docs for 3.1 and 3.x trunk (py3k) too? -- assignee: - d...@python components: +Documentation -IO nosy: +d...@python, merwok stage: - needs patch title: newline arg/attribute in the module io - newline vs. newlines in io module ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8893] file.{read,readlines} behaviour on Solaris
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +tim_one stage: - patch review versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8893 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8893] file.{read,readlines} behaviour on Solaris
Antoine Pitrou pit...@free.fr added the comment: The patch looks harmless to me, although I'm not sure we're guaranteeing any of the behaviour you are expecting. Éric, the buffering layer in 3.x is not libc-based, and therefore shouldn't exhibit this particular issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8893 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8895] newline vs. newlines in io module
R. David Murray rdmur...@bitdance.com added the comment: This is as documented: http://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines The keyword argument is named 'newline', the attribute is named 'newlines'. The attribute does not record what was passed to the newline argument, rather it records what newlines have been actually encountered. -- nosy: +r.david.murray resolution: - invalid stage: needs patch - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Forest Bond for...@alittletooquiet.net added the comment: Okay, I'll submit against py3k. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
anatoly techtonik techto...@gmail.com added the comment: Tarek Ziadé ziade.ta...@gmail.com added the comment: community members should be able to vote on patches *or* the core dev responsible for the development of the incriminated package, which is me for distutils. This is said in the last part of the quoted msg107020: In addition the part of this decision for particular component of Python dist could be delegated to component maintainers preserving RM's right to veto any opinion. While distutils is now frozen, I agree that we can add it in 3.2 It would be nice if Python process could allow me to maintain my own patched version of Python stdlibs so that I can use it instead of main stdlib and quickly switch between them. It would be nice to be able to share such patches and see in which versions (or forks) they were integrated. I wonder if PSF license allows that? by the way, I am not sure what you call a binary sirting of zip files I am not sure where did you see me mention that binary sirting too. =) (since two equivalent zip files can have different metadata) but if you mean comparing a unzip -l output, you could use zipinfo instead, to sort the output. I use well-defined development toolchain for working with binary files that can detect insignificant change in some kind of binary data like timestamps in .zip archive, but comparing moving blocks is a disaster. I need to analyze exact binary copies for troubleshooting issue8871 closely related to issue8870 to exclude any chance that binary .exe generated by distutils on non-MS filesystem differs from the one generated on MS FS. Even if it seems such a minor issue, believe me that you do not want to meet any other minor issues when investigating 12 points checklist for some distutils bug that could be actually a well-known MS problem, when the problem you need to solve is misbehaving SCons installer that needs to install a couple of files in somehow seems to be protected windows directories in Python installation. Overall, you need to compare the size and CRC of each file. I don't know if zipinfo does this. Maybe this could be a feature in the zipfile module in python. a same_archive() function. No. The archives should be generated consistently, but it is impossible to create perfectly matching bdist_wininst archive anyway, because timestamps will differ. FTR, this function has been moved to shutil, still with the zip shadowing and without the sorting. Tarek, are you going to deal with shadowing? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Forest Bond for...@alittletooquiet.net added the comment: Should the module be called rfc2388 or should it go into email.mime as formdata? It seems odd to put something HTML/HTTP related into email.mime, but maybe that would be fine. In any case, httplib docs should probably point to this module with an example, right? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3243] Support iterable bodies in httplib
Changes by Éric Araujo mer...@netwok.org: -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3243 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Éric Araujo mer...@netwok.org added the comment: I think it belongs in the http package. -- nosy: +merwok ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp
R. David Murray rdmur...@bitdance.com added the comment: +1 for putting retry control on the password manager. Probably the default should be set to 1. If I understand correctly, it is the password manager that would be prompting the user for a new password, if someone chose to implement such a password manager. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Forest Bond for...@alittletooquiet.net added the comment: As http.formdata? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8893] file.{read,readlines} behaviour on Solaris
Christophe Kalt pyt...@ote.taranis.org added the comment: This is on Solaris 10, but I also see it on Solaris 8 w/ Python 2.4. Just tried Python 3.6.1, and it doesn't seem to have that problem. Python 2.7b2 has the problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8893 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
Tarek Ziadé ziade.ta...@gmail.com added the comment: I use well-defined development toolchain for working with binary files that can detect insignificant change in some kind of binary data like timestamps in .zip archive, but comparing moving blocks is a disaster. Please explain us how you compare the content of two zip archives. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8893] file.{read,readlines} behaviour on Solaris
Christophe Kalt pyt...@ote.taranis.org added the comment: Antoine: I'm not sure what the expected behaviour should be either, this is certainly for others more familiar with Python than I to decide. Although I am certainly annoyed that the current behaviour differs between Solaris and Linux. Haven't had time to check other platforms to see how things should be. Also, the behaviour seems inconsistent between the various file methods on Solaris which seems wrong. Finally, from looking into fileobject.c, clearerr() is used in most places and the omissions (corrected by my patch) do seem unintentional to me, e.g. bugs. Hope this helps. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8893 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Éric Araujo mer...@netwok.org added the comment: Seems good to me, as long as the module docstring clearly stats whether it’s useful for the client side, the server side or both. BTW, isn’t there overlap with cgi.FieldStorage? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
Éric Araujo mer...@netwok.org added the comment: It would be nice if Python process could allow me to maintain my own patched version of Python stdlibs so that I can use it instead of main stdlib and quickly switch between them. It’s free software, you have the right to copy, edit and release it. As for the technical aspect of easy switching, editing sys.path seems the way to go, or use PYTHONPATH to give your custom stdlib modules to have precedence over the real stdlib. I’ll stop being off-topic now. :) Tarek, seen my question about distutils2? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
Éric Araujo mer...@netwok.org added the comment: It would be nice if Python process could allow me to maintain my own patched version of Python stdlibs so that I can use it instead of main stdlib and quickly switch between them. It’s free software, you have the right to copy, edit and release it. As for the technical aspect of easy switching, editing sys.path seems the way to go, or use PYTHONPATH to give your custom stdlib modules to have precedence over the real stdlib. I’ll stop being off-topic now. :) Tarek, seen my question about distutils2? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
Changes by Éric Araujo mer...@netwok.org: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Forest Bond for...@alittletooquiet.net added the comment: Hi, Patch attached. Let me know what needs fixing. I had to fix a bug in email.encoders for my tests to pass. I have not run the full test suite at this point (need to build py3k to do that, maybe I'll have time later today, but if someone else has time, feel free). Thanks, Forest -- keywords: +patch Added file: http://bugs.python.org/file17546/http_formdata.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Forest Bond for...@alittletooquiet.net added the comment: Éric, Sorry, I just read your message. I'll post a new patch with a module docstring. I believe cgi.FieldStorage is only useful for parsing (i.e. on the server side). MIMEMultipartFormData is for generating multipart/form-data messages (i.e. on the client side). Thanks, Forest -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp
Senthil Kumaran orsent...@gmail.com added the comment: Agree to single retry for Basic Auth. We are just dealing with BasicAuthentication here, so that's why we did not have in the HTTPPasswdManager. But, let me consider that viewpoint too. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Forest Bond for...@alittletooquiet.net added the comment: Here's a new patch. -- Added file: http://bugs.python.org/file17547/http_formdata.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Éric Araujo mer...@netwok.org added the comment: Would you please open another issue for the email fix? Bonus points if you test it on trunk too, since release candidate happens in some days :) Do you people think we could unify client and server-side code in the new module (with an alias from cgi for b/w compat), to prevent endless questions? Minor remark: I think we don’t have to follow the email naming scheme here. A simpler name like FormData could be just fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Forest Bond for...@alittletooquiet.net added the comment: Hm, there is one issue. The example in the docstring wouldn't work. You have to get the headers *after* the body, because the boundary isn't generated until the body has been. So this would work: body = msg.get_body() headers = dict(msg) But this won't: headers = dict(msg) body = msg.get_body() I'm not sure what the best way to deal with this is. Maybe instead of get_body we should have get_request_data which returns both headers and body. That would provide simpler semantics. Thoughts? Thanks, Forest -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
anatoly techtonik techto...@gmail.com added the comment: I use well-defined development toolchain for working with binary files that can detect insignificant change in some kind of binary data like timestamps in .zip archive, but comparing moving blocks is a disaster. Please explain us how you compare the content of two zip archives. Here is the open source approach. I use soviet swiss army knife Far Manager tool from http://www.farmanager.com/ that some years ago became open sourced under revised BSD license. It can not compare files itself, but allows you to switch forth and back between two dumps of files in hex view with Ctrl-Tab / Ctrl-Shift-Tab shortcuts. The comparison is done with standard windows command line tool fc. It is better to explain by example - I will list the key you need to type and explanation below - keyboard shortcuts are in square barckets. Right panel is C:\Downloads\python-wget\dist, left panel is M:\, the cursor is placed on file wget-0.6.win32.force.exe that is present in left and right panels and is the subject for comparison 1. fc /b [Ctrl-Enter] [Ctrl-]][Ctrl-Enter] this will give you the command line `fc /b wget-0.6.win32.force.exe M:\wget-0.6.win32.force.exe` 2. [Ctrl-Home]edit: this will give you the command line `edit:fc /b wget-0.6.win32.force.exe M:\wget-0.6.win32.force.exe` 3. [Enter] this will execute the output and open embedded editor with the results. You will see hex offsets of differences 4. [Ctrl-Tab] your are back to file panels, but editor stays in a background - notice the [0+1] marker in top left corner - it says that 0 viewers and 1editor window are available. 5. F3 you've opened current wget-0.6.win32.force.exe in embedded viewer 6. F4 you've opened hex view for this file 7. [Ctrl-Shift-Tab] you're back at the fc output, copy the hex offset into clipboard with [Ctrl-Ins] 8. [Ctrl-Tab] you're again at the hex view of the subject file 9. [Alt-F8][Shift-Ins][Enter] you're at the offset where difference start 10. [Ctrl-Tab] you're back at file panels 11. [Tab] switch to passive panel, repeat 5,6 and 9 for file from passive panel 12. now you can switch back and forth between differences in files with [Ctrl-Tab]/[Ctrl-Shift-Tab]. You may want to switch to text view with F4 for convenience. I make all 12 steps in less than 20 seconds without using any plugins or macros. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
Éric Araujo mer...@netwok.org added the comment: I think Takek asked more for a description of the diff algo (e.g. “compare the CRC”, “compare all files”, etc.), not the UI of one tool. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8891] sort files before archiving for consistency
anatoly techtonik techto...@gmail.com added the comment: On Fri, Jun 4, 2010 at 3:10 PM, Éric Araujo rep...@bugs.python.org wrote: It would be nice if Python process could allow me to maintain my own patched version of Python stdlibs so that I can use it instead of main stdlib and quickly switch between them. It’s free software, you have the right to copy, edit and release it. Sound good, but in reality I still have to get back the rest of the quote: I wonder if PSF license allows that? As for the technical aspect of easy switching, editing sys.path seems the way to go, or use PYTHONPATH to give your custom stdlib modules to have precedence over the real stdlib. Good starting point. The sync with stdlib and patch management is a bigger issue though. I’ll stop being off-topic now. :) Yep. In Google Wave we could split it earlier and clean up this one. =) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Forest Bond for...@alittletooquiet.net added the comment: New patch: * Renames class to FormData. * Replaces method get_body with get_request_data to simplify semantics. * Drops changes to email.encoders. I'll create a new ticket to deal with that bug. Note that tests here fail without that fix. -- Added file: http://bugs.python.org/file17548/http_formdata.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8895] newline vs. newlines in io module
Jean-Michel Fauth wxjmfa...@gmail.com added the comment: 2010/6/4 R. David Murray rep...@bugs.python.org R. David Murray rdmur...@bitdance.com added the comment: This is as documented: http://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines The keyword argument is named 'newline', the attribute is named 'newlines'. The attribute does not record what was passed to the newline argument, rather it records what newlines have been actually encountered. Ok, I see. I read, reread the doc prior posting, and, in my mind, it is not obvious to understand this subtle difference from the doc. Sorry for the noise. Regards. -- Added file: http://bugs.python.org/file17549/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8895 ___brbrdiv class=gmail_quote2010/6/4 R. David Murray span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/spanbrblockquote class=gmail_quote style=margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; br R. David Murray lt;a href=mailto:rdmur...@bitdance.com;rdmur...@bitdance.com/agt; added the comment:br br This is as documented:br br  a href=http://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines; target=_blankhttp://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines/abr br The keyword argument is named #39;newline#39;, the attribute is named #39;newlines#39;.  The attribute does not record what was passed to the newline argument, rather it records what newlines have been actually encountered.br /blockquote/divbrOk, I see. I read, reread the doc prior posting, and, in my mind, it is not obvious to understand this subtle difference from the doc.brSorry for the noise.brRegards.brbr ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8890] Module logging has dangerous examples
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Other logging cases contained /tmp/ has now been removed, the missing parenthesis added and the result checked in to trunk (r81684). I'll keep the issue open for the cases which remain in the other documentation. but remove myself from the assigned-to and change the resolution to accepted. -- assignee: vinay.sajip - resolution: fixed - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8890] Module logging has dangerous examples
Éric Araujo mer...@netwok.org added the comment: Thanks for the listing Henri. Not all of these examples have to be changed; I’ll review them in some days if you want. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8895] newline vs. newlines in io module
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file17549/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8895] newline vs. newlines in io module
Éric Araujo mer...@netwok.org added the comment: Could you think of a way to improve the docs on that point? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str
New submission from Forest Bond for...@alittletooquiet.net: Ran into this while tackling issue3244. Encoded payload members should not be bytes. In the case of base64, we should have an ascii string. -- components: Library (Lib) files: python-email-encoders-base64-str.patch keywords: patch messages: 107055 nosy: forest_atq priority: normal severity: normal status: open title: email.encoders.encode_base64 sets payload to bytes, should set to str versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file17550/python-email-encoders-base64-str.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Forest Bond for...@alittletooquiet.net added the comment: See issue8896 for email.encoders fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7475] codecs missing: base64 bz2 hex zlib ...
Éric Araujo mer...@netwok.org added the comment: Related: bytes vs. str for base64 encoding in email, #8896 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7475 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str
Changes by Éric Araujo mer...@netwok.org: -- nosy: +l0nwlf, r.david.murray versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3244] multipart/form-data encoding
Forest Bond for...@alittletooquiet.net added the comment: I don't think Python trunk has the encoders issue, as that is related to the base64 moving to the bytes type. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5094] datetime lacks concrete tzinfo impl. for UTC
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Jun 3, 2010 at 3:19 PM, Mark Dickinson rep...@bugs.python.org wrote: .. Aren't there valid timezones that are offset by more than 12 hours from UTC? Indeed, Christmas Island uses UTC+14. (http://en.wikipedia.org/wiki/Kiritimati). The most western timezone seems to be UTC-12 used on two uninhabited islands. http://en.wikipedia.org/wiki/Time_zone#Time_zone_as_offsets_from_UTC The tzinfo specification requires [-24, 24] hours range: .. the value returned must be a timedelta object specifying a whole number of minutes in the range -1439 to 1439 inclusive (1440 = 24*60; the magnitude of the offset must be less than one day). -- http://docs.python.org/dev/py3k/library/datetime.html#datetime.tzinfo.utcoffset I am torn between two options with a slight preference for the first: 1. Don't do any checking in the constructor and allow any timedelta used as an offset. This is the simplest to implement and most future proof. For example, it may be desirable to extend [-24, 24] to at least [-99, 99] to allow round-tripping of compliant RFC 3339 timestamps. (Note that I am not suggesting that real life more than a day offsets are possible, but once a standard allows impossible values, people tend to abuse them as special markers in their data.) 2. Require [-24, 24] hours range. This is the letter of the current tzinfo.utcoffset() definition. Opinions? What do you think -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5094] datetime lacks concrete tzinfo impl. for UTC
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Merging in issue7584 nosy list. -- nosy: +durban, l0nwlf, r.david.murray, techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6312] httplib fails with HEAD requests to pages with transfer-encoding: chunked
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6312 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8890] Module logging has dangerous examples
Henri Salo he...@nerv.fi added the comment: Please review the changes for the quality of the documentation. There probably is still more places to change. References can be made to: http://docs.python.org/library/tempfile.html#tempfile.mkstemp -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8890] Modules have dangerous examples in documentation
Changes by Henri Salo he...@nerv.fi: -- title: Module logging has dangerous examples - Modules have dangerous examples in documentation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str
R. David Murray rdmur...@bitdance.com added the comment: This is a duplicate of issue 4768. Could you attach your patch to that issue, please? -- assignee: - r.david.murray superseder: - email.generator.Generator object bytes/str crash - b64encode() bug? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?
Forest Bond for...@alittletooquiet.net added the comment: Attaching patch from reported duplicate issue8896. -- nosy: +forest_atq Added file: http://bugs.python.org/file17551/python-email-encoders-base64-str.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str
Forest Bond for...@alittletooquiet.net added the comment: Duplicate. See issue4768. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?
Forest Bond for...@alittletooquiet.net added the comment: Note that my patch is roughly the same as the original posted by haypo. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7584] datetime.rfcformat() for Date and Time on the Internet
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: It seems to me that we should not try to produce an RFC 3339 compliant date string from a naive datetime. It will be practical to accept that restriction once issue 5094 is resolved. Does this mean that t.rfcformat() should fail if t is naive? According to my reading of RFC 3339, it is not correct to produce 'Z' timestamps when local offset is not known. My understanding is that compliant producers must either know their local timezone and specify correct offset in the suffix or produce UTC timestamps with '-00:00'. Consumers receiving a '...Z' timestamp should be able to rely on that to conclude that the producer is in the UTC+0 timezone. Raising an exception when local offset is not known is OK, but I think generating '-00:00' would be more useful. Note that overall I am -1 on this proposal. A naive application can probably get away with datetime.isoformat. A strictly compliant RFC 3339 implementation is beyond the scope of datetime module and belongs to a separate module which should probably support parsing of RFC 3339 timestamps as well. Rather than adding more xxxformat() methods, I would rather see datetime getting a custom __format__ that would be flexible enough to make writing standard formats easy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing
Tal Einat talei...@users.sourceforge.net added the comment: This goes down into _json.scanstring. Looking at the C code for scanstring_unicode, the strict parameter allow control characters inside strings: if strict is zero then literal control characters are allowed. From the code itself (current py3k head, r81032), it seems this means any character = 0x1f. See scanstring_unicode in http://svn.python.org/view/python/branches/py3k/Modules/_json.c?revision=81032view=markup for details. Documentation should be updated accordingly. -- nosy: +taleinat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4785 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing
Tal Einat talei...@users.sourceforge.net added the comment: This goes down into _json.scanstring. Looking at the C code for scanstring_unicode, strict=False allows control characters inside strings: if strict is zero then literal control characters are allowed. From the code itself (current py3k head, r81032), it seems this means any character = 0x1f. See scanstring_unicode in http://svn.python.org/view/python/branches/py3k/Modules/_json.c?revision=81032view=markup for details. Documentation should be updated accordingly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4785 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7584] datetime.rfcformat() for Date and Time on the Internet
R. David Murray rdmur...@bitdance.com added the comment: I see I didn't think it through far enough. Given this, it seems that the Atom standard is saying, if you don't know your actual UTC offset, you can't generate a valid ATOM timestamp. Which sorta makes sense, though you'd think they'd want to accept a -00:00 timestamp since then at least you know when the article was generated/modified, even if you don't know the local time of the poster. And maybe they do, since as someone pointed out -00:00 is a numeric offest... I agree that generalizing the production of custom formats sounds like a better way forward long term. I'm not clear on why you think RFC3339 deserves its own module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8828] Atomic function to rename a file
R. David Murray rdmur...@bitdance.com added the comment: Victor: you could always name it best_effort_at_atomic_rename :) -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4487] Add utf8 alias for email charsets
R. David Murray rdmur...@bitdance.com added the comment: Mark, any objection to my putting this patch in now, and then we'll fix the aliases implementation in 3.2? -- versions: +Python 3.1, Python 3.2 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4487 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5094] datetime lacks concrete tzinfo impl. for UTC
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I'm still leary of supporting any form of DST. A proper DST implementation would need to have some conditional code to account for the datetime object passed into dst, and yet the version you have prototyped doesn't handle it. No, any tzinfo implementation where utcoffset(dt) depends on dt is broken because once utcoffset starts to vary with time you can no longer determine a point in time from the local time alone. (In theory, a continuously increasing or decreasing in time utcoffset is an exception to this rule, but there is no practical use for those.) This limitation is admitted in datetime.tzinfo documentation: Note that there are unavoidable subtleties twice per year in a tzinfo subclass accounting for both standard and daylight time, at the DST transition points. ... Applications that can’t bear such ambiguities should avoid using hybrid tzinfo subclasses; there are no ambiguities when using UTC, or any other fixed-offset tzinfo subclass (such as a class representing only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)). (See three paragraphs above http://docs.python.org/dev/py3k/library/datetime.html#strftime-and-strptime-behavior) In pytz, http://pytz.sourceforge.net/#tzinfo-api, tzinfo API is extended to add an is_dst flag to utcoffset(), tzname(), and dst() methods, but since datetime objects do not carry this flag, it is impossible for datetime module to pass this flag to timezone within datetime.datetime methods and datetime module does not know about this flag to begin with. To add insult to injury, the extended API still does not solve all the problems: http://pytz.sourceforge.net/#problems-with-localtime. So a proper timezone supporting DST would still need to subclass any concrete class. No, as I explained above, it is not possible to implement a proper timezone. I believe most of the frustration with the current tzinfo API stems from the fact that it is not implementable. The correct interface to a timezone database should provide a mapping from (universal time, geographical location) to civil time there and then. A common name for the timezone in use and information about DST being in effect is useful for interoperability but not strictly required. This is what I implemented in my localtime() prototype in localtime.py (loosing DST information) and datetimeex.py (interoperable with POSIX timetupe based interfaces and pytz extended API). Note that on systems supporting extended tm structure (with tm_zone and tm_gmtoff fields), it is possible to implement localtime() which will take advantage of the full historical timezone information available on the system. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5094] datetime lacks concrete tzinfo impl. for UTC
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: +tim_one ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?
R. David Murray rdmur...@bitdance.com added the comment: Yes, but yours was better formatted, so I used it :) Thanks for the patch. Applied in r81685 to py3k, and r81686. -- resolution: accepted - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Ezio Melotti ezio.melo...@gmail.com added the comment: I added a test for the 'ignore' error handler. I will commit the patch before the RC unless someone has something against it. To summarize, the patch updates PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629, so: 1) Invalid sequences are now handled as described in http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95); 2) 5- and 6-bits-long sequences are now invalid (no changes in behavior, I just removed the deafult: of the switch/case and marked them with '0' in the first table); 3) According to RFC 3629, codepoints in the surrogate range (U+D800-U+DFFF) should be considered invalid, but this would not be backward compatible, so I added code and tests but left them commented away; 4) I changed the error message unexpected code byte to invalid start byte and invalid data to invalid continuation byte; 5) I added an extensive set of tests in test_unicode; 6) I fixed test_codeccallbacks because it was failing after this change. -- Added file: http://bugs.python.org/file17552/issue8271v5.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?
R. David Murray rdmur...@bitdance.com added the comment: @garazi111: if you have an example where quopri fails, please open a new issue for it. I suspect you are right that there is a problem there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6312] httplib fails with HEAD requests to pages with transfer-encoding: chunked
Senthil Kumaran orsent...@gmail.com added the comment: Fixed in r81687, r81688, r81689 and r81690. Yes, I see that before the original change was made any chuncked encoding went through _read_chunked which close the resp before returning. So, here for HEAD, the resp is closed thus fixing the problem mentioned by djc. -- priority: release blocker - resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6312 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6312] httplib fails with HEAD requests to pages with transfer-encoding: chunked
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Might be useful to have a test for this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6312 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8864] multiprocessing: undefined struct/union member: msg_control
Martin v. Löwis mar...@v.loewis.de added the comment: Fixed in r81692, r81694. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8864 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5467] tools\msi\merge.py is sensitive to lack of config.py
Martin v. Löwis mar...@v.loewis.de added the comment: The patch is now out of date; merge.py got merged into msi.py. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5467 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6312] httplib fails with HEAD requests to pages with transfer-encoding: chunked
Senthil Kumaran orsent...@gmail.com added the comment: I saw the earlier tests was closing it explicitly. Removed that and added a test which verifies the closed resp obj. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6312 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8897] sunau bytes / str TypeError in Py3k
New submission from Thomas Jollans tho...@jollans.com: The sunau module, essentially, doesn't work. This looks like a problem with the bytes/unicode transition of str in Python 3.x vs Python 2: Python 3.1.2 (r312:79147, Apr 15 2010, 15:35:48) [GCC 4.4.3] on linux2 Type help, copyright, credits or license for more information. import sunau aufile = sunau.open('test.au', 'w') aufile.setsampwidth(2) aufile.setframerate(44100) aufile.setnchannels(1) aufile.writeframes(b'aabbccdd') Exception wave.Error: Error('# channels not specified',) in bound method Wave_write.__del__ of wave.Wave_write object at 0x1fa8ed0 ignored Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python3.1/sunau.py, line 393, in writeframes self.writeframesraw(data) File /usr/lib/python3.1/sunau.py, line 383, in writeframesraw self._ensure_header_written() File /usr/lib/python3.1/sunau.py, line 418, in _ensure_header_written self._write_header() File /usr/lib/python3.1/sunau.py, line 452, in _write_header self._file.write(self._info) TypeError: must be bytes or buffer, not str The wave and aifc modules work as expected when used like this, as does the above code in Python 2.6. Au_read.readframes correctly returns a bytes. I haven't tested this on a development version of Python. -- components: Library (Lib) messages: 107081 nosy: tjollans priority: normal severity: normal status: open title: sunau bytes / str TypeError in Py3k type: behavior versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8897 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4487] Add utf8 alias for email charsets
Marc-Andre Lemburg m...@egenix.com added the comment: R. David Murray wrote: R. David Murray rdmur...@bitdance.com added the comment: Mark, any objection to my putting this patch in now, and then we'll fix the aliases implementation in 3.2? No. Please open a new issue targeting Python 3.2 for this. Thanks, -- Marc-Andre Lemburg eGenix.com 2010-07-19: EuroPython 2010, Birmingham, UK44 days to go ::: Try our new mxODBC.Connect Python Database Interface for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4487 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8895] newline vs. newlines in io module
Jean-Michel Fauth wxjmfa...@gmail.com added the comment: 2010/6/4 Ãric Araujo rep...@bugs.python.org Ãric Araujo mer...@netwok.org added the comment: Could you think of a way to improve the docs on that point? -- Quick and dirty answer. I have ~10 years experience with Python and it seems to me the io module is technically excellent. However, I have found it is not so obvious to understand the usage of all these arguments, errors, encoding, line_buffering, ... in the class constructors and methods like io.open(). The doc describes what these arguments are, their states, but not too much how to use them. As an exemple, I read some time ago on the c.l.p mailing list, somebody complaining about the encoding argument of the class TextIOWrapper. He defined an encoding='utf-8' in the ctor and did not understand why his text was not automagically encoded. Answer: the encoding arg is only a kind of information and does not do anything. BTW, it was only when I read that post, I understand a little bit more. Regards. -- Added file: http://bugs.python.org/file17553/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8895 ___brbrdiv class=gmail_quote2010/6/4 Ãric Araujo span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/spanbrblockquote class=gmail_quote style=margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; br Ãric Araujo lt;a href=mailto:mer...@netwok.org;mer...@netwok.org/agt; added the comment:br br Could you think of a way to improve the docs on that point?br br --br divdiv/divdiv class=h5br/div/div/blockquote/divQuick and dirty answer.brbrI have ~10 years experience with Python and it seemsbrto me the io module is technically excellent.brbrHowever, I have found it is not so obvious tobr understand the usage of all these arguments,brerrors, encoding, line_buffering, ... in the brclass constructors and methods like io.open().brbrThe doc describes what these arguments are,brtheir states, but not too much how to usebr them.brbrAs an exemple, I read some time ago on the c.l.pbrmailing list, somebody complaining about the quot;encodingquot;brargument of the class TextIOWrapper. He defined an brquot;encoding=#39;utf-8#39;quot; in the ctor and did notbr understand why his quot;textquot; was not automagicallybrencoded. Answer: the encoding arg is only a kindbrof information and does not do anything.brbrBTW, it was only when I read that post, I understandbra little bit more.br brRegards.brbr ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5464] msgfmt.py does not work with plural form
Martin v. Löwis mar...@v.loewis.de added the comment: This is now fixed in r81697 and r81698. -- resolution: - fixed status: open - closed versions: +Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5464 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8895] newline vs. newlines in io module
R. David Murray rdmur...@bitdance.com added the comment: This is off topic for this issue, but what you just reported makes no sense to me. TextIOWrapper calls the encoder corresponding to the specified encoding in its write method. That said, it is true that the IO docs are currently a class reference and not a user reference, and this should be fixed. There may even already be an open issue for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1647654] No obvious and correct way to get the time zone offset
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Issue #1667546 is more ambitious than this. I propose a very simple patch which makes tm_zone and tm_gmtoff available on systems with HAVE_STRUCT_TM_TM_ZONE defined (Linux and BSD variants). The additional fields are only allowed as attributes so len(time.localtime()) is still the same. This choice allows to get access to extra fields without breaking code that relies on the size of timetuple. The patch needs documentation updates which I will add if the idea is well received. -- keywords: +patch nosy: +mark.dickinson stage: - patch review versions: +Python 3.2 -Python 2.7, Python 3.1 Added file: http://bugs.python.org/file17554/issue1647654.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1647654 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1647654] No obvious and correct way to get the time zone offset
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Added file: http://bugs.python.org/file17555/issue1647654a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1647654 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4
Martin v. Löwis mar...@v.loewis.de added the comment: Following the python-dev consensus, I have now added a warning to the 2.7 installer that this will be the last release supporting Windows 2000. I still think that we should not bump the SDK version above 500 for 2.7. Changing the SDK level does *not just* enable new API functions and constants, it may also change the layout of structures, causing applications to break on earlier systems (see the desaster with SystemParametersInfo, #1601). Bumping the version for 3.2 is fine. -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6926 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8899] Add docstrings to time.struct_time
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: The time.struct_time class is missing class and field docstrings: time.struct_time.__doc__ is None True time.struct_time.tm_year.__doc__ is None True This is significant because it is not obvious that field values are different from those of C language struct tm fields with the same names. (While module level docstring describes the timetuple, it does not list the names of the struct_time fields or mentions struct_time.) With the attached patch, from time import * localtime() time.struct_time(tm_year=2010, tm_mon=6, tm_mday=4, tm_hour=15, tm_min=27, tm_sec=15, tm_wday=4, tm_yday=155, tm_isdst=1) help(_) Help on struct_time object: time.struct_time = class struct_time(__builtin__.object) | The time value as returned by gmtime(), localtime(), and strptime(), and accepted | by asctime(), mktime() and strftime(), may be considered as a sequence of 9 integers. | Note that several fields' values are not the same as those defined by the C language | standard for struct tm. For example, the value of tm_year is the actual year, not | year - 1900. See individual fields' descriptions for details. ... | -- | Data descriptors defined here: | | tm_hour | hours, range [0 - 23] | | tm_isdst | 1 if summer time is in effect, 0 if not, and -1 if cannot be determined | | tm_mday | day of month, range [1 - 31] | | tm_min | minutes, range [0 - 59] | | tm_mon | month of year, range [1 - 12] | | tm_sec | seconds, range [0 - 61]) | | tm_wday | day of week, range [0,6], Monday is 0 | | tm_yday | day of year, range [1,366] | | tm_year | year, for example, 1993 | | -- -- assignee: belopolsky components: Documentation files: struct_time_doc.diff keywords: easy, patch messages: 107089 nosy: belopolsky, d...@python, mark.dickinson priority: normal severity: normal stage: commit review status: open title: Add docstrings to time.struct_time type: feature request versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file17556/struct_time_doc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8899 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6470] Tkinter import fails when running Python.exe from a network share
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks for the patch. Committed as r81701, r81702, r81703 and r81704. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6470 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4487] Add utf8 alias for email charsets
R. David Murray rdmur...@bitdance.com added the comment: Patch committed to trunk in r81705. Leaving issue open pending porting to the other branches, but I've also opened issue 8898 to further change things so that codecs becomes the sole authority for aliases in 3.2. -- resolution: - fixed stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4487 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5094] datetime lacks concrete tzinfo impl. for UTC
Brett Cannon br...@python.org added the comment: For the allowable range, follow the datetime docs as someone might be relying on that specification already. As for the ongoing DST debate, it seems we either need to say that since we cannot properly support all possible datetimes properly we should simply not even try, fixed offset or not, or we provide a class that gives the proper UTC offset, but in no way adjusts itself as people might expect or want. I'm arguing for the former, Alexander wants the latter. I still stand by my argument that it is not needed for the two use cases that we concretely have in the stdlib for a timezone class: a UTC instance and %z directive in strptime. Unless there is some way for the %z directive to specify that it is actually DST, I still think the functionality of the class should be kept to a functional minimum for our needs and let people needing more support, including fixed offset DST, decide how they want to handle it. I can still see a naive user thinking that DST is the same around the world and being taken by surprise when thing don't adjust accordingly by the timezone when he does ``timezone(PDT, 7, dst=True)``. Plus giving people any semblance of a DST-supporting timezone class is just going to lead for more calls of the stdlib to include concrete timezone instances that do manage DST. Unless other people step forward to debate this we probably are not going to reach consensus without going to python-dev to see what others think. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8898] The email package should defer to the codecs module for all aliases
Shashwat Anand anand.shash...@gmail.com added the comment: from email.charset.ALIASES most of them failed to be recognize by codecs module. for i in email.charset.ALIASES.keys(): ... try: ... codecs.lookup(i) ... except LookupError: ... print(Not recognized by codecs : alias {} mapped to {}.format(i, email.charset.ALIASES[i])) ... ... Not recognized by codecs : alias latin-8 mapped to iso-8859-14 Not recognized by codecs : alias latin-9 mapped to iso-8859-15 Not recognized by codecs : alias latin-2 mapped to iso-8859-2 Not recognized by codecs : alias latin-3 mapped to iso-8859-3 codecs.CodecInfo object for encoding iso8859-1 at 0x10160af58 Not recognized by codecs : alias latin-6 mapped to iso-8859-10 Not recognized by codecs : alias latin-7 mapped to iso-8859-13 Not recognized by codecs : alias latin-4 mapped to iso-8859-4 Not recognized by codecs : alias latin-5 mapped to iso-8859-9 codecs.CodecInfo object for encoding euc_jp at 0x1016260b8 Not recognized by codecs : alias latin-10 mapped to iso-8859-16 codecs.CodecInfo object for encoding ascii at 0x101626120 Not recognized by codecs : alias latin_10 mapped to iso-8859-16 codecs.CodecInfo object for encoding iso8859-1 at 0x10160aae0 Not recognized by codecs : alias latin_2 mapped to iso-8859-2 Not recognized by codecs : alias latin_3 mapped to iso-8859-3 Not recognized by codecs : alias latin_4 mapped to iso-8859-4 Not recognized by codecs : alias latin_5 mapped to iso-8859-9 Not recognized by codecs : alias latin_6 mapped to iso-8859-10 Not recognized by codecs : alias latin_7 mapped to iso-8859-13 Not recognized by codecs : alias latin_8 mapped to iso-8859-14 Not recognized by codecs : alias latin_9 mapped to iso-8859-15 codecs.CodecInfo object for encoding cp949 at 0x101626390 codecs.CodecInfo object for encoding euc_kr at 0x101626530 So basically apart from latin-1 all the latin* failed to be recognized by codecs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: The timedelta(seconds=0.6112295) example is handled correctly because 0.6112295 sec is not half way between two nearest microseconds: abs(0.6112295 - 0.6112290) == abs(0.6112295 - 0.6112300) False The fact that it displays as if it is does not make timedelta rounding wrong. I am still not sure that it is possible to accumulate rounding error by adding seven doubles, each 1 to affect the rounded result. While proving that the rounding is always correct or finding a counter-example is an interesting puzzle, I think it has little practical value. I will add unit tests and get this patch ready for for commit review, but setting the priority to low. -- components: +Extension Modules priority: normal - low versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: The half-way check should be done with decimal arihmetics, but the result is the same: x = Decimal(0.6112295) abs(x - Decimal('0.6112290')) == abs(x - Decimal('0.6112300')) False -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8899] Add docstrings to time.struct_time
Georg Brandl ge...@python.org added the comment: Patch review: * Quite a few lines are pretty long. Please stay below 80 chars/line. * There are trailing spaces in two member docs. * The range notation is inconsistent. [first, last] or [first, last+1) is what we generally use. * if cannot be determined does not sound grammatical, maybe just unknown is better. * Between strftime() and may be considered the sentence should be split. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8899 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics
Mark Dickinson dicki...@gmail.com added the comment: The timedelta(seconds=0.6112295) example is handled correctly No, it's not! It's being rounded *up* where it should be being rounded *down*. because 0.6112295 sec is not half way between two nearest microseconds Exactly. The actual value stored by the C double is a little closer to 0.611229 than to 0.611230. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8898] The email package should defer to the codecs module for all aliases
Marc-Andre Lemburg m...@egenix.com added the comment: Shashwat Anand wrote: Shashwat Anand anand.shash...@gmail.com added the comment: from email.charset.ALIASES most of them failed to be recognize by codecs module. for i in email.charset.ALIASES.keys(): ... try: ... codecs.lookup(i) ... except LookupError: ... print(Not recognized by codecs : alias {} mapped to {}.format(i, email.charset.ALIASES[i])) ... ... Not recognized by codecs : alias latin-8 mapped to iso-8859-14 Not recognized by codecs : alias latin-9 mapped to iso-8859-15 Not recognized by codecs : alias latin-2 mapped to iso-8859-2 Not recognized by codecs : alias latin-3 mapped to iso-8859-3 codecs.CodecInfo object for encoding iso8859-1 at 0x10160af58 Not recognized by codecs : alias latin-6 mapped to iso-8859-10 Not recognized by codecs : alias latin-7 mapped to iso-8859-13 Not recognized by codecs : alias latin-4 mapped to iso-8859-4 Not recognized by codecs : alias latin-5 mapped to iso-8859-9 codecs.CodecInfo object for encoding euc_jp at 0x1016260b8 Not recognized by codecs : alias latin-10 mapped to iso-8859-16 codecs.CodecInfo object for encoding ascii at 0x101626120 Not recognized by codecs : alias latin_10 mapped to iso-8859-16 codecs.CodecInfo object for encoding iso8859-1 at 0x10160aae0 Not recognized by codecs : alias latin_2 mapped to iso-8859-2 Not recognized by codecs : alias latin_3 mapped to iso-8859-3 Not recognized by codecs : alias latin_4 mapped to iso-8859-4 Not recognized by codecs : alias latin_5 mapped to iso-8859-9 Not recognized by codecs : alias latin_6 mapped to iso-8859-10 Not recognized by codecs : alias latin_7 mapped to iso-8859-13 Not recognized by codecs : alias latin_8 mapped to iso-8859-14 Not recognized by codecs : alias latin_9 mapped to iso-8859-15 codecs.CodecInfo object for encoding cp949 at 0x101626390 codecs.CodecInfo object for encoding euc_kr at 0x101626530 So basically apart from latin-1 all the latin* failed to be recognized by codecs. We need to add aliases for those codecs. The current aliases list only supports the format latinN for N in 1-10. -- title: The email package should defer to the codecs module for all aliases - The email package should defer to the codecs module for all aliases ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8899] Add docstrings to time.struct_time
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Please see fixes in issue8899.diff. * Quite a few lines are pretty long. Please stay below 80 chars/line. Fixed. * There are trailing spaces in two member docs. Fixed. * The range notation is inconsistent. [first, last] or [first, last+1) is what we generally use. Fixed in docstrings and time.rst. * if cannot be determined does not sound grammatical, maybe just unknown is better. Fixed. POSIX spec uses if the information is not available, but I like * Between strftime() and may be considered the sentence should be split. Fixed in docstrings and time.rst. -- Added file: http://bugs.python.org/file17557/issue8899.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8899 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com