[issue12169] Factor out common code for d2 commands register, upload and upload_docs

2014-02-20 Thread Matthew Iversen

Matthew Iversen added the comment:

Hi, I'm wondering why this branch was never merged in?

AFIAK, it's roundabout here - 
http://hg.python.org/cpython/log/28e4cd8fd864/Lib/packaging/command/upload.py

It'd be great to have distutils submit forms that are compliant with the MIME 
spec (in my use case, cherrypy completely borks on it).

--
nosy: +Matthew.Iversen

___
Python tracker 
<http://bugs.python.org/issue12169>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10510] distutils upload/register should use CRLF in HTTP requests

2014-02-21 Thread Matthew Iversen

Matthew Iversen added the comment:

Sorry, I referenced http://bugs.python.org/issue12169 before.

distutils multipart/form-data encoding still breaks the spec for MIME, which 
demands CRLF line endings.

Especially since it is now sending HTTP 1.1 requests which should conform.

The patch / resulting branch from the above issue should fix this, I believe it 
was meant for a 'distutils2/packaging' effort before? But I can't see why it 
wouldn't still be applicable to current distutils to fix this issue.

Revelant parts of RFCs are https://tools.ietf.org/html/rfc2045#section-2.10 and 
https://tools.ietf.org/html/rfc822#section-3.2

--
nosy: +Matthew.Iversen

___
Python tracker 
<http://bugs.python.org/issue10510>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1537721] csv module: add header row to DictWriter

2009-04-18 Thread Matthew Iversen

Matthew Iversen  added the comment:

Skip, you were arguing in another csv issue on a NamedTupleReader that
the Reader and Writer should work in concert together.

Certainly, making this default functionality for DictWriter would
definitely make it work more in concert with DictReader.

A sample process of reading and writing might be:

1. DictReader reads in header names, reads in data
2. Pass in header names to DictWriter on init
3. DictWriter writes out modified data back to csv file (headers get
written automatically or with a method call)
4. DictReader can now reader in the csv file automatically again with
header names

My feeling is, if DictReader can read in head names, why can't
DictWriter write them back out again? Shouldn't there be a good amount
of symmatry to their function/abilities?

My feeling of how to implement this functionality would be to include a
new init argument, say 'writeheader'. It's default would be True if you
wanted to implement this new feature by default, or False if you wanted
to keep it an option so that older scripts relying on the old
functionality won't break immmediately.
DictWriter would then write the header on the first call to writerow(s),
or perhaps also with an explicit call to writeheader() say.

I certainly am miffed by the fact that DictWriter cannot produce
(normally) a csv file that DictReader can read in automatically.

--
nosy: +ivo

___
Python tracker 
<http://bugs.python.org/issue1537721>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com