[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-05-24 Thread Senthil
Senthil added the comment: Fixed for Py2x in the revision 72880. Tested it on a Squid Proxy setup and found it working fine. Should this be backported? For Py3k, the Request class has undergone changes since the patch was developed, I am modifying the patch for Py3k to accommodate those changes

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2009-05-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> critical stage: -> needs patch versions: +Python 2.7, Python 3.1 ___ Python tracker ___ _

[issue6073] threading.Timer and gtk.main are not compatible

2009-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: It is probably a problem with the gtk/gobject Python binding. By the way, you're supposed to call `gobject.threads_init()` if you use threads with Python and gobject/gtk. Besides, gtk certainly has its own timing facilities, while threading.Timer is rather crude

[issue1309352] Make fcntl work properly on AMD64

2009-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Gonna apply if nobody opposes :) -- assignee: nnorwitz -> pitrou ___ Python tracker ___ ___ Pytho

[issue6070] Pyhon 2.6 makes .pyc/.pyo bytecode files executable

2009-05-24 Thread Marco
Marco added the comment: I attach a patch to correct this little bug. Bye ;) -- nosy: +markon Added file: http://bugs.python.org/file14049/import_patch.c ___ Python tracker ___

[issue6073] threading.Timer and gtk.main are not compatible

2009-05-24 Thread Eric
Eric added the comment: OK, this is a workaround. adding this line gtk.gdk.threads_init() makes the job. And that's ok for me. nevertheless, I still got the feeling that's this is a flaw in the Timer implementation: it's behaviour is changed by some external (gtk) code. -- status:

[issue5259] smtplib is broken in Python3

2009-05-24 Thread R. David Murray
R. David Murray added the comment: Committed the simple auth tests and fix in r72868 in py3k and r72877 in 3.0. Also added the test to trunk in r72878 to keep the test source in sync, and to 26maint similarly in r72886. Now we need tests for the other auth cases. -- stage: commit revi

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2009-05-24 Thread Marco
Marco added the comment: It seems Python is using a default mask to compile modules. If you open a file b.py as "r", and you import it from a.py, you can see that b.pyc is: -rwxr-xr-x 1 marco marco9 24 mag 16:17 a.py -r--r--r-- 1 marco marco 10 24 mag 16:17 b.py -rw-r--r-- 1 marco marco 1

[issue1309352] Make fcntl work properly on AMD64

2009-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r72887, r72888, r72889. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-05-24 Thread Jason R. Coombs
Jason R. Coombs added the comment: Thanks again Martin for the guidance. It proved quite helpful in completing this patch. This latest version (3) compiles and has been tested under Windows Vista and Windows XP and behaves as expected (with a NotImplemented error under XP). I did find that

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-05-24 Thread Jason R. Coombs
Changes by Jason R. Coombs : Removed file: http://bugs.python.org/file14051/smime.p7s ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue3585] pkg-config support

2009-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is there any reason in versioning Misc/python.pc, instead of versioning it only on install? -- ___ Python tracker ___ __

[issue1518] Fast globals/builtins access (patch)

2009-05-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue5596] memory leaks in 3.1

2009-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Current results: test_modulefinder leaked [145, 145] references, sum=290 test_urllib leaked [10, 0] references, sum=10 test_urllib2 leaked [227, 227] references, sum=454 -- ___ Python tracker

[issue6001] Test discovery for unittest

2009-05-24 Thread Michael Foord
Michael Foord added the comment: Updated patch with documentation and fixed command line usage message. Unless there are objections I intend to check this in in the next few days. It would be helpful if someone else could go over the documentation and check for errors / typos etc. I've already

[issue6096] SimpleXMLRPCServer not suitable for HTTP/1.1 keep-alive

2009-05-24 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : The SimpleXMRRPCServer class calls connection.shutdown(1) when done with each request, thus making it unsuitable for a RequestHandler that supports HTTP/1.1 with keep-alive. This patch removes those extra shutdown calls. Patch also uploaded as http

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-24 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- title: Pyhon 2.6 makes .pyc/.pyo bytecode files executable -> Python 2.6 makes .pyc/.pyo bytecode files executable ___ Python tracker ___

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-05-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: The patch (v3) looks technically correct, with two minor issues: perhaps one should release the handle to kernel32 (not sure whether other code does it, or whether it matters), and I would inline the two new functions into their single callers. That aside, I s

[issue6001] Test discovery for unittest

2009-05-24 Thread Michael Foord
Michael Foord added the comment: Georg Brandl has pointed out various minor issues in the docs (and discover docstring) that I am correcting. -- ___ Python tracker ___ __

[issue6097] Encoded surrogate characters on command line not escaped in sys.argv

2009-05-24 Thread David Watson
New submission from David Watson : The mbstowcs and mbrtwoc functions which are used for the initial conversion of command-line arguments on Unix can return lone or paired surrogates (e.g. \udcff for \xed\xb3\xbf in non-strict UTF-8), and these surrogates are currently placed into sys.argv unesca

[issue4859] pwd, spwd, grp functions vulnerable to denial of service

2009-05-24 Thread David Watson
David Watson added the comment: Patch to make get*nam() functions encode their arguments using the file system encoding and "surrogateescape" error handler, so that they correctly handle the user/group name fields returned by each other. -- Added file: http://bugs.python.org/file14056/s

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-05-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: I added a versionadded: 2.7 note to the docs in r72890. This change is not suitable for back porting as it arguably adds a new feature. -- ___ Python tracker ___

[issue4859] pwd, spwd, grp functions vulnerable to denial of service

2009-05-24 Thread David Watson
David Watson added the comment: Patch to make pwd, spwd and grp decode their string fields using the file system encoding and the "surrogateescape" error handler, as per PEP 383. -- Added file: http://bugs.python.org/file14055/surrogateescape-fields.diff ___

[issue6065] bdist_msi.py failed assert when including extension modules

2009-05-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: Thanks for the patch. Committed as r72891 and r72892. Please use 4-space indents in the future. -- resolution: -> accepted status: open -> closed ___ Python tracker

[issue6050] zipfile: Extracting a directory that already exists generates an OSError

2009-05-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: Thanks for the patch. Committed with modifications (including a test) as r72893, r72894, r72895, r72896. -- resolution: -> accepted status: open -> closed ___ Python tracker

[issue3585] pkg-config support

2009-05-24 Thread Clinton Roy
Clinton Roy added the comment: Not that I can see, or remember. Revised patch attached. Tyop fixed as well. Please note there seem to be some issues with svn head atm, pyconfig.h.in and configure would seem to be out of whack with configure.in, this patch does not include changes to those gener

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-24 Thread Georg Brandl
Georg Brandl added the comment: Are these S_IX... constants available on every platform we support? -- nosy: +georg.brandl ___ Python tracker ___

[issue3585] pkg-config support

2009-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch is committed in trunk (r72898) and py3k (r72899). Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: No, they are not supported on Visual Studio. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue6098] xml.dom.minidom incorrectly claims DOM Level 3 conformance

2009-05-24 Thread Philipp Hagemeister
New submission from Philipp Hagemeister : >From DOM Level 3[1]: "An implementation conforms to a DOM Level 3 module if it supports all the interfaces for that module and the associated semantics.". minidom supports only some Level 3 functions such as Node.renameNode, Element.setIdAttribute*, Text

[issue6099] HTTP/1.1 with keep-alive support for xmlrpclib.ServerProxy

2009-05-24 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : The Transport class in xmlrpclib.py was using the old httplib.HTTP class. This patch brings xmlrpclib up to date to use the HTTPConnection and HTTPSConnection classes. This allows xlmrpclib.ServerProxy to use HTTP/1.1 with keep-alive on servers tha

[issue6012] enhance getargs O& to accept cleanup function

2009-05-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: So: any opinions what approach would be better? A new converter O$ or a change to the existing O&, selected by return value from the conversion function? -- ___ Python tracker ___

[issue6012] enhance getargs O& to accept cleanup function

2009-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Reusing O& looks better to me (we already have too many type specifiers). Why have you chosen 0x2 for Py_CLEANUP_SUPPORTED? Are there other possible values below that? -- nosy: +pitrou ___ Python tracker

[issue1943] improved allocation of PyUnicode objects

2009-05-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine, I think we have to make a decision here: I'm still -1 on changing PyUnicodeObject to be a PyVarObject, but do like your experiments with the free lists. I also still believe that tuning the existing parameters in the Unicode implementation and pyma

[issue1943] improved allocation of PyUnicode objects

2009-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: As I already showed, the freelist experiments bring very little improvement. -- ___ Python tracker ___ _

[issue6012] enhance getargs O& to accept cleanup function

2009-05-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Reusing O& looks better to me (we already have too many type specifiers). > Why have you chosen 0x2 for Py_CLEANUP_SUPPORTED? Are there other > possible values below that? It's essentially random. I want it to be a power of two, in case we make it a bit

[issue1943] improved allocation of PyUnicode objects

2009-05-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ok, then closing the patch as rejected. -- resolution: -> rejected status: open -> closed ___ Python tracker ___ __

[issue1943] improved allocation of PyUnicode objects

2009-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Marc-André, please don't close the issue while you're the only one opposing it, thanks. -- resolution: rejected -> status: closed -> open ___ Python tracker __

[issue6100] Expanding arrays inside other arrays

2009-05-24 Thread marek_sp
New submission from marek_sp : Hello! I recently thought about a nice feature (pure syntactic sugar): >>> a = [2,3,4] >>> b = [1,*a,5] >>> print b [1, 2, 3 ,4 ,5] instead of: >>> b = [1]+a+[5] I think first one is somewhat more readable and similiar thing already is possible with function calls

[issue6101] SETUP_WITH

2009-05-24 Thread Benjamin Peterson
New submission from Benjamin Peterson : This patch condenses the many current opcodes used to start a with statement into one, SETUP_WITH. I originally did this to properly lookup __enter__ and __exit__ as special methods. However, the patch also has the nice side effect of removing the need for

[issue6101] SETUP_WITH

2009-05-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: Performance numbers: With patch: $ ./python.exe -m timeit -s 'import thread; l = thread.allocate_lock()' 'with l: pass' 100 loops, best of 3: 1.99 usec per loop Without: 10 loops, best of 3: 2.15 usec per loop -- _

[issue6101] SETUP_WITH

2009-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure I understand the point of PyInstance_Check() in lookup_special(). You should bump the bytecode version in import.c. By the way, there are some "with" tests in pybench (you can run them using "-t With"). -- nosy: +pitrou _

[issue6101] SETUP_WITH

2009-05-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2009/5/24 Antoine Pitrou : > > Antoine Pitrou added the comment: > > I'm not sure I understand the point of PyInstance_Check() in > lookup_special(). _PyObject_LookupSpecial doesn't understand classic classes. > > You should bump the bytecode version in im

[issue6101] SETUP_WITH

2009-05-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Endly, in compile.c, it seems the stack effect of SETUP_WITH should be 1, not 3 (only one value is pushed onto the stack). -- ___ Python tracker ___

[issue6101] SETUP_WITH

2009-05-24 Thread Benjamin Peterson
Changes by Benjamin Peterson : Added file: http://bugs.python.org/file14061/SETUP_WITH2.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue6012] enhance getargs O& to accept cleanup function

2009-05-24 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: > Reusing O& looks better to me Me too. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue6101] SETUP_WITH

2009-05-24 Thread Benjamin Peterson
Changes by Benjamin Peterson : Added file: http://bugs.python.org/file14062/SETUP_WITH3.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue6102] When the package has non-ascii path and .pyc file, we cannot import them.

2009-05-24 Thread Suzumizaki
New submission from Suzumizaki : When the path of the package has non-ascii characters, importing such packages always fails except the first time (in other words, always fails when compiled .pyc file exists). The problem exists even the names of such modules only consist of us-ascii characters

[issue6094] Python fails to build with Subversion 1.7

2009-05-24 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- type: -> compile error versions: -Python 2.4 ___ Python tracker ___ ___ Python-bu

[issue5794] pickle/cPickle of recursive tuples create pickles that cPickle can't load

2009-05-24 Thread Collin Winter
Collin Winter added the comment: Bug-fix patch attached. Alexandre, can you take a look? Feel free to bounce it back if you don't have time. I'll port to 2.6 and py3k once this is reviewed for trunk. -- keywords: +26backport, easy, patch nosy: +alexandre.vassalotti stage: -> patch rev

[issue5866] cPickle defect with tuples and different from pickle output

2009-05-24 Thread Collin Winter
Changes by Collin Winter : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue6088] Python3.0.1.1 is not available when system locale is zh_TW.eucTW

2009-05-24 Thread Leeon
Leeon added the comment: Hello David, Thanks for your quick response! I just downloaded Python3.0.1 source code and compiled it on my Debian 5.0 Linux using following commands: r...@li-le01-d5:~# ./configure r...@li-le01-d5:~# make r...@li-le01-d5:~# make altinstall Then I try Python in intera

[issue6103] Static library (libpythonX.Y.a) installed in incorrect location

2009-05-24 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis : When Python has been configured without --enable-shared option, then `make install` installs $(LIBDIR)/libpythonX.Y.a and $(LIBDIR)/pythonX.Y/config/libpythonX.Y.a (these files are identical). When Python has been configured with --enabl

[issue5670] Speed up pickling of dicts in cPickle

2009-05-24 Thread Collin Winter
Collin Winter added the comment: Fixed the len(d) == 1 size regression. Final performance of the patch relative to trunk: Using Unladen Swallow's perf.py -b pickle,pickle_dict on trunk: pickle: Min: 2.238 -> 1.895: 18.08% faster Avg: 2.241 -> 1.898: 18.04% faster Significant (t=282.066701, a=0.