[issue22787] ssl.SSLContext.load_cert_chain() backport regression with None as keyfile

2014-11-03 Thread Till Maas

New submission from Till Maas:

https://github.com/python/cpython/commit/71a4ee3ea2c6847b9fc4b33cbc8d565a7bf2424a

introduces a regression in ssl.SSLContext.load_cert_chain()

https://github.com/python/cpython/blob/2.7/Modules/_ssl.c#L2462

With this change it is not possible to specify None as keyfile which can 
be triggered on Debian Testing? (there the change is backported) in 
requests.get(https://example.com;, cerf=keycert.pem). It can also be 
triggered with the sample code in the attached file. It is fixed in recent 
python 3.

--
components: Library (Lib)
files: poc.txt
messages: 230539
nosy: till
priority: normal
severity: normal
status: open
title: ssl.SSLContext.load_cert_chain() backport regression with None as keyfile
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file37120/poc.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22787
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22787] ssl.SSLContext.load_cert_chain() backport regression with None as keyfile

2014-11-03 Thread Till Maas

Till Maas added the comment:

sorry, it should be:
requests.get(https://example.com;, cert=keycert.pem)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22787
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13530] Docs for os.lseek neglect to mention what it returns

2014-03-11 Thread Till Maas

Till Maas added the comment:

This is not fixed for Python 2.7 and 2.6.

--
nosy: +till

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13530
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16584] unhandled IOError filecmp.cmpfiles() if file not readable

2013-05-09 Thread Till Maas

Till Maas added the comment:

I just tried on a Windows 8 system with python from GIMP. The error occurs 
there as well if I compare two empty files after I removed permissions for one 
of the files. I do not know how to manage Windows' file ACLs in python, 
therefore I created the test case using the Explorer.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16584] unhandled IOError filecmp.cmpfiles() if file not readable

2013-05-07 Thread Till Maas

Till Maas added the comment:

When might this be patched in Python 2.X? This Exception makes the function 
pretty useless for me, since it makes by custom compare script crash.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16584] unhandled IOError filecmp.cmpfiles() if file not readable

2012-11-30 Thread Till Maas

New submission from Till Maas:

If filecmp is used with files that the user is not allowed to read, it creates 
an IOError exception instead of returning the file's name as an file that could 
not compared. The documentation says:

http://docs.python.org/2/library/filecmp.html
Returns three lists of file names: match, mismatch, errors. [...] errors lists 
the names of files which could not be compared. Files are listed in errors if 
they don’t exist in one of the directories, the user lacks permission to read 
them or if the comparison could not be done for some other reason.

The attached file fails with an IOError:
$ python filecmp-minimal.py 
Traceback (most recent call last):
  File filecmp-minimal.py, line 21, in module
print filecmp.cmpfiles(join(t, a), join(t, b), [testfile], 
shallow=False)
  File /usr/lib64/python2.7/filecmp.py, line 258, in cmpfiles
res[_cmp(ax, bx, shallow)].append(x)
  File /usr/lib64/python2.7/filecmp.py, line 270, in _cmp
return not abs(cmp(a, b, sh))
  File /usr/lib64/python2.7/filecmp.py, line 53, in cmp
outcome = _do_cmp(f1, f2)
  File /usr/lib64/python2.7/filecmp.py, line 66, in _do_cmp
with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2:
IOError: [Errno 13] Permission denied: '/tmp/tmpp93pmt/a/testfile'

A quick glance at the current code in hg shows, that this bug is probably also 
present in all later Python versions than 2.7. I will attach a small patch that 
fixes this bug.

--
components: Library (Lib)
files: filecmp-minimal.py
messages: 176700
nosy: till
priority: normal
severity: normal
status: open
title: unhandled IOError filecmp.cmpfiles() if file not readable
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file28168/filecmp-minimal.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16584] unhandled IOError filecmp.cmpfiles() if file not readable

2012-11-30 Thread Till Maas

Changes by Till Maas opensou...@till.name:


--
keywords: +patch
Added file: http://bugs.python.org/file28169/filecmp_exception.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16584
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7540] urllib2 request does not update content length after new add_data

2009-12-27 Thread Till Maas

Till Maas opensou...@till.name added the comment:

I do not need to reuse a request object, but I did in a script when only
the data was different for each request. If this is not meant to be
done, then any not meant to be done modification should somehow create
an error, when it is done, instead of silently performing broken HTTP
requests.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7540] urllib2 request does not update content length after new add_data

2009-12-18 Thread Till Maas

New submission from Till Maas opensou...@till.name:

When I try to reuse a urllib2.Request object with different post data,
the data itself is updated, but the content length is not. Here is a
simple script to reproduce it on Python 2.5 on Fedora 10 and 2.6 on Arch
Linux:

#!/usr/bin/python
# vim: fileencoding=utf8 
# test with:  echo | socat - tcp4-listen:,fork
# Demonstrates bad content length of second request, which should be 2
import urllib2
req = urllib2.Request('http://localhost:')
req.add_data(1)
urllib2.urlopen(req)
req.add_data(10)
urllib2.urlopen(req)

--
components: Library (Lib)
messages: 96567
nosy: till
severity: normal
status: open
title: urllib2 request does not update content length after new add_data
type: behavior
versions: Python 2.5, Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6516] reset owner/group to root for distutils tarballs

2009-07-24 Thread Till Maas

Till Maas opensou...@till.name added the comment:

I want to create uniform tarballs, independent of which username was
used to create the tarball.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6516
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6557] urllib.urlopen creates bad requests when location header of 301 redirects contain spaces

2009-07-23 Thread Till Maas

New submission from Till Maas opensou...@till.name:

If urllib.urlopen is pointed to an url that returns a redirection with a
location header that points to a url containing spaces, that are
properly urlencoded, then it creates a bad request with the spaces not
encoded in the url. Here is an example/test case:

In [1]: import urllib

In [2]:
u=urllib.urlopen(http://sourceforge.net/project/showfiles.php?group_id=16847package_id=13374;)

In [3]: u.url
Out[3]: 'http://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-c Super
Stable/download'

In [4]: u.read()
Out[4]: 'html\r\nheadtitle400 Bad Request/title/head\r\nbody
bgcolor=white\r\ncenterh1400 Bad
Request/h1/center\r\nhrcenternginx/0.7.60/center\r\n/body\r\n/html\r\n'

In [5]:
u=urllib.urlopen(http://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-c%20Super%20Stable/download;)

In [6]: u.read()[0:100]
Out[6]: '\n\n!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xh'

In [7]:

--
components: Library (Lib)
messages: 90864
nosy: till
severity: normal
status: open
title: urllib.urlopen creates bad requests when location header of 301 
redirects contain spaces
versions: Python 2.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6557
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1886] Permit to easily use distutils --formats=tar, gztar, bztar on all systems

2009-07-18 Thread Till Maas

Changes by Till Maas opensou...@till.name:


--
nosy: +till

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1886
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6516] reset owner/group to root for distutils tarballs

2009-07-18 Thread Till Maas

New submission from Till Maas opensou...@till.name:

Please allow to create tarballs with owner/group of files be set to root.

One possible fix is to change cmd in distutils/archive_util.py to this:

cmd = [tar, -cf, archive_name, --owner=root, --group=root, base_dir]

--
assignee: tarek
components: Distutils
messages: 90685
nosy: tarek, till
severity: normal
status: open
title: reset owner/group to root for distutils tarballs
type: feature request
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6516
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6517] configparser: add possibility to escape formatstrings

2009-07-18 Thread Till Maas

New submission from Till Maas opensou...@till.name:

There seems to be no way to add a config item with a value containing a
formatstring without this formatstring beeing handled by configparser.

A possible way to escape the formatstrings could be to double the
%-sign, e.g.:

[foo]
bar = %%(string)s

The value of the bar item should then be %(string)s.

--
components: Library (Lib)
messages: 90689
nosy: till
severity: normal
status: open
title: configparser: add possibility to escape formatstrings
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6517
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6517] configparser: add possibility to escape formatstrings

2009-07-18 Thread Till Maas

Till Maas opensou...@till.name added the comment:

Afacs it is not documented to work. Here is the testcase:

#!/usr/bin/python
# vim: fileencoding=utf8

import ConfigParser
import tempfile

file = tempfile.TemporaryFile(mode='rw+b')
file.write([s]\nf=%%(b)s\n)
file.seek(0)
config = ConfigParser.ConfigParser()

config.readfp(file)

print config.get(s, f)

file.close()

--
status: pending - open
Added file: http://bugs.python.org/file14522/test-configparse.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6517
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6517] configparser: add possibility to escape formatstrings

2009-07-18 Thread Till Maas

Till Maas opensou...@till.name added the comment:

It would be nice if you could expand the patch to also use only one name
for the support of format strings.

In the beginning it is introduced as reference expansion, but later in
the document, several variatons of interpolation are used: magical
interpolation, string interpolation, % interpolation is used.
Therefore I guess it should also be introduced as interpolation.

Another nice improvement would also be to move the ConfigParser to a
deprecated classes section at the end like it is done for some methods
in the string module.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6517
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com