[issue1009] Implementation of PEP 3101, Advanced String Formatting

2007-08-25 Thread Eric V. Smith

Eric V. Smith added the comment:

Closed, code was checked in revision 57444.

--
versions: +Python 3.0 -Python 2.6

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1009
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1009] Implementation of PEP 3101, Advanced String Formatting

2007-08-25 Thread Eric V. Smith

Eric V. Smith added the comment:

I tried to close it, without success.  Possible tracker issue, I'll
investigate.

It should be closed!

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1009
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1764407] The -m switch does not use the builtin __main__ module

2007-08-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Fixed committed to SVN as r57461

--
resolution:  - fixed
status: open - closed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1764407
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1574217] isinstance swallows exceptions

2007-08-25 Thread Brian Harring

Changes by 
Brian Harring
:


--
versions: +Python 2.5

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1574217
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1018] server-side ssl support

2007-08-25 Thread Guido van Rossum

Guido van Rossum added the comment:

Committed revision 57464.

--
resolution:  - accepted
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1018
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1020] pydoc doesn't work on pyexpat

2007-08-25 Thread Neal Norwitz

New submission from Neal Norwitz:

help(pyexpat) causes an exception:

Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/neal/python/dev/py3k/Lib/site.py, line 350, in __call__
return pydoc.help(*args, **kwds)
  File /home/neal/python/dev/py3k/Lib/pydoc.py, line 1685, in __call__
self.help(request)
  File /home/neal/python/dev/py3k/Lib/pydoc.py, line 1729, in help
else: doc(request, 'Help on %s:')
  File /home/neal/python/dev/py3k/Lib/pydoc.py, line 1512, in doc
pager(render_doc(thing, title, forceload))
  File /home/neal/python/dev/py3k/Lib/pydoc.py, line 1490, in 
render_doc
return title % desc + '\n\n' + text.document(object, name)
  File /home/neal/python/dev/py3k/Lib/pydoc.py, line 319, in document
if inspect.ismodule(object): return self.docmodule(*args)
  File /home/neal/python/dev/py3k/Lib/pydoc.py, line 1076, in 
docmodule
contents.append(self.document(value, key, name))
  File /home/neal/python/dev/py3k/Lib/pydoc.py, line 320, in document
if inspect.isclass(object): return self.docclass(*args)
  File /home/neal/python/dev/py3k/Lib/pydoc.py, line 1126, in docclass
mro = deque(inspect.getmro(object))
TypeError: 'NoneType' object is not iterable

--
components: Library (Lib)
messages: 55289
nosy: nnorwitz
severity: normal
status: open
title: pydoc doesn't work on pyexpat
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1020
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1021] logging.basicConfig does not allow to set NOTSET level

2007-08-25 Thread viper

Changes by viper:


--
components: Library (Lib)
severity: minor
status: open
title: logging.basicConfig does not allow to set NOTSET level
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1021
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1022] use bytes for code objects

2007-08-25 Thread Neal Norwitz

New submission from Neal Norwitz:

This patch has a hack to read in marshaled code objects.  Bytes can't be 
marshaled currently (they are stored as strings).  So when reading a 
marshaled code object, the hack converts them to bytes.

All tests except test_modulefinder pass.

The issue is that since bytes are mutable, they aren't suitable for code 
objects since a user could change them at any time.

--
components: Interpreter Core
files: code-bytes.patch
messages: 55290
nosy: nnorwitz
severity: normal
status: open
title: use bytes for code objects
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1022
__

code-bytes.patch
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1023] [PATCH] Unicode fixes in floatobject and moduleobject

2007-08-25 Thread Ero Carrera

New submission from Ero Carrera:

Removed calls to  _PyUnicode_AsDefaultEncodedString and replaced them
wit PyUnicode_AsString.
Also removed calls to PyString_* and replaced them by the equivalent
PyUnicode_*

--
files: floatobject_moduleobject_pystring.patch
messages: 55291
nosy: ero.carrera
severity: normal
status: open
title: [PATCH] Unicode fixes in floatobject and moduleobject
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1023
__

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



[issue1018] server-side ssl support

2007-08-25 Thread Bill Janssen

Changes by Bill Janssen:


--
nosy: +janssen

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1018
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1467929] %-formatting and dicts

2007-08-25 Thread Sean Reifschneider

Sean Reifschneider added the comment:

I'm attaching a new version of this which includes AMK's string patch
ported over to unicode.

Any objections to my committing this to the trunk?  Should it also go in
for the next 2.5 release?

--
nosy: +jafo

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1467929
_Index: Objects/unicodeobject.c
===
--- Objects/unicodeobject.c	(revision 57477)
+++ Objects/unicodeobject.c	(working copy)
@@ -7730,12 +7730,19 @@
 */
 #define FORMATBUFLEN (size_t)120
 
+/* Constants for the type of % argument being used -- not known, 
+   a mapping, or a tuple. */
+#define FORMAT_TYPE_UNKNOWN 0
+#define FORMAT_TYPE_MAPPING 1
+#define FORMAT_TYPE_TUPLE 2
+
 PyObject *PyUnicode_Format(PyObject *format,
 			   PyObject *args)
 {
 Py_UNICODE *fmt, *res;
 Py_ssize_t fmtcnt, rescnt, reslen, arglen, argidx;
 int args_owned = 0;
+int format_type = FORMAT_TYPE_UNKNOWN;
 PyUnicodeObject *result = NULL;
 PyObject *dict = NULL;
 PyObject *uformat;
@@ -7806,6 +7813,13 @@
 format requires a mapping);
 		goto onError;
 		}
+		if (format_type == FORMAT_TYPE_TUPLE) {
+		PyErr_SetString(PyExc_ValueError,
+both keyed and unkeyed format 
+specifiers used);
+		goto onError;
+		}
+		format_type = FORMAT_TYPE_MAPPING;
 		++fmt;
 		--fmtcnt;
 		keystart = fmt;
@@ -7849,6 +7863,15 @@
 		arglen = -1;
 		argidx = -2;
 	}
+	else if (format_type == FORMAT_TYPE_MAPPING) {
+		PyErr_SetString(PyExc_ValueError,
+both keyed and unkeyed format specifiers used
+);
+		goto onError;
+	}
+	else if (format_type == FORMAT_TYPE_UNKNOWN) {
+		format_type = FORMAT_TYPE_TUPLE;
+	}
 	while (--fmtcnt = 0) {
 		switch (c = *fmt++) {
 		case '-': flags |= F_LJUST; continue;
Index: Objects/stringobject.c
===
--- Objects/stringobject.c	(revision 57477)
+++ Objects/stringobject.c	(working copy)
@@ -4455,6 +4455,12 @@
 */
 #define FORMATBUFLEN (size_t)120
 
+/* Constants for the type of % argument being used -- not known, 
+   a mapping, or a tuple. */
+#define FORMAT_TYPE_UNKNOWN 0
+#define FORMAT_TYPE_MAPPING 1
+#define FORMAT_TYPE_TUPLE 2
+
 PyObject *
 PyString_Format(PyObject *format, PyObject *args)
 {
@@ -4462,6 +4468,7 @@
 	Py_ssize_t arglen, argidx;
 	Py_ssize_t reslen, rescnt, fmtcnt;
 	int args_owned = 0;
+	int format_type = FORMAT_TYPE_UNKNOWN;
 	PyObject *result, *orig_args;
 #ifdef Py_USING_UNICODE
 	PyObject *v, *w;
@@ -4534,6 +4541,12 @@
 		 format requires a mapping);
 	goto error;
 }
+if (format_type == FORMAT_TYPE_TUPLE) {
+	PyErr_SetString(PyExc_ValueError,
+		 both keyed and unkeyed format specifiers used);
+	goto error;
+}
+format_type = FORMAT_TYPE_MAPPING;
 ++fmt;
 --fmtcnt;
 keystart = fmt;
@@ -4568,6 +4581,14 @@
 arglen = -1;
 argidx = -2;
 			}
+			else if (format_type == FORMAT_TYPE_MAPPING) {
+			  PyErr_SetString(PyExc_ValueError,
+	  both keyed and unkeyed format specifiers used);
+			  goto error;
+			}
+			else if (format_type == FORMAT_TYPE_UNKNOWN) {
+			  format_type = FORMAT_TYPE_TUPLE;
+			}
 			while (--fmtcnt = 0) {
 switch (c = *fmt++) {
 case '-': flags |= F_LJUST; continue;


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



[issue1024] documentation for new SSL module

2007-08-25 Thread Bill Janssen

New submission from Bill Janssen:

Here's a documentation patch for the SSL code that was checked in 
yesterday.  It removes discussion of SSL from the socket documentation, 
makes a change to the urllib2 doc's discussion of how to test for SSL 
support, and adds documentation of the SSL module and it's features, 
including some examples of how to use it.

--
files: x2
keywords: patch
messages: 55293
nosy: janssen
priority: normal
severity: normal
status: open
title: documentation for new SSL module
type: rfe
versions: Python 2.6

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1024
__

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



[issue1024] documentation for new SSL module

2007-08-25 Thread Bill Janssen

Bill Janssen added the comment:

Sorry, long day:  ...and its features...

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1024
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1024] documentation for new SSL module

2007-08-25 Thread Bill Janssen

Changes by Bill Janssen:


--
components: +Documentation

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1024
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1114345] Add SSL certificate validation

2007-08-25 Thread Bill Janssen

Bill Janssen added the comment:

I believe this is now fixed with patch 1018.

--
nosy: +janssen

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1114345
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1027394] socket.ssl should explain that it is a 2/3 connection

2007-08-25 Thread Bill Janssen

Bill Janssen added the comment:

Patch 1024 is new documentation which addresses this.  Is is sufficient?

--
nosy: +janssen

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1027394
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue889813] making the version of SSL configurable when creating sockets

2007-08-25 Thread Bill Janssen

Bill Janssen added the comment:

I believe issue 1018 now fixes this.

--
nosy: +janssen


Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue889813

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



[issue1583946] SSL issuer and server names cannot be parsed

2007-08-25 Thread Bill Janssen

Bill Janssen added the comment:

I believe issue 1018 addressed this, and that it can be closed.  Though 
socket.ssl, and its methods server and issuer, should be deprecated.

--
nosy: +janssen

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1583946
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1217246] proposed patch for tls wrapped ssl support added to smtplib

2007-08-25 Thread Bill Janssen

Bill Janssen added the comment:

This probably needs to be re-written with the new SSL support in 2.6.  
See issue 1024.

--
nosy: +janssen

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1217246
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue783188] support for server side transactions in _ssl

2007-08-25 Thread Bill Janssen

Bill Janssen added the comment:

I believe issue 1018 renders this one moot.  Though more examples in Demo 
is still a good idea.  I'll contribute a threaded server example for 
that.

--
nosy: +janssen


Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue783188

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



[issue1706815] socket.error exceptions not subclass of StandardError

2007-08-25 Thread Bill Janssen

Bill Janssen added the comment:

It's not clear to me that having the SSL errors inherit from socket.error 
is a good idea.  Many of them have nothing to do with the socket, but are 
errors in choice of cipher, certificate validation, etc.

--
nosy: +janssen

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1706815
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1583946] SSL issuer and server names cannot be parsed

2007-08-25 Thread Gregory P. Smith

Changes by Gregory P. Smith:


--
nosy:  -greg

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1583946
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1706815] socket.error exceptions not subclass of StandardError

2007-08-25 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Does the existing python SSL implementation allow it to be used over
something other than a socket?  If so then yes that makes sense, but
otherwise its best to leave its inheritance from socket.error so that
code that works when handed a regular socket can work over an SSL
socket without knowing the difference.

fwiw, regarding this bug the last comment I heard from guido on the
python-dev list was that socket.error should at least be a subclass of
EnvironmentError.  I'm still a fan of having it a subclass of IOError
myself for similar reason as above (things already written to use a
file object as a stream could use a socket object and still handle
errors properly; most code check for IOError rather than
EnvironmentError if for no reason other than IOError is easier to type
and easier to read and understand what it means)

On 8/25/07, Bill Janssen [EMAIL PROTECTED] wrote:

 Bill Janssen added the comment:

 It's not clear to me that having the SSL errors inherit from socket.error
 is a good idea.  Many of them have nothing to do with the socket, but are
 errors in choice of cipher, certificate validation, etc.

 --
 nosy: +janssen

 _
 Tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue1706815
 _


--
nosy: +gps

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1706815
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1025] tracebacks from list comps (probably other comps) don't show full stack

2007-08-25 Thread Neal Norwitz

New submission from Neal Norwitz:

A traceback that occurs within a list comprehension (and probably all
comprehensions) only shows the stack from the comprehension, not the
entire scope:

Traceback (most recent call last):
  File Lib/test/test_multibytecodec_support.py, line 35, in
test_chunkcoding
for f in self.tstring]):
  File Lib/test/test_multibytecodec_support.py, line 35, in listcomp
for f in self.tstring]):
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa6 in position 0:
unexpected code byte

--
components: Interpreter Core
keywords: py3k
messages: 55303
nosy: nnorwitz
severity: normal
status: open
title: tracebacks from list comps (probably other comps)  don't show full stack
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1025
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com