[issue1212] 3.0 tutorial/introduction.rst mentions 'long'

2007-09-28 Thread Georg Brandl

Georg Brandl added the comment:

Thanks, committed in r58281.

--
nosy: +georg.brandl
resolution:  -> accepted
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue1219] 3.0 library/stdtypes.rst patch

2007-09-28 Thread Georg Brandl

Georg Brandl added the comment:

Extended and committed in r58282.

--
resolution:  -> accepted
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue1219] 3.0 library/stdtypes.rst patch

2007-09-28 Thread Georg Brandl

Changes by Georg Brandl:


--
assignee:  -> georg.brandl
keywords: +patch
nosy: +georg.brandl

__
Tracker <[EMAIL PROTECTED]>

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



[issue1219] 3.0 library/stdtypes.rst patch

2007-09-28 Thread Peter Harris

New submission from Peter Harris:

Cleanup (removal of 2.x references, long etc. ).  I'm not 100% sure I've
got the rich-comparison stuff correct.

--
components: Documentation
files: stdtypes.diff
messages: 56186
nosy: scav
severity: normal
status: open
title: 3.0 library/stdtypes.rst patch
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1211] cleanup patch for 3.0 tutorial/interpreter.rst

2007-09-28 Thread Georg Brandl

Georg Brandl added the comment:

Thanks, committed in r58281. (I reordered the encoding section a bit.)

--
nosy: +georg.brandl
resolution:  -> accepted
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue1213] 3.0 tutorial/classes.rst patch

2007-09-28 Thread Georg Brandl

Georg Brandl added the comment:

Thanks, committed in r58281.

--
nosy: +georg.brandl
resolution:  -> accepted
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue1218] Restrict Google search to docs when in the docs subtree?

2007-09-28 Thread Skip Montanaro

Skip Montanaro added the comment:

Martin> Website issues are not tracked in this tracker. See
Martin> http://wiki.python.org/moin/PythonWebsiteCreatingNewTickets

Is there some reason at this point that we need to maintain two separate
trackers?  A ton of work went into making our Roundup instance what the key
players wanted.  Why not use it to track website issues as well?  With them
separate you have two communities of maintainers and triage folks who are
mostly disjoint.

I assume there would be some trac-to-roundup conversion necessary.  Perhaps
something like that already exists.

Skip

__
Tracker <[EMAIL PROTECTED]>

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



[issue1215] Python hang when catching a segfault

2007-09-28 Thread Guido van Rossum

Guido van Rossum added the comment:

Why is this a Python bug?

--
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue1210] imaplib does not run under Python 3

2007-09-28 Thread Raghuram Devarakonda

Raghuram Devarakonda added the comment:

I have gone through the python-3000 discussions about similar problems
in other stdlib modules (email, imghdr, sndhdr etc) and found PEP 3137
(Immutable Bytes and Mutable Buffer). Since that work is in progress, I
don't think it is worthwhile to fix this problem at this point.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1215] Python hang when catching a segfault

2007-09-28 Thread Miki Tebeka

Miki Tebeka added the comment:

Because it hangs Python :)

I know, "while 1: pass" also hangs Python, however it'll nice
if this behaviour was documented or (IMO better) that Python will
raise an InvalidArgument exception on SIGSEGV (like it does for SIGKILL).

__
Tracker <[EMAIL PROTECTED]>

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



[issue1218] Restrict Google search to docs when in the docs subtree?

2007-09-28 Thread Martin v. Löwis

Martin v. Löwis added the comment:

> Is there some reason at this point that we need to maintain two separate
> trackers? 

I don't know - I explained what is, not what should be. Whether or not
pydotorg people want to use the tracker, I can't tell.

Regards,
Martin

__
Tracker <[EMAIL PROTECTED]>

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



[issue766910] fix one or two bugs in trace.py

2007-09-28 Thread Zooko O'Whielacronx

Zooko O'Whielacronx added the comment:

Hi!  Sorry it took me so long to look at this.  I just checked the  
source in current trunk, and the relevant code is the same so this  
patch is still useful.  (See the initial post for details.)

Here is an updated version of the patch which simply removes some  
dead code and updates a URL:

regards,

Zooko

diff -rN -u old-up/setuptools-0.6c7/ez_setup.py new-up/ 
setuptools-0.6c7/ez_setup.py
--- old-up/setuptools-0.6c7/ez_setup.py 2007-09-28 16:41:24.0  
-0600
+++ new-up/setuptools-0.6c7/ez_setup.py 2007-09-28 16:41:25.0  
-0600
@@ -1,4 +1,4 @@
-#!python
+#!/usr/bin/env python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just  
include this
@@ -13,7 +13,7 @@
This file can also be run as a script to install or upgrade setuptools.
"""
-import sys
+import os, re, subprocess, sys
DEFAULT_VERSION = "0.6c7"
DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/";  
% sys.version[:3]
@@ -44,8 +44,6 @@
  'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53',
}
-import sys, os
-
def _validate_md5(egg_name, data):
  if egg_name in md5_data:
  from md5 import md5
@@ -58,6 +56,42 @@
  sys.exit(2)
  return data
+# The following code to parse versions is copied from  
pkg_resources.py so that
+# we can parse versions without importing that module.
+component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE)
+replace = {'pre':'c',  
'preview':'c','-':'final-','rc':'c','dev':'@'}.get
+
+def _parse_version_parts(s):
+for part in component_re.split(s):
+part = replace(part,part)
+if not part or part=='.':
+continue
+if part[:1] in '0123456789':
+yield part.zfill(8)# pad for numeric comparison
+else:
+yield '*'+part
+
+yield '*final'  # ensure that alpha/beta/candidate are before final
+
+def parse_version(s):
+parts = []
+for part in _parse_version_parts(s.lower()):
+if part.startswith('*'):
+if part<'*final':   # remove '-' before a prerelease tag
+while parts and parts[-1]=='*final-': parts.pop()
+# remove trailing zeros from each series of numeric parts
+while parts and parts[-1]=='':
+parts.pop()
+parts.append(part)
+return tuple(parts)
+
+def setuptools_is_new_enough(required_version):
+"""Return True if setuptools is already installed and has a version
+number >= required_version."""
+sub = subprocess.Popen([sys.executable, "-c", "import  
setuptools;print setuptools.__version__"], stdout=subprocess.PIPE)
+verstr = sub.stdout.read().strip()
+ver = parse_version(verstr)
+return ver and ver >= parse_version(required_version)
def use_setuptools(
  version=DEFAULT_VERSION, download_base=DEFAULT_URL,  
to_dir=os.curdir,
@@ -74,32 +108,11 @@
  this routine will print a message to ``sys.stderr`` and raise  
SystemExit in
  an attempt to abort the calling script.
  """
-try:
-import setuptools
-if setuptools.__version__ == '0.0.1':
-print >>sys.stderr, (
-"You have an obsolete version of setuptools installed.   
Please\n"
-"remove it from your system entirely before rerunning  
this script."
-)
-sys.exit(2)
-except ImportError:
+if not setuptools_is_new_enough(version):
  egg = download_setuptools(version, download_base, to_dir,  
download_delay)
  sys.path.insert(0, egg)
  import setuptools; setuptools.bootstrap_install_from = egg
-import pkg_resources
-try:
-pkg_resources.require("setuptools>="+version)
-
-except pkg_resources.VersionConflict, e:
-# XXX could we install in a subprocess here?
-print >>sys.stderr, (
-"The required version of setuptools (>=%s) is not  
available, and\n"
-"can't be installed while this script is running. Please  
install\n"
-" a more recent version first.\n\n(Currently using %r)"
-) % (version, e.args[0])
-sys.exit(2)
-
def download_setuptools(
  version=DEFAULT_VERSION, download_base=DEFAULT_URL,  
to_dir=os.curdir,
  delay = 15
@@ -150,9 +163,14 @@
def main(argv, version=DEFAULT_VERSION):
  """Install or upgrade setuptools and EasyInstall"""
-try:
-import setuptools
-except ImportError:
+if setuptools_is_new_enough(version):
+if argv:
+from setuptools.command.easy_install import main
+main(argv)
+else:
+print "Setuptools version",version,"or greater has been  
installed."
+print '(Run "ez_setup.py -U setuptools" to reinstall or  
upgrade.)'
+else:
  egg = None
  try:
  egg = download_setuptools(version, delay=0)
@@ -162,31 +180,6 @@
  finally:
  if egg and os.pa

[issue766910] fix one or two bugs in trace.py

2007-09-28 Thread Zooko O'Whielacronx

Zooko O'Whielacronx added the comment:

> Here is an updated version of the patch which simply removes some  
> dead code and updates a URL:
>
> regards,
>
> Zooko
>
> diff -rN -u old-up/setuptools-0.6c7/ez_setup.py new-up/ 
> setuptools-0.6c7/ez_setup.py
> --- old-up/setuptools-0.6c7/ez_setup.py   2007-09-28  
> 16:41:24.0 -0600
> +++ new-up/setuptools-0.6c7/ez_setup.py   2007-09-28  
> 16:41:25.0 -0600

Oops, the in-lined patch contents were a different patch entirely,  
but the attached patch file was correct.

Just for completeness, here is the correct in-lined patch contents:

Index: Lib/trace.py
===
--- Lib/trace.py(revision 58282)
+++ Lib/trace.py(working copy)
@@ -85,7 +85,12 @@
-r, --report  Generate a report from a counts file; do not  
execute
any code.  `--file' must specify the results  
file to
read, which must have been created in a  
previous run
-  with `--count --file=FILE'.
+  with `--count --file=FILE'.  If --coverdir is not
+  specified, the .cover files will be written  
into the
+  directory that the modules were in when the  
report was
+  generated.  Whether or not --coverdir is  
specified,
+  --report will always create the cover file  
directory if
+  necessary.
Modifiers:
-f, --file= File to accumulate counts over several runs.
@@ -197,6 +202,33 @@
  filename, ext = os.path.splitext(base)
  return filename
+# The following function is copied from the fileutil module from the  
pyutil
+# project:
+# http://pypi.python.org/pypi/pyutil
+# We use this function instead of os.makedirs() so that we don't get a
+# spurious exception when someone else creates the directory at the  
same
+# moment we do.  (For example, another thread or process that is  
also running
+# trace.)
+def make_dirs(dirname, mode=0777):
+"""
+A threadsafe and idempotent version of os.makedirs().  If the  
dir already
+exists, do nothing and return without raising an exception.  If  
this call
+creates the dir, return without raising an exception.  If there  
is an
+error that prevents creation or if the directory gets deleted after
+make_dirs() creates it and before make_dirs() checks that it  
exists, raise
+an exception.
+"""
+tx = None
+try:
+os.makedirs(dirname, mode)
+except OSError, x:
+tx = x
+
+if not os.path.isdir(dirname):
+if tx:
+raise tx
+raise exceptions.IOError, "unknown error prevented creation  
of directory, or deleted the directory immediately after creation: % 
s" % dirname # careful not to construct an IOError with a 2-tuple, as  
that has a special meaning...
+
class CoverageResults:
  def __init__(self, counts=None, calledfuncs=None, infile=None,
   callers=None, outfile=None):
@@ -290,15 +322,15 @@
  if filename.endswith((".pyc", ".pyo")):
  filename = filename[:-1]
-if coverdir is None:
+if coverdir is not None:
+dir = coverdir
+modulename = fullmodname(filename)
+else:
  dir = os.path.dirname(os.path.abspath(filename))
  modulename = modname(filename)
-else:
-dir = coverdir
-if not os.path.exists(dir):
-os.makedirs(dir)
-modulename = fullmodname(filename)
+make_dirs(dir)
+
  # If desired, get a list of the line numbers which  
represent
  # executable content (returned as a dict for better  
lookup speed)
  if show_missing:


Tracker <[EMAIL PROTECTED]>


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