[Python-Dev] Python 2.4 README

2004-12-02 Thread Oleg Broytmann
Hello. Python 2.4 README still thinks it is 2.3.

   README lines 230-231:

"A number of features are not supported in Python 2.3 anymore. Some
support code is still present, but will be removed in Python 2.4."

   "Will be"? Isn't it 2.4 already? :)

Line 322: "Tcl to support it. To compile Python2.3 with Tkinter, you will"

   Python2.4, I suppose?

Oleg.
-- 
 Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Unicode in doctests

2004-12-02 Thread Bjorn Tillenius
There are some issues regarding the use of unicode in doctests. Consider
the following three tests.

>>> foo = u'föö'
>>> foo
u'f\xf6\xf6'

>>> foo
u'f\u00f6\u00f6'

>>> foo
u'föö'

To me, those are identical. At least string comparison shows that
u'f\xf6\xf6' == u'f\u00f6\u00f6' == u'föö'. Yet, only the first one of
the tests passes, the other two fail. And that's if the tests are within
a doc string, where I can specify the encoding used. If DocFileSuite is
being used, there's no way of specify the encoding, thus all tests will
fail.

Is it supposed to be like this, or have I missed something? If I could
specify the encoding for DocFileSuite to use, I would at least be
partially happy.

Regards,

Bjorn
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] SRE bug and notifications

2004-12-02 Thread Gustavo Niemeyer
I'm really ashamed. The SRE bug #1072259, reported in 2004-11-24,
and fixed a few minutes ago, got into 2.4 final. The only reason
it wasn't fixed on time for 2.4 is because I wasn't aware about
it. :-(

Is there any way to get notified about certain kinds of bugs
in SourceForge? Or, is there any way to follow all new bugs
posted? Or even, what's the easiest way to avoid that problem
by being notified of bugs as soon as possible?

Thank you, and I'm sorry.

-- 
Gustavo Niemeyer
http://niemeyer.net
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] SRE bug and notifications

2004-12-02 Thread A.M. Kuchling
On Thu, Dec 02, 2004 at 02:31:06PM -0200, Gustavo Niemeyer wrote:
> in SourceForge? Or, is there any way to follow all new bugs
> posted? Or even, what's the easiest way to avoid that problem
> by being notified of bugs as soon as possible?

Kurt's weekly bug summaries list all new bugs.  For a sample, see
http://mail.python.org/pipermail/python-list/2004-December/252968.html ; they 
get 
posted to python-dev, too.

Perhaps the summaries should include an "unassigned bugs" list to nag
us to look at bugs and assign them to the right person.

--amk

___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Re: SRE bug and notifications

2004-12-02 Thread Gustavo Niemeyer
> Is there any way to get notified about certain kinds of bugs
> in SourceForge? Or, is there any way to follow all new bugs
> posted? Or even, what's the easiest way to avoid that problem
> by being notified of bugs as soon as possible?

After some googling I've found python-bugs-list. Mentioning it
in http://www.python.org/community/lists.html might be a good
idea.

Additional suggestions still accepted.

Thanks!

-- 
Gustavo Niemeyer
http://niemeyer.net
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] SRE bug and notifications

2004-12-02 Thread Tim Peters
FYI, I just changed SF so that bugs with Category "Regular
Expressions" are auto-assigned to Gustavo (they were being
auto-assigned to Fredrik, which doesn't appear to do much good
anymore).

[Gustavo Niemeyer]
> I'm really ashamed. The SRE bug #1072259, reported in
> 2004-11-24, and fixed a few minutes ago, got into 2.4 final. The
> only reason it wasn't fixed on time for 2.4 is because I wasn't
> aware about it. :-(

Unfortunately, that particular bug was in a wrong Category, so the new
auto-assign wouldn't have helped here anyway.
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] [Python-checkins] python/dist/src/Doc/lib liblogging.tex, 1.33, 1.34

2004-12-02 Thread Raymond Hettinger
Reminder:  The head is now for Py2.5.
Please also do a checkin for release24-maint.

Raymond

___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] An import hook which does nothing

2004-12-02 Thread Noam Raphael
Hello,
I'm currently writing an import hook which will cache information on the 
local disk, instead of retrieving it every time from the slow NFS where 
I work.
To make sure that I understand how import hooks work, and as a starting 
point, I wrote a dummy import hook, which is supposed to behave like the 
python's built-in import mechanism.
I post it here, for two reasons:
1. So that developers who understand the import mechanism better than I 
do may review it and find things which I didn't do exactly right.
2. Because I think other people might find it helpful when writing new 
import hooks, as a starting point as well as for better understanding -- 
there's nothing like a working example to help you settle up on what 
does which where. (Although perhaps a few more comments, in addition to 
those which I wrote, might help...)

(Note: I wrote the "DEBUG" parts in order to make sure that my importer 
works, because if it fails things might be done by the built-in importer 
and I won't notice. These parts can be removed, of course.)

Do you think that it might be useful? Maybe something like that can go 
into the "examples" section of the imp module?

Thanks,
Noam Raphael
import imp
import sys

DEBUG = True

if DEBUG:
myimports = []


class InPackageFinder(object):
"""Find a module/package in a package."""

def find_module(self, fullname, path=None):
if path is None:
# Not in a package - don't handle it here.
return None

try:
f, fn, desc = imp.find_module(fullname[fullname.rfind('.')+1:],
  path)
except ImportError:
# Well, I don't find it, maybe others will.
return None

return Loader(f, fn, desc)


class TopLevelFinder(object):
"""Find a top level module/package."""

def __init__(self, path):
self._path = path

def find_module(self, fullname):
try:
f, fn, desc = imp.find_module(fullname, [self._path])
except ImportError:
# It is not in this path. Maybe in another one.
return None

return Loader(f, fn, desc)


class Loader(object):
"""Load a module/package."""

def __init__(self, f, fn, desc):
self._f, self._fn, self._desc = f, fn, desc

def load_module(self, fullname):
if DEBUG:
myimports.append(fullname)

try:
return imp.load_module(fullname, self._f, self._fn, self._desc)
finally:
if self._f is not None:
# For packages we have None instead of a file object.
self._f.close()


def install():
sys.meta_path.append(InPackageFinder())
sys.path_hooks.append(TopLevelFinder)
sys.path_importer_cache.clear()

if DEBUG:
myimports.extend(sys.modules.iterkeys())

if DEBUG:
def checkok():
return not [x for x in sys.modules if
sys.modules[x] is not None
and hasattr(sys.modules[x], "__file__")
and x not in myimports]
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com