[issue9298] binary email attachment issue with base64 encoding

2011-02-12 Thread Yves Dorfsman
Yves Dorfsman added the comment: I've got two issues with this code (Lib/email/test/test_email.py): 1128 def test_body(self): 1129 eq = self.assertEqual 1130 bytes = b'\xfa\xfb\xfc\xfd\xfe\xff' 1131 msg = MIMEApplication(bytes) 1132 eq(msg.get_payload(), '+v

[issue11197] information leakage with SimpleHTTPServer

2011-02-12 Thread Gregory P. Smith
Gregory P. Smith added the comment: Agreed, fixing this is going to be too complex for 3.2.0, it'll be done for 3.2.1. Reading over the http.server Simple and CGI HTTPRequestHandler code I see there many problems with the way this code does things today. General: * I'm not sure urllib.parse

[issue11160] ZipFile.comment expects bytes

2011-02-12 Thread yeswanth
yeswanth added the comment: can we use str.encode() function to convert string into bytes ? -- ___ Python tracker ___ ___ Python-bugs

[issue11160] ZipFile.comment expects bytes

2011-02-12 Thread yeswanth
yeswanth added the comment: IMO the Zipfile.comment should accept strings too instead of just accepting bytes , so patching should help i guess -- nosy: +swamiyeswanth ___ Python tracker _

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hello, > I spent today some time to rewrite `memoryobject.c`, and cleaning up > the Py_buffer handling in it. (I wrote also the Numpy PEP 3118 > implementation, so this was straightforward to do.) Thanks for trying this. > - Rewritten memoryobject: > > http:

[issue11181] TLS end connection not detected properly in retrbinary

2011-02-12 Thread Adi Roiban
Adi Roiban added the comment: Hi, I apologies for raising this issues. It looks like FTP_TLS is not available in Python 3.1 ... and retrbinary is working in Python 2.7. What I actually done, was backporting ftplib.py from 2.7 to 2.5 and using pyOpenSSL instead of the standard ssl module. I

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-12 Thread Pauli Virtanen
Pauli Virtanen added the comment: I spent today some time to rewrite `memoryobject.c`, and cleaning up the Py_buffer handling in it. (I wrote also the Numpy PEP 3118 implementation, so this was straightforward to do.) The end result is here: https://bitbucket.org/pv/cpython-stuff/changesets

[issue11126] Wave.py does not always write proper length in header

2011-02-12 Thread jtidman
jtidman added the comment: Yep, your solution is better. I can provide some text files (lists of numbers) and two programs, wave2text.py and text2wav.py. These are the programs I wrote that found this issue in the first place. Add a few checks and you could run text2wave.py and then wave2t

[issue10084] SSL support for asyncore

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: First comments: - secure_connection() should be named ssl_something() like other methods. ssl_start() perhaps? - in ssl_shutdown(): +elif err.args[0] == ssl.SSL_ERROR_SSL: +pass SSL_ERROR_SSL doesn't exist. Perhaps you mea

[issue11204] re module: strange behaviour of space inside {m, n}

2011-02-12 Thread John Machin
New submission from John Machin : A pattern like r"b{1,3}\Z" matches "b", "bb", and "bbb", as expected. There is no documentation of the behaviour of r"b{1, 3}\Z" -- it matches the LITERAL TEXT "b{1, 3}" in normal mode and "b{1,3}" in verbose mode. # paste the following at the interactive prom

[issue9298] binary email attachment issue with base64 encoding

2011-02-12 Thread Yves Dorfsman
Yves Dorfsman added the comment: I will. Please don't use my patch yet, it breaks something else in the test_email: ./python Lib/test/regrtest.py test_email [1/1] test_email test test_email failed -- Traceback (most recent call last): File "/export/incoming/python/py3k/Lib/email/test/test_em

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Anders Østhus
Anders Østhus added the comment: Thank you for taking the time to explain it to me, but it still seems inconsistent to me. I did a test with the functions copy, copy2, move, os.rename, copyfile, both on the same filesystem and another filesystem, and the result is: Same filesystem: s

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > On my system (Win Server 2008 R2 64-Bit, Python 2.7.1), when I use > copy, copy2 or move(to another filesystem), the file _will_ get the > ACL of the DST folder, and remove any ACL in SRC file that the DST > folder does not have. > > Thus, it doesn't copy it

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Anders Østhus
Anders Østhus added the comment: On my system (Win Server 2008 R2 64-Bit, Python 2.7.1), when I use copy, copy2 or move(to another filesystem), the file _will_ get the ACL of the DST folder, and remove any ACL in SRC file that the DST folder does not have. Thus, it doesn't copy it from the so

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Ok. > > But that makes the whole method inconsistent. > > Basically, if it's on the same filesystem, rename the file, and thus > not inheriting ACL. If it's on another use copy2, and inherit ACL. I think you're misunderstanding copy2. It will copy the ACL f

[issue9523] Improve dbm modules

2011-02-12 Thread Éric Araujo
Éric Araujo added the comment: Closed #5736 as superseded. Please make sure the comments there about the peculiar API of gdbm don’t come up or are addressed in your patch. -- ___ Python tracker __

[issue5736] Add the iterator protocol to dbm modules

2011-02-12 Thread Éric Araujo
Éric Araujo added the comment: #9523 has a more comprehensive patch in progress, adding __iter__ and other mapping methods, so I’m closing this one. -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Improve dbm modules versions: -Python

[issue9523] Improve dbm modules

2011-02-12 Thread Éric Araujo
Éric Araujo added the comment: > Add rich compare functions and disjoint() method to dbm view objects > to make them as MappingView objects, and add abc registration for them. I’d prefer you not to register them, but test isinstance(keys(), KeysView), so that we’re sure no method is missing. (

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Anders Østhus
Anders Østhus added the comment: Ok. But that makes the whole method inconsistent. Basically, if it's on the same filesystem, rename the file, and thus not inheriting ACL. If it's on another use copy2, and inherit ACL. That makes no sense, atleast not to me :) -- __

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > According to the shutil doc page, neither copy or copy2 should do > this. And since they do, and you say shutil.move is implemented using > shutil.copy2, shouldn't files moved with shutil.move also then inherit > the permissions? There's a misunderstanding I

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Anders Østhus
Anders Østhus added the comment: Ok, but the whole page you linked to (http://docs.python.org/library/shutil) confuses me then. It states at the top: "Warning Even the higher-level file copying functions (copy(), copy2()) can’t copy all file metadata. On POSIX platforms, this means that fil

[issue11203] gzip doc is behind

2011-02-12 Thread K Richard Pixley
New submission from K Richard Pixley : The documentation for gzip should include the "close" method. It's use in the 2.7 documentation implies it's existence but it should also be stated explicitly that it exists. In the 3.x documentation, the use of "close" not in the examples since the exam

[issue10084] SSL support for asyncore

2011-02-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Initial draft of a patch including tests and a new ssl_dispatcher subclass. asynchat needs to be changed as well, probably by using a mixin class. -- keywords: +patch Added file: http://bugs.python.org/file20752/asyncore_ssl_v1.patch ___

[issue3860] GzipFile and BZ2File should support context manager protocol

2011-02-12 Thread K Richard Pixley
K Richard Pixley added the comment: Documentation needs to be updated to state that these are now context managers. This is important since they aren't in python-2.x. I'm not sure whether this should be added to the "new in python" blurbs. -- nosy: +teamnoir

[issue11201] Python installation error 2203

2011-02-12 Thread Martin v . Löwis
Martin v. Löwis added the comment: Are you perhaps trying to run the installer from a network folder, or some other location that needs your personal credentials for access? Please run msiexec /i python-2.7.1.msi /l*v python.log and attach the resulting python.log to this report (compress

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Brian Curtin
Changes by Brian Curtin : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue11201] Python installation error 2203

2011-02-12 Thread corenova
corenova added the comment: I get the same message when trying to install older versions (2.x) as well as new 3.1.3 I also tried ActivePython and same thing happens. -- ___ Python tracker

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Brian Curtin
Brian Curtin added the comment: shutil.move is implemented using copy2, which as the documentation states at the top, "On Windows, file owners, ACLs and alternate data streams are not copied." See http://docs.python.org/library/shutil -- nosy: +brian.curtin resolution: -> rejected s

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Intuitively, this seems rather normal to me. If I move a file under Unix, I don't expect its access rights or ownership to change. "Move" really means what it means: you have to update its permission explicitly if that's what you need (shutil.copystat() can h

[issue11201] Python installation error 2203

2011-02-12 Thread Ana Koren
Ana Koren added the comment: Yes, I downloaded it from there. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue11201] Python installation error 2203

2011-02-12 Thread Ana Koren
New submission from Ana Koren : I'm running Windows 7 (32-bit) and I downloaded Python 2.7.1 Windows Installer but I can't install it. I get this message: "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Library (Lib) -IO nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue11202] Win32: shutil.move does not inherit permissions

2011-02-12 Thread Anders Østhus
New submission from Anders Østhus : Hi I'm running Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32 (Server 2008 R2). I've discovered that when moving files with shutil.move, the file won't inherit the security settings as it should. When using shutil.cop

[issue11201] Python installation error 2203

2011-02-12 Thread Brian Curtin
Brian Curtin added the comment: Can you confirm that the checksum and size of the file you downloaded matches what's on the site: http://www.python.org/download/releases/2.7.1/ -- components: +Windows nosy: +brian.curtin ___ Python tracker

[issue11201] Python installation error 2203

2011-02-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue11200] Addition of abiflags breaks distutils

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, looks like distribute should be updated to include "abiflags" in self.config_vars in setuptools/command/easy_install.py. There seems to be a whole bunch of code pasted directly from distutils and it isn't up-to-date anymore. Compare: https://bitbuck

[issue11200] Addition of abiflags breaks distutils

2011-02-12 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue11200] Addition of abiflags breaks distutils

2011-02-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue11200] Addition of abiflags breaks distutils

2011-02-12 Thread Toshio Kuratomi
New submission from Toshio Kuratomi : When trying to build distribute on the latest python-3.2rc I get the following traceback in the unittests (two others that are similar as well): == ERROR: test_develop (setuptools.tests.tes

[issue9523] Improve dbm modules

2011-02-12 Thread Ray.Allen
Changes by Ray.Allen : Added file: http://bugs.python.org/file20751/issue_9523.diff ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue9523] Improve dbm modules

2011-02-12 Thread Ray.Allen
Ray.Allen added the comment: > > 1. Make keys(), values(), items() methods return view object for ndbm, gdbm > > and dumb objects. I following the codes in dictobject.c. > Did you have to copy the code? Isn’t it possible to somehow reuse it? I feel not so easy to reuse the code, there could b

[issue3119] pickle.py is limited by python's call stack

2011-02-12 Thread Éric Araujo
Changes by Éric Araujo : -- superseder: eliminate recursion in pickling -> ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue10999] os.chflags refers to stat constants, but the constants are not documented in the stat module

2011-02-12 Thread R. David Murray
R. David Murray added the comment: Looks good to me. I wonder if the existing example should be moved up above the description of the chmod flags, though. This update puts it even farther away from the functions it is an example of. -- ___ Python

[issue11198] re sub subn backreferrence too few replacements

2011-02-12 Thread muxum
muxum added the comment: aww ic -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mail

[issue11199] urllib hangs when closing connection

2011-02-12 Thread rg3
New submission from rg3 : If you run the attached program, you can see the program hangs in the connection close stage. Uncommenting the sleep line makes the program work, so I suspect some kind of race condition. The URL used belongs to a Slackware Linux mirror. I have not been able to repro

[issue11149] [PATCH] Configure should enable -fwrapv for clang

2011-02-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is a potential crasher. It would also be nice if you listed those cases where Python assumes signed overflow behaviour. Can you open a separate issue for that? -- nosy: +mark.dickinson, pitrou priority: normal -> high versions: +Python 2.7, Python

[issue11180] More efficient nlargest()/nsmallest()

2011-02-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file20748/heapq_benchmark.py ___ Python tracker ___ ___ Python-bugs-list m

[issue11180] More efficient nlargest()/nsmallest()

2011-02-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: Updated the benchmarking code to include a 4th variant that accumulates sorted sublists during the partitioning phase. Results from one run: n: 10 k: 100 [105856, 105917, 105951, 105977, 106366] nsmallest [166465, 166478, 166507, 166639, 166748]

[issue4709] Mingw-w64 and python on windows x64

2011-02-12 Thread Christoph Gohlke
Changes by Christoph Gohlke : -- nosy: +cgohlke ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue1028] Tkinter binding involving Control-spacebar raises unicode error

2011-02-12 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: kbk -> ned.deily nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub