[issue5639] Support TLS SNI extension in ssl module

2010-06-19 Thread Scott Tsai

Changes by Scott Tsai :


--
nosy: +scott.tsai

___
Python tracker 

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



[issue9009] Improve quality of Python/dtoa.c

2010-06-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

r82080: Whitespace fixes.
r82081: In strtod, simplify the computation of the initial approximation.
r82082: Fix typo introduced in r82025 (I think);  this was preventing
   a shortcut from being taken.

r82087: Simplify the ratio function.  The previous ratio function (actually, 
b2d), aborted if the numerator was zero, and the current code ends up requiring 
special cases for zero as a result of this.  That restriction is now removed, 
which will allow further simplifications (to come) in strtod.

--

___
Python tracker 

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



[issue9009] Improve quality of Python/dtoa.c

2010-06-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

Patch that does a fairly significant rewrite of strtod;  it's still (mostly) 
based on Gay's code, but there are some significant changes.

Some background:  strtod, after dealing with easy cases, works roughly as 
follows:

(1) Using floating-point arithmetic, create a double *rv* holding an 
approximation to the input value; this approximation may be out from the true 
value by several ulps (perhaps as much as 10 ulps;  certainly not more than 100 
ulps).

(2) If the input string is very long, truncate it (accepting that this 
introduces a small error), and work with the truncated value below.

(3) Use integer arithmetic to compute (an approximation to) ulps difference 
between *rv* and true value.  Possibly return immediately if
the ulps difference can be proved to be <= 0.5 ulps, and we're not in any of 
various exceptional cases.

(4) Use the ulps difference to correct *rv* to a new value.

(5) If the ulps difference has fractional part close to 0.5, or if the 
correction takes us past a power of 2, or if it takes use near/to the max 
representable double, or to 0.0, go around the correction loop again.

(6) If we still can't decide (because the ulps difference is very close to 
0.5), call bigcomp to settle the issue once and for all.


The new patch simplifies the above procedure considerably:

- scaling of rv is used for very large values as well as very small ones; this 
simplifies handling of overflow, meaning that there's only a single place where 
overflow has to be detected.

- the adjustment step handles adjustments that cross power-of-2 boundaries 
correctly.

- as a result of the above two simplifications, there's never any need to do a 
second correction step, so the main correction loop is no longer a loop; a 
single correction is performed.

- we always use the bigcomp function in hard cases, so there's no longer any 
need for the computation of ulps_difference to detect the case where the error 
is exactly 0.5 ulps.


The patch isn't quite ready to apply;  I want to expand some of the comments a 
little.

--
Added file: http://bugs.python.org/file17720/rewrite_strtod.patch

___
Python tracker 

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



[issue9020] 2.7: eval hangs on AIX

2010-06-19 Thread Stefan Krah

Stefan Krah  added the comment:

Py_CHARMASK should return a non-negative integer. As I understand it:

tokenizer.c:tok_get around line 1368:

while (Py_ISALNUM(c) || c == '_') {
c = tok_nextc(tok);
}


1) tok_nextc(tok) returns EOF (correct).

2) c is an int.

3) c == -1 gets passed to Py_ISALNUM(c):

   #define Py_ISALNUM(c)  (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALNUM)



So either it should be enforced that only chars are passed to
Py_CHARMASK, or a cast for the EOF case is needed (but it should
be to (unsigned char)).


Sridhar, did I sum this up correctly?

--
nosy: +skrah
priority: normal -> high

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-06-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le samedi 19 juin 2010 à 00:55 +, geremy condra a écrit :
> geremy condra  added the comment:
> 
> On Fri, Jun 18, 2010 at 6:05 AM, Antoine Pitrou  
> wrote:
> >
> > Antoine Pitrou  added the comment:
> >
> >> Great, I'm thinking more-or-less the API proposed in PEP 272- the
> >> exception I'm thinking of is that 'strings' should be substituted for
> >> 'bytes'- for AES and DES. It gets trickier when talking about public
> >> key crypto, though. Perhaps something along the lines of
> >> RSA.new(public_key=None, private_key=None,...), with the resulting
> >> object supporting encrypt/decrypt/sign/verify operations?
> >
> > I don't have any opinion right now. I think a concrete proposal should
> > be initiated and we can iterate from that.
> > (that's assuming other people agree on the principle, of course)
> 
> I assume that by "a concrete proposal" you're talking about code? Or
> API docs? Also, what more needs to be done to ensure that other people
> agree on the principle?

I was thinking about a PEP. Of course, you are free to reuse existing
PEP content for that :)

--

___
Python tracker 

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



[issue9020] 2.7: eval hangs on AIX

2010-06-19 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> Py_CHARMASK should return a non-negative integer.

And it does, also on AIX. Do we have proof to the contrary?

> tokenizer.c:tok_get around line 1368:
>
>  while (Py_ISALNUM(c) || c == '_') {
>  c = tok_nextc(tok);
>  }
>
>
> 1) tok_nextc(tok) returns EOF (correct).
>
> 2) c is an int.
>
> 3) c == -1 gets passed to Py_ISALNUM(c):
>
> #define Py_ISALNUM(c)  (_Py_ctype_table[Py_CHARMASK(c)]&  PY_CTF_ALNUM)
>
>
>
> So either it should be enforced that only chars are passed to
> Py_CHARMASK, or a cast for the EOF case is needed (but it should
> be to (unsigned char)).

Why do you say that? If c is -1, then Py_CHARMASK(c) is 255, which is a
positive integer. Passing -1, or any other integer, to Py_CHARMASK is 
perfectly fine.

There seems to be a minor bug in the loop above, which doesn't actually 
break at EOF. Instead, it implicitly trusts that Py_ISALNUM(EOF) is 
false (because 255 is not alpha-numeric); this is a flaw - but that
shouldn't cause breakage on AIX.

--

___
Python tracker 

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



[issue1602] windows console doesn't print utf8 (Py30a2)

2010-06-19 Thread Christoph Burgmer

Christoph Burgmer  added the comment:

Will this bug be tackled or Python2.7?

And is there a way to get hold of the access denied error?

Here are my steps to reproduce:

I started the console with "cmd /u /k chcp 65001"
___
Aktive Codepage: 65001.

C:\Dokumente und Einstellungen\root>set PYTHONIOENCODING=UTF-8

C:\Dokumente und Einstellungen\root>d:

D:\>cd Python31

D:\Python31>python
Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("\u573a")
场
Traceback (most recent call last):
  File "", line 1, in 
IOError: [Errno 13] Permission denied
>>>
___

I see a rectangle on screen but obviously c&p works.

--
nosy: +christoph

___
Python tracker 

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



[issue1602] windows console doesn't print utf8 (Py30a2)

2010-06-19 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: unit test needed -> needs patch
versions: +Python 3.2 -Python 3.0

___
Python tracker 

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



[issue9020] 2.7: eval hangs on AIX

2010-06-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Why do you say that? If c is -1, then Py_CHARMASK(c) is 255, which is a
> positive integer.

What srid seems to be saying is that chars are unsigned on AIX, and therefore 
Py_CHARMASK() returns -1. Hence his patch proposal.

Of course, it is dubious why EOF is not tested separately rather than passing 
it to Py_ISALNUM(). Micro-optimization? At least a comment should be added.

Also, really, the Py_CHARMASK() macro seems poorly specified. It claims to 
"convert a possibly signed character to a nonnegative int", but this is wrong: 
it doesn't convert to an int at all. Furthermore, it does a cast in one branch 
but not in the other, which can give bad surprises as here.

--
nosy: +pitrou

___
Python tracker 

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



[issue9020] Specification of Py_CHARMASK

2010-06-19 Thread Stefan Krah

Stefan Krah  added the comment:

You can simulate this on Linux by compiling with:

  BASECFLAGS="-funsigned-char"

Then:

Index: Parser/tokenizer.c
===
--- Parser/tokenizer.c  (revision 81682)
+++ Parser/tokenizer.c  (working copy)
@@ -1366,6 +1366,8 @@
 break;
 }
 while (Py_ISALNUM(c) || c == '_') {
+c = EOF; // tok_nextc can return EOF
+printf("c: %d\n", Py_CHARMASK(c));
 c = tok_nextc(tok);
 }
 tok_backup(tok, c);



>>> eval("abcd")
c: -1
c: -1
c: -1
c: -1
c: -1
c: -1




Also, during compilation you get tons of warnings about using
char as an array subscript:

Objects/stringlib/split.h: In function ‘stringlib_split_whitespace’:
Objects/stringlib/split.h:70: warning: array subscript has type ‘char’
Objects/stringlib/split.h:74: warning: array subscript has type ‘char’
Objects/stringlib/split.h:91: warning: array subscript has type ‘char’

--
title: 2.7: eval hangs on AIX -> Specification of Py_CHARMASK

___
Python tracker 

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



[issue9029] errors='replace' works in IDLE, fails at Windows command line.

2010-06-19 Thread R. David Murray

R. David Murray  added the comment:

What you show is not a complete program, nor do you provide the complete 
traceback or the data causing the problem.  The most helpful thing would be a 
complete small program and data file demonstrating the problem.  That said, I'm 
wondering if your problem is the encoding of the terminal window.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue9020] 2.7: eval hangs on AIX

2010-06-19 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> What srid seems to be saying is that chars are unsigned on AIX, and
> therefore Py_CHARMASK() returns -1. Hence his patch proposal.

Ah, ok. I misread some of the messages (and got confused by msg108125,
which seems to suggest that chars are signed on AIX).

> Of course, it is dubious why EOF is not tested separately rather than
> passing it to Py_ISALNUM(). Micro-optimization? At least a comment
> should be added.

No, I think this is an error that EOF is not processed separately.
Otherwise, char 255 may be confused with EOF.

Of course, this would have to be done throughout.

> Also, really, the Py_CHARMASK() macro seems poorly specified. It
> claims to "convert a possibly signed character to a nonnegative int",
> but this is wrong: it doesn't convert to an int at all. Furthermore,
> it does a cast in one branch but not in the other, which can give bad
> surprises as here.

I think the specification is correct: it ought to convert to a
non-negative int. In the signed char case, it already returns an int.
So if it is changed at all, it needs to be changed, in the unsigned
case, to

#define  Py_CHARMASK(c) ((int)(c))

--
title: Specification of Py_CHARMASK -> 2.7: eval hangs on AIX

___
Python tracker 

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



[issue9020] 2.7: eval hangs on AIX

2010-06-19 Thread Stefan Krah

Stefan Krah  added the comment:

Martin v. Löwis  wrote:
> > Of course, it is dubious why EOF is not tested separately rather than
> > passing it to Py_ISALNUM(). Micro-optimization? At least a comment
> > should be added.
> 
> No, I think this is an error that EOF is not processed separately.
> Otherwise, char 255 may be confused with EOF.

Indeed. I think Py_ISALNUM() should check for EOF, to be consistent
with the C isalnum(int c).

--

___
Python tracker 

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



[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-19 Thread R. David Murray

R. David Murray  added the comment:

Brett's assertion comes from the decision made at the language summit at the 
last pycon. Which does not negate Raymond's assertion that there may be more 
important stuff to pythonize. However, Alexander is maintaining datetime, and 
if he wishes to do the Python version there is no reason I see for him not to 
do it.

--

___
Python tracker 

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



[issue9020] 2.7: eval hangs on AIX

2010-06-19 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> Indeed. I think Py_ISALNUM() should check for EOF, to be consistent
> with the C isalnum(int c).

Ah, that sounds fine.

--

___
Python tracker 

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



[issue1573931] WSGI, cgi.FieldStorage incompatibility

2010-06-19 Thread Chris McDonough

Chris McDonough  added the comment:



Although the current WSGI 1.0 spec (http://www.python.org/dev/peps/pep-0333/) 
still indicates that implementing the size argument to readline is not 
required, effectively, it is and has been for several years.  Stalling on a 
WSGI 1.1 spec has caused a spec change to be delayed.  See also 
http://www.mail-archive.com/web-...@python.org/msg02494.html

--
nosy: +mcdonc

___
Python tracker 

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



[issue1573931] WSGI, cgi.FieldStorage incompatibility

2010-06-19 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

It's not terribly productive to block a fix for this specific issue in the WSGI 
specification on the big pile of contentious unrelated issues.

It would make sense to issue a new WSGI specification with a correction for 
only this issue.  The rest of the WSGI 1.1 issues can wait for a subsequent 
revision.

Of course, actually getting this done involves either getting web-sig behind it 
or deciding to ignore web-sig and just do it.

--
nosy: +exarkun

___
Python tracker 

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



[issue9031] distutils uses invalid "-Wstrict-prototypes" flag when compiling C++ extension module

2010-06-19 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

It's a duplicate of issue #1222585. The patch in that issue will also make 
distutils not reuse flags Python was built with.

--
nosy: +Arfrever

___
Python tracker 

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



[issue8988] import + coding = failure (3.1.2/win32)

2010-06-19 Thread gonegown

gonegown  added the comment:

Is there py3k for win32?
And how do I know if #8611 comes from the same source?
Have no idea how they have organized the python core. I'm new to python (about 
2 months) and I don't think I will use it for long. It's just not serious.

--

___
Python tracker 

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



[issue9033] cmd module tab misbehavior

2010-06-19 Thread scott riccardelli

New submission from scott riccardelli :

noticed that cmd module does not perform completion using TAB on a macintosh 
properly.  instead, the TAB key just places several blank spaces and moves the 
cursor forward.  what it should do is retrieve a list of possibilities for 
completing a command.

--
assignee: ronaldoussoren
components: Macintosh
messages: 108185
nosy: ronaldoussoren, slcott
priority: normal
severity: normal
status: open
title: cmd module tab misbehavior
type: behavior
versions: Python 2.5

___
Python tracker 

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



[issue8990] array constructor and array.fromstring should accept bytearray.

2010-06-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

On the principle the patch looks good. In practice, it lacks a call to 
`PyBuffer_Release(&buffer)` in the various error cases (before returning NULL). 
It also lacks some tests in Lib/test/test_array.py.

> In 3.x unicode type was renamed to str and str to bytes, so fromunicode 
> should become fromstring (or maybe fromstr to avoid confusion) and
> fromstring should become frombytes.

This should be discussed separately, perhaps on python-dev first.

--
nosy: +haypo, pitrou

___
Python tracker 

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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-06-19 Thread Ezio Melotti

Changes by Ezio Melotti :


--
versions: +Python 3.2 -Python 2.7, Python 3.1

___
Python tracker 

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



[issue4883] Compiling python 2.5.2 under Wine on linux.

2010-06-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

Can this be closed as out of date, or is it still relevant to Python 2.7 or any 
of the Python 3 branches?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1300] subprocess.list2cmdline doesn't do pipe symbols

2010-06-19 Thread Andrew Moise

Andrew Moise  added the comment:

Why is this bug invalid?

--

___
Python tracker 

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



[issue1300] subprocess.list2cmdline doesn't do pipe symbols

2010-06-19 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

See the commit message for r82075 and the discussion on issue8972 and issue7839.

--

___
Python tracker 

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



[issue5136] Deprecating (and removing) "globalcall", "merge" and "globaleval"

2010-06-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

>From the recent large thread on c.l.py regarding Python GUIs I understand that 
>the author of this issue Guilherme Polo has done a massive amount of work on 
>Tkinter.  Would it therefore be possible for him to give an update as to 
>whether this issue can be closed as out of date, already actioned but not 
>recorded, or whatever?  Thanks.

There are several other issues raised by Guilherme Polo regarding Tkinter, 
sorry I'm too lazy to repeat this comment on all of them.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1300] subprocess.list2cmdline doesn't do pipe symbols

2010-06-19 Thread Andrew Moise

Andrew Moise  added the comment:

Hm, I'm not sure I understand.  After r82075, will list2cmdline(['echo', 
'foo|bar']) return 'echo foo|bar', or will it return 'echo "foo|bar"'?

--

___
Python tracker 

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



[issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome

2010-06-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

As you Jean-Paul Calderone seem to know what you're talking about could you 
provide a patch to get this issue going?  If not I might even have a go myself, 
even if I do get shot down in flames.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue8820] IDLE not launching correctly

2010-06-19 Thread Joseph

Joseph  added the comment:

I'm using python version 2.6.5.

--

___
Python tracker 

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



[issue1300] subprocess.list2cmdline doesn't do pipe symbols

2010-06-19 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

It will return the former.

To clarify, it's true that there appears to be a problem with Popen(['echo', 
'foo|bar'], shell=True).  That is being tracked in issue7839.

What's invalid is the report that list2cmdline() should be quoting strings with 
| in them.  list2cmdline() is documented as being an implementation of the 
quoting convention implemented by the MS C runtime.  That quoting convention 
does not require | to be quoted.

It's cmd.exe which requires | to be quoted (if it is to be part of an argument 
value, rather than to indicate a command pipeline of some sort).  cmd.exe 
quoting rules need to be addressed separately from the MS C quoting rules used 
even if cmd.exe isn't involved.

--

___
Python tracker 

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



[issue4919] 2.6.1 build issues on solaris with SunStudio 12

2010-06-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

Can this be closed as out of date or is it still an issue with Python 2.7 or 
any of the Python 3 versions?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue9033] cmd module tab misbehavior

2010-06-19 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for your report. Does the readline module work at all?

2.5 is unsupported now; can you test your code with 2.7, the next stable 
version?

--
nosy: +merwok

___
Python tracker 

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



[issue4883] Compiling python 2.5.2 under Wine on linux.

2010-06-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

It can be closed.  Thanks!

--
nosy: +mark.dickinson
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue4883] Compiling python 2.5.2 under Wine on linux.

2010-06-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

Hi Mark,

It'll cost you a couple of pints of Ringwood Old Thumper if you're ever in my 
neck of the woods.

Also blame Terry Reedy if I prove to be a pain in the neck!!!

Kindest regards.

Mark Lawrence.


From: Mark Dickinson 
To: breamore...@yahoo.co.uk
Sent: Sat, 19 June, 2010 19:19:27
Subject: [issue4883] Compiling python 2.5.2 under Wine on linux.

Mark Dickinson  added the comment:

It can be closed.  Thanks!

--
nosy: +mark.dickinson
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___

--
Added file: http://bugs.python.org/file17721/unnamed

___
Python tracker 

___Hi Mark,It'll cost you a couple 
of pints of Ringwood Old Thumper if you're ever in my neck of the 
woods.Also blame Terry Reedy if I prove to be a pain in the 
neck!!!Kindest regards.Mark Lawrence.From: Mark Dickinson 
To: breamore...@yahoo.co.ukSent: Sat, 19 June, 2010 19:19:27Subject: [issue4883] Compiling python 
2.5.2 under Wine on
 linux.Mark Dickinson dicki...@gmail.com> added the 
comment:It can be closed.  Thanks!--nosy: 
+mark.dickinsonresolution:  -> out of datestatus: open -> 
closed___Python tracker rep...@bugs.python.org>http://bugs.python.org/issue4883>___




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



[issue4629] getopt should not accept no_argument that ends with '='

2010-06-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

I'm not sure why this is still open, would somebody like to comment, see also 
Issue4650.

--
nosy: +BreamoreBoy

___
Python tracker 

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




[issue9033] cmd module tab misbehavior

2010-06-19 Thread Shashwat Anand

Shashwat Anand  added the comment:

It seems readline module is not installed on your system. 
Quoting Ned Deily's comment from issue8365 which will most probably solve your 
issue:
"Issue6877 (and subsequent fixes in Issue8066) allows the Python readline 
module to be built and linked with the OS X editline (libedit) library rather 
than with the GNU readline library (which is not included with OS X).  However, 
the libedit included in versions of OS X prior to 10.5 is considered too broken 
to use here.

By default, if you do not specify an --with-universal-archs other than "32-bit" 
to configure or if you do not explicitly set MACOSX_DEPLOYMENT_TARGET to 
another value, configure defaults to using "10.4" (or earlier) so the building 
of the readline module is skipped.  You can check this:

>>> from distutils.sysconfig import get_config_var 
>>> get_config_var('MACOSX_DEPLOYMENT_TARGET')
'10.4'

(Whether this is the best default is another question.)

As it stands, to be able to build the readline module, either:

(1) supply the GNU readline library as a local library, or

(2) ensure you are building with a deployment target of at least 10.5.  For 
example:

./configure MACOSX_DEPLOYMENT_TARGET=10.6 ; make

Also note that option (2) is not available for 3.1.x since the changes to 
support editline/libedit were not ported to it; they are, however, in 2.6.5, 
2.7 (trunk), and 3.2 (py3k)"

--
nosy: +l0nwlf

___
Python tracker 

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



[issue9033] cmd module tab misbehavior

2010-06-19 Thread Shashwat Anand

Changes by Shashwat Anand :


--
nosy: +ned.deily

___
Python tracker 

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



[issue1300] subprocess.list2cmdline doesn't do pipe symbols

2010-06-19 Thread Andrew Moise

Andrew Moise  added the comment:

Okay, makes sense.  It sure would be nice on Windows to have an equivalent of 
list2cmdline() that works for the shell.  I actually don't have immediate 
access to the code anymore, but I remember having to fool around with 
list2cmdline in the first place because it was difficult to do what I wanted 
without passing things through the shell (maybe I was spawning a process on 
Windows and capturing input/output/stderr; I don't remember in detail).

Maybe the solution is to make what I was trying to do easier without fooling 
with the shell instead of playing the fool's game of trying to improve the 
ability to deal with the shell so we can pass things through it unnecessarily.

Anyway, thanks.

--

___
Python tracker 

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



[issue4654] os.path.realpath() get the wrong result

2010-06-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

An issue with Python 2.3, can this be closed or is it still a problem with 
Python 2.7 or any of the Python 3 versions?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue8820] IDLE not launching correctly

2010-06-19 Thread Shashwat Anand

Changes by Shashwat Anand :


--
nosy: +kbk

___
Python tracker 

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



[issue8820] IDLE not launching correctly

2010-06-19 Thread Shashwat Anand

Changes by Shashwat Anand :


--
nosy: +l0nwlf

___
Python tracker 

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



[issue4654] os.path.realpath() get the wrong result

2010-06-19 Thread Shashwat Anand

Changes by Shashwat Anand :


--
nosy: +l0nwlf, loewis

___
Python tracker 

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



[issue5005] 3.0 sqlite doc: most examples refer to pysqlite2, use 2.x syntax.

2010-06-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

I'm guessing that this is fixed and hence can be closed as google didn't throw 
anything obvious at me, am I correct?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue4654] os.path.realpath() get the wrong result

2010-06-19 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue1479626] Uninstall does not clean registry

2010-06-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

Wouldn't be the first Windows uninstaller to leave junk in the registry and 
won't be the last.  if this is going to be actioned versions need to be updated 
to Python 2.7, thinking realistically of 2.7.1, and Python 3.2+?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate

2010-06-19 Thread Devin Cook

Changes by Devin Cook :


--
nosy: +devin

___
Python tracker 

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



[issue4654] os.path.realpath() get the wrong result

2010-06-19 Thread Shashwat Anand

Shashwat Anand  added the comment:

No such issue on python 2.6, 2.7, 3.2.

>>> print(os.path.realpath('/Users/l0nwlf/Desktop/tmp/../decotest.lnk'))
/Users/l0nwlf/Desktop/decotest.lnk
I think this issue can be closed.
However, I came with a different issue while testing on 2.6, trunk and 3.2.

>>> print(os.path.realpath('~/Desktop/tmp/../decotest.lnk'))
/Volumes/CoreHD/py3k/~/Desktop/decotest.lnk

--

___
Python tracker 

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



[issue1778410] removeTest() method patch for unittest.TestSuite

2010-06-19 Thread Mark Lawrence

Mark Lawrence  added the comment:

This is almost three years old but strikes me as being useful.  Could somebody 
with more knowledge than myself review the patch and update the relevant Python 
versions?  Failing that, simply close the issue as not being relevant today.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue5005] 3.0 sqlite doc: most examples refer to pysqlite2, use 2.x syntax.

2010-06-19 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This issue is about the examples in 
11.6.1. Module functions and constants.
All 3 points are fixed.
The indentation issue seems to have been fixed by making the blank line 
completely blank with no spaces. I would have removed it, but cut and paste now 
works.

I have no idea what Google has to do with this, but thanks for pinging it.

--
assignee:  -> d...@python
components: +Documentation
nosy: +d...@python
resolution:  -> fixed
status: open -> closed
type:  -> behavior
versions: +Python 3.1

___
Python tracker 

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



[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-19 Thread Shashwat Anand

Shashwat Anand  added the comment:

Following the documentation,
os.path.normcase(path)
Normalize the case of a pathname. On Unix and Mac OS X, this returns the path 
unchanged; on case-insensitive filesystems, it converts the path to lowercase. 
On Windows, it also converts forward slashes to backward slashes.

on Mac OS X,
>>> import os
>>> os.name
'posix'

Checking through, Lib/posixpath.py,

# Normalize the case of a pathname.  Trivial in Posix, string.lower on Mac.
# On MS-DOS this may also turn slashes into backslashes; however, other
# normalizations (such as optimizing '../' away) are not allowed
# (another function should be defined to do that).

def normcase(s):
"""Normalize case of pathname.  Has no effect under Posix"""
# TODO: on Mac OS X, this should really return s.lower().
return s

Why on Mac OS X, it should return s.lower() ?
Also to raise Error for None case we can probably change normcase() in 
Lib/posixpath.py as,

def normcase(s):
"""Normalize case of pathname.  Has no effect under Posix"""
if s is None:  
raise AttributeError
return s

--
nosy: +l0nwlf

___
Python tracker 

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



[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-19 Thread Steven Bethard

Steven Bethard  added the comment:

Yes, please generate patches from the Python repository.

Thanks!

--

___
Python tracker 

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



[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-19 Thread Éric Araujo

Éric Araujo  added the comment:

Guidelines: http://www.python.org/dev/patches/

--

___
Python tracker 

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



[issue5969] setup build with Platform SDK, finding vcvarsall.bat

2010-06-19 Thread Georg Brandl

Changes by Georg Brandl :


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> msvc9compiler.py: ValueError: [u'path']

___
Python tracker 

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



[issue5972] Failing test_signal.py on Redhat 4.1.2-44

2010-06-19 Thread Georg Brandl

Georg Brandl  added the comment:

Closing for lack of response.

--
nosy: +georg.brandl
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue9005] Year range in timetuple

2010-06-19 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
keywords: +patch
Added file: http://bugs.python.org/file17722/issue9005.diff

___
Python tracker 

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



[issue9005] Year range in timetuple

2010-06-19 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue8524] SSL sockets do not retain the parent socket's attributes

2010-06-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I have tried refactoring the ssl code in order not to inherit from socket 
anymore, but it turned out suboptimal because chunks of code from the socket 
class then have to be duplicated.

Therefore, I instead propose a much simpler approach which is to add a forget() 
method to socket objects; this method "closes" the socket object (sets the 
internal fd to -1) without closing the underlying fd at all. This allows to 
create another socket (actually SSLSocket) from the same fd without having to 
dup() it.

Here is a patch; if the principle is accepted, I will add tests and docs.

--
keywords: +patch
nosy: +loewis
Added file: http://bugs.python.org/file17723/sockforget.patch

___
Python tracker 

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



[issue8939] Use C type names (PyUnicode etc;) in the C API docs

2010-06-19 Thread Éric Araujo

Éric Araujo  added the comment:

Shouldn’t “inside a :ctype:`Py_BEGIN_ALLOW_THREADS` block” rather use 
“:cmacro:”?

--

___
Python tracker 

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



[issue8524] SSL sockets do not retain the parent socket's attributes

2010-06-19 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

It might be nice to see the version that avoids the dup() and has the duplicate 
code instead (interesting trade-off ;).  Just for the sake of comparison 
against the forget() proposal.

--

___
Python tracker 

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



[issue4654] os.path.realpath() get the wrong result

2010-06-19 Thread R. David Murray

R. David Murray  added the comment:

Your different issue looks like a correct result to me.  ~ is not automatically 
expanded.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue9008] CGIHTTPServer support for arbitrary CGI scripts

2010-06-19 Thread Éric Araujo

Éric Araujo  added the comment:

I’m sorry to have launched this thread. I hadn’t thought that Senthil
is doing a lot of good work on HTTP and URI-related modules, and I wanted
to express my feeling that this bug would not get fixed without someone
proposing a patch. I didn’t want to imply that the request was not valid
nor to discourage bug reporters. If I did, I sincerely apologize.

To address the issues Anatoly raised before I stop being off-topic:

1) Patch submission: You can already use Mercurial to prepare patches
(bare Mercurial, MQ or pbranch, on top of a Subversion checkout or
Mercurial clone (code.python.org/hg, kindly maintained by Antoine).

2) No maintainer for CGI: The term “maintainer” is explained at the top of
the Misc/maintainers.rst file, it means a core developer taking special
care of one area or module. All core developpers are collectively
maintaining the whole stdlib; a module without a dedicated maintainer is
*not* unmaintained.

3) Nothing better than CGI in stdlib: BaseHTTPServer is handy for quick
testing; wsgiref is okay for quick testing of WSGI applications.
Third-party servers have different design goals and advantages for various
classes of users.

4) The header thing is a bug; I’ll search whether it’s already reported.

5) Current workflow seems good to the vast majority of contributors. I’ve
been contributing for a few months and found the workflow reasonable and
working, like a lot of people. That said, a Web UI for doc changes with
live preview may be a good way to let non-programmers propose fixes;
please open a feature request on Sphinx’ tracker (on Bitbucket) or ask for
opinions on d...@python.org. Again, we’re all volunteers here, so “you
should do X” works a lot less than “I want to do X”.

I hope I have provided some hints and data points; I do not wish this
off-topic discussion to continue. Like Antoine said, we now understand your
viewpoint, and your suggestions for improvement would be more fruitful on
relevant mailing lists. Regards

--

___
Python tracker 

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



[issue4654] os.path.realpath() get the wrong result

2010-06-19 Thread Shashwat Anand

Shashwat Anand  added the comment:

By different issue I meant expected but non-useful output. 
Although it does exactly what it is supposed to do, but expanding tilde (~) to 
$HOME could have been the default behavior(more user-friendly I should say). 
Don't know if that is worth it but the scale seems more on the negative side.

--

___
Python tracker 

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



[issue4654] os.path.realpath() get the wrong result

2010-06-19 Thread R. David Murray

R. David Murray  added the comment:

I can confirm this works correctly on 32 bit Linux under 2.6.4.  Since it is 
unlikely the width matters to this issue I'm going to close it. If anyone has a 
case where it fails we can reopen.

--
resolution:  -> out of date
stage:  -> committed/rejected

___
Python tracker 

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



[issue4654] os.path.realpath() get the wrong result

2010-06-19 Thread R. David Murray

R. David Murray  added the comment:

Somebody long ago made the decision that ~ is only expanded if you call 
expanduser.  I don't think this decision is likely to get changed.

--

___
Python tracker 

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



[issue4654] os.path.realpath() get the wrong result

2010-06-19 Thread R. David Murray

Changes by R. David Murray :


--
status: open -> closed

___
Python tracker 

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



[issue9005] Year range in timetuple

2010-06-19 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Note that a recently closed issue 7150 similarly tightened up datetime 
operations by making out of range dates raise OverflowError rather than produce 
non-sensible result.  This case is not a clear cut, but now with timezone.utc 
available in datetime module, I believe users should be encouraged to use 
t.astimezone(timezone.utc) to produce UTC time.  If timetuple is required the 
later can be converted using timetuple() method.  Idelally, t.utctimetuple() 
should be deprecated in favor of more explicit 
t.astimezone(timezone.utc).timetuple().  Unfortunately the two expressions are 
subtly different because 

>>> t = datetime.max.replace(tzinfo=timezone.min)
>>> t.astimezone(timezone.utc)
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: date value out of range

--
nosy: +gvanrossum

___
Python tracker 

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



[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2010-06-19 Thread Timothy Farrell

Timothy Farrell  added the comment:

Yes, they are related but not quite the same.  The solution to this problem 
will likely include a fix to the problem described in issue 8077.

--

___
Python tracker 

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



[issue9034] datetime module should use int32_t for date/time components

2010-06-19 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

"""
As an aside, I dislike the fact that the datetime module uses a C 'int' for 
date ordinals, and clearly assumes that it'll be at least 32 bits.  int could 
be as small as 16 bits on some systems (small embedded systems?).  But that's 
another issue.
""" -- Mark Dickinson 

A comment and an assertion at the top of the module suggest that this was 
deliberate.

/* We require that C int be at least 32 bits, and use int virtually 
 
 * everywhere.  In just a few cases we use a temp long, where a Python  
 
 * API returns a C long.  In such cases, we have to ensure that the 
 
 * final result fits in a C int (this can be an issue on 64-bit boxes). 
 
 */
#if SIZEOF_INT < 4
#   error "datetime.c requires that C int have at least 32 bits"
#endif

However, since ranges of all integers are well defined in this module, there is 
little to be gained from the uncertainty about sizes of int and long. (For 
example, the allowed range of dates will not magically increase on a platform 
with 64 bit ints.)

I propose using explicitly sized C99 types int32_t and int64_t or rather their 
blessed for use in python equivalents PY_INTXX_T) throughout the module.

--
assignee: belopolsky
components: Extension Modules
messages: 108222
nosy: belopolsky, mark.dickinson
priority: low
severity: normal
stage: needs patch
status: open
title: datetime module should use int32_t for date/time components
type: feature request
versions: Python 3.2

___
Python tracker 

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



[issue8996] Add a default role to allow writing bare `len` instead of :func:`len`

2010-06-19 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

-1 I like how explicit it is now.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue8998] add crypto routines to stdlib

2010-06-19 Thread geremy condra

geremy condra  added the comment:

On Sat, Jun 19, 2010 at 7:52 AM, Antoine Pitrou  wrote:
>
> Antoine Pitrou  added the comment:
>
> Le samedi 19 juin 2010 à 00:55 +, geremy condra a écrit :
>> geremy condra  added the comment:
>>
>> On Fri, Jun 18, 2010 at 6:05 AM, Antoine Pitrou  
>> wrote:
>> >
>> > Antoine Pitrou  added the comment:
>> >
>> >> Great, I'm thinking more-or-less the API proposed in PEP 272- the
>> >> exception I'm thinking of is that 'strings' should be substituted for
>> >> 'bytes'- for AES and DES. It gets trickier when talking about public
>> >> key crypto, though. Perhaps something along the lines of
>> >> RSA.new(public_key=None, private_key=None,...), with the resulting
>> >> object supporting encrypt/decrypt/sign/verify operations?
>> >
>> > I don't have any opinion right now. I think a concrete proposal should
>> > be initiated and we can iterate from that.
>> > (that's assuming other people agree on the principle, of course)
>>
>> I assume that by "a concrete proposal" you're talking about code? Or
>> API docs? Also, what more needs to be done to ensure that other people
>> agree on the principle?
>
> I was thinking about a PEP. Of course, you are free to reuse existing
> PEP content for that :)

Ok. I've gone ahead and put together kind of a map for what I think the
basic structure of the library is going to look like. Let me know what you
think, and once we're done with that we can proceed into PEP land.

crypto API
==
Variables message, key, salt, iv, ciphertext, and signature are of type bytes.
Variables public_key and private_key are DER-encoded bytes.
Variable bitlength is an integer.

Note that we deviate from the standard in PEP 272 in several ways:

* arguments are generally bytes rather than strings
* ciphers do not accept the 'counter', 'rounds', or 'segment_size' args

Layer 1
---

Symmetric Ciphers
crypto.cipher.encrypt(message, key) -> (salt, iv, ciphertext)
depends on:
crypto.keys.strengthen_password
crypto.AES.new
crypto.AES.encrypt
raises:
crypto.cipher.EncryptionError

crypto.cipher.decrypt(salt, iv, ciphertext, key) -> message
depends on:
crypto.AES.new
crypto.AES.decrypt
raises:
crypto.cipher.DecryptionError

Envelope Encryption
crypto.envelope.encrypt(message, public_key) -> (iv, aes_key, 
ciphertext)
depends on:
crypto.keys.random_key
crypto.AES.new
crypto.AES.encrypt
crypto.RSA.new
crypto.RSA.encrypt
raises:
crypto.envelope.EncryptionError

crypto.envelope.decrypt(iv, aes_key, ciphertext, private_key) -> message
depends on:
crypto.AES.new
crypto.AES.decrypt
crypto.RSA.new
crypto.RSA.decrypt
raises:
crypto.envelope.DecryptionError

Digital Signatures
crypto.signature.sign(message, private_key) -> signature
depends on:
hashlib.SHA512.new
hashlib.SHA512.update
hashlib.SHA512.digest
crypto.RSA.new
crypto.RSA.sign
raises:
crypto.signature.SigningError

crypto.signature.verify(message, signature, public_key)
depens on:
hashlib.SHA512.new
hashlib.SHA512.update
hashlib.SHA512.digest
crypto.RSA.new
crypto.RSA.verify

Layer 2
---

Utilities
crypto.keys.strengthen_password(password) -> key
depends on:
openssl: RAND_bytes, EVP_get_digest_by_name, 
EVP_bytes_to_key
raises:
crypto.keys.KeyGenerationError

Symmetric Encryption
crypto._cipher_object

crypto._cipher_object.CipherObject._ctx = openssl context | None
crypto._cipher_object.CipherObject._cipher = openssl cipher | 
None
crypto._cipher_object.CipherObject._key = bytes | None

CipherObject.encrypt(self, data) -> ciphertext
depends on:
crypto._cipher_object.CipherObject.encrypt_init

crypto._cipher_object.CipherObject.encrypt_update

crypto._cipher_object.CipherObject.encrypt_finalize
raises:
crypto._cipher_object.EncryptError

Ci