[issue2418] Incorrect LaTeX generated (Python 2.6a1)

2008-03-19 Thread Vincent Manis

Changes by Vincent Manis [EMAIL PROTECTED]:


--
assignee: georg.brandl
components: Documentation tools (Sphinx)
nosy: georg.brandl, vmanis1
severity: normal
status: open
title: Incorrect LaTeX generated (Python 2.6a1)
type: behavior
versions: Python 2.6

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



[issue2290] [PATCH] Update Lib/distutils/sysconfig.py to handle x64 Windows builds living in pcbuild/amd64.

2008-03-19 Thread Trent Nelson

Trent Nelson [EMAIL PROTECTED] added the comment:

Fixed in r61606.

--
status: open - closed

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



[issue2418] Incorrect LaTeX generated (Python 2.6a1)

2008-03-19 Thread Vincent Manis

New submission from Vincent Manis [EMAIL PROTECTED]:

The LaTeX code generated by Sphinx in 2.6a1 is incorrect. Some, but not 
all, of the \end{Verbatim}'s come at the ends of lines, rather than on 
lines of their own. Here is an example, at line 435 of reference.tex.

return r# error: inconsistent 
dedent\end{Verbatim}

Each occurrence of this construction results in the `make all-pdf'  
failing. 

Also, at approximately line 42051 of library.tex, the environment classdescni 
is undefined.

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



[issue2297] Patch for fatal stack overflow in Windows caused by -v

2008-03-19 Thread Trent Nelson

Trent Nelson [EMAIL PROTECTED] added the comment:

Fixed in r61607, thanks for the report + patch.

--
resolution:  - accepted
status: open - closed

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



[issue2419] Remove all IRIX dependant modules from aifc module

2008-03-19 Thread Michael Bishop

New submission from Michael Bishop [EMAIL PROTECTED]:

Docs say that there are IRIX only modules which are dependant on the cl
module which has been removed from Py3K.

--
components: Library (Lib)
messages: 64045
nosy: MichaelBishop
severity: normal
status: open
title: Remove all IRIX dependant modules from aifc module
versions: Python 3.0

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



[issue2419] Remove all IRIX dependant modules from aifc module

2008-03-19 Thread Michael Bishop

Changes by Michael Bishop [EMAIL PROTECTED]:


--
nosy: +brett.cannon

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



[issue2375] PYTHON3PATH environment variable to supersede PYTHONPATH for multi-Python environments

2008-03-19 Thread Glyph Lefkowitz

Glyph Lefkowitz [EMAIL PROTECTED] added the comment:

I don't understand your objection.  It sounds like you're objecting, but
then suggesting an implementation?  The line you suggest might just as
easily be present in py3k's default site.py and it would work fine.

As I understand it, sites don't need this feature, developers do. 
Let's say I'm working on a typical system with stock python2 and python3
packages installed.  Maybe it's a multi-user system, I don't have
control over site.py.

Normally what I'd do to manipulate sys.path dynamically between
different versions would be to install a sitecustomize.py on my one
PYTHONPATH entry that detected the version and reacted appropriately. 
However, writing a program that is both valid python 2 and python 3 is,
as I understand it, both tricky and unsupported.

Will this specific case be supported so that developers don't need to
have root and modify the system python in order to do 2-3 migrations?

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



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-03-19 Thread Michael Hoffman

Michael Hoffman [EMAIL PROTECTED] added the comment:

That is up to you of course, and being able to ignore is better than
nothing. But creating a new account is not really an option for
everyone. On the system I would like to use this feature the most, I am
not a system administrator, so I cannot create new user accounts. I
maintain a directory for production use of people in my workgroup. I
also maintain my own for testing and development.

Thanks for your work on this patch. At least being able to use
--no-user-cfg will be very helpful.

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



[issue2418] Incorrect LaTeX generated (Python 2.6a1)

2008-03-19 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Thanks, fixed in r61617.

--
resolution:  - fixed
status: open - closed

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



[issue2418] Incorrect LaTeX generated (Python 2.6a1)

2008-03-19 Thread Vincent Manis

Vincent Manis [EMAIL PROTECTED] added the comment:

On 2008 Mar 19, at 01:00, Georg Brandl wrote:



 Georg Brandl [EMAIL PROTECTED] added the comment:

 Thanks, fixed in r61617.

Wow, that was fast :-) -- v

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



[issue2420] Faq 4.28 -- Trailing comas

2008-03-19 Thread Leszek Dubiel

New submission from Leszek Dubiel [EMAIL PROTECTED]:

This is after discussion on python-ideas: 

http://mail.python.org/pipermail/python-ideas/2008-March/001488.html



I would suggest to add question 4.28 to faq. Everybody who learns Python
reads that and will not ask questions about one-element tuples. I have
compiled answer from responses to my last question about one-element tuple.



Question: Why python allows to put comma at the end of list? This looks
ugly and seems to break common rules...

Answer: There are may reasons that follow.

1. If you defined multiline dictionary

   d = {  
   A: [1, 5],
   B: [6, 7],  # last trailing comma is optional but good style
   }

it would be easier to add more elements, because you don't have to care
about colons -- you always put colon at the end of line and don't have
to reedit other lines. It eases sorting of such lines too -- just cut
line and paste above.

2. Missing comma can lead to errors that are hard to diagnose. For example:

   x = [
 fee,
 fie
 foo,
 fum
   ]

contains tree elements fee, fiefoo and fum. So if programmer puts
comma always at the end of line he saves lots of trouble in a future.


2. Nearly all reasonable programming languages (C, C++, Java) allow for an
extra trailing comma in a comma-delimited list, for consistency and to
make programmatic code generation easier. So for example [1,2,3,] is
intentionally correct.


3. Creating one-element tuples using tuple(['hello']) syntax is much much
slower (a factor of 20x here) then writing just ('hello', ).  Trailing
commas
when you only have one item are how python tuple syntax is defined
allowing them to use commas instead of needing other tokens. If python
didn't allow comma at the end of tuple, you will have to use such slow
syntax.


4. The same rule applies to other type of lists, where delimiter can occur
at the end. For example both strings alfa\nbeta\n and alfa\nbeta contain
two lines.



Sources:

-- http://mail.python.org/pipermail/python-list/2003-October/231419.html
-- http://mail.python.org/pipermail/python-ideas/2008-March/001478.html
-- http://mail.python.org/pipermail/python-ideas/2008-March/001475.html

--
assignee: georg.brandl
components: Documentation
messages: 64050
nosy: dubiel, georg.brandl
severity: normal
status: open
title: Faq 4.28 -- Trailing comas

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



[issue2421] doc\make.bat fails for htmlhelp because of hardcoded filename

2008-03-19 Thread Tim Golden

New submission from Tim Golden [EMAIL PROTECTED]:

doc\make.bat, used to build the docs under Windows, retains the
hardcoded pydoc.hhp name when building htmlhelp. Now that the help files
are built as release.chm this file no longer exists and the build fails.

The attached patch to make.bat builds the htmlhelp from within a
temporary Python session which picks the correct filename up from conf.py.

--
assignee: georg.brandl
components: Documentation tools (Sphinx)
files: doc-make-r61620.patch
keywords: patch
messages: 64051
nosy: georg.brandl, tim.golden
severity: normal
status: open
title: doc\make.bat fails for htmlhelp because of hardcoded filename
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file9764/doc-make-r61620.patch

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



[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Duncan Booth

Changes by Duncan Booth [EMAIL PROTECTED]:


--
nosy: +duncanb

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



[issue2422] Automatically disable pymalloc when running under valgrind

2008-03-19 Thread James Henstridge

New submission from James Henstridge [EMAIL PROTECTED]:

When I want to use valgrind to check for leaks in a Python program (or
test suite), I generally want pymalloc disabled.  When not running
valgrind I generally want it enabled.

Attached is a patch that automatically bypasses the pymalloc code when
running under valgrind but leaves it enabled overwise.

It is controlled by a WITH_VALGRIND #define, but I haven't updated the
configure script to allow turning it on.  I also haven't done much in
the way of profiling to see what the overhead is when not running under
valgrind.

--
components: Interpreter Core
files: disable-pymalloc-on-valgrind.patch
keywords: patch
messages: 64052
nosy: jamesh
severity: normal
status: open
title: Automatically disable pymalloc when running under valgrind
type: feature request
versions: Python 2.5
Added file: http://bugs.python.org/file9765/disable-pymalloc-on-valgrind.patch

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



[issue2403] Add figleaf coverage metrics

2008-03-19 Thread Skip Montanaro

Skip Montanaro [EMAIL PROTECTED] added the comment:

I gave this a try.  It seems to not report on many files.  For example,
test_csv was run and passed, but there is no html file in the coverage
directory with csv in its name after figleaf2html is run.  Nor is there a
key in the pickled dictionary in the .figleaf file which includes the string
csv.

Skip

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



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-03-19 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

We thought that the added value for specifying another configuration 
file is relatively minor: if you have to set command line options 
anyway, just put anything you want to specify on the command line, 
rather than into the other configuration file.

Out of curiosity: what kinds of settings do you put into the 
configuration file?

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



[issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size)

2008-03-19 Thread Giampaolo Rodola'

Giampaolo Rodola' [EMAIL PROTECTED] added the comment:

As discussed on python-dev patch #1736190 should be committed before
doing anything against asyncore or asynchat.

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



[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2008-03-19 Thread Chris Morgan

Changes by Chris Morgan [EMAIL PROTECTED]:


--
nosy: +mihalis68

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



[issue2375] PYTHON3PATH environment variable to supersede PYTHONPATH for multi-Python environments

2008-03-19 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

 I don't understand your objection.
 It sounds like you're objecting, but
 then suggesting an implementation?

This sounds like a kludge addressing a transient
problem.  It also feels like a solution catering
to developers at the expense of user confusion:

1. Why is there PYTHON3PATH, but not PYTHON2PATH?
2. Is PYTHONPATH effectively PYTHON2PATH or PYTHON1PATH?
3. Will PYTHON3PATH be supported forever or deprecated once 2.8 and 3.2 
are close enough to support a large common code base?

There are many ways to address multi-python site issues. PYTHONPATH is 
too indiscriminate for some uses.  When more fine-grained 
differentiation between 3.x and 2.x files is needed, a better approach 
would be a custom loader in metapath that can look for version specific 
file extensions.

I would suggest to wait until there are enough reports from the field on 
different solutions in actual use before selecting one to standardize 
on.

[I have to mention that perl 5 uses PERL5PATH, but I am not sure whether 
it is an argument for or against PYTHON3PATH.  Can anyone report on pros 
and cons of PERL5PATH from actual experience?]

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



[issue2423] test_smtplib.py no longer butt slow

2008-03-19 Thread Jerry Seutter

New submission from Jerry Seutter [EMAIL PROTECTED]:

Changes only affect test files.

test_smtplib.py before: 39.7s
test_smtplib.py after: 0.8s

socket.getfqdn() calls were causing all the slowness.  Added a
mock_socket.py file to handle some tests.  For other tests that tested
both server side and client side of the smtp libraries, mocked out
socket.getfqdn() only.

--
components: Tests
files: test_smtplib_speedup.patch
keywords: patch, patch
messages: 64058
nosy: jseutter
priority: low
severity: normal
status: open
title: test_smtplib.py no longer butt slow
type: performance
versions: Python 2.6
Added file: http://bugs.python.org/file9766/test_smtplib_speedup.patch

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



[issue2423] test_smtplib.py no longer butt slow

2008-03-19 Thread Jerry Seutter

Changes by Jerry Seutter [EMAIL PROTECTED]:


Added file: http://bugs.python.org/file9767/mock_socket.py

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



[issue2078] CSV Sniffer does not function properly on single column .csv files

2008-03-19 Thread Wolfgang Langner

Wolfgang Langner [EMAIL PROTECTED] added the comment:

In this cases it is not really possible to sniff the right delimiter.
To not allow digits or letters is not a good solution.
I think the behavior as now is ok, and at this time I see now way to
improve it.

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



[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

I agree this is a bug.  Here is a related problem:

 1 is divmod(1,1)[0]
False

--
nosy: +belopolsky

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



[issue2415] bytes() should respect __bytes__

2008-03-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I took a quick glance at this. It hinges on how the C-API is going to
look. Currently, bytes is known in C as PyString and gets it's
representation from __str__. Although we could just change it to
__bytes__, Christian has said that he is going to rename it to PyBytes
(and what is now PyBytes - PyByteArray). [1] Further muddying the
waters is the fact that PyObject_Str generates the unicode
representation of an object and should really be called PyObject_Unicode.

[1] http://mail.python.org/pipermail/python-3000/2008-March/012477.html

--
nosy: +benjamin.peterson, tiran

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



[issue2078] CSV Sniffer does not function properly on single column .csv files

2008-03-19 Thread Skip Montanaro

Skip Montanaro [EMAIL PROTECTED] added the comment:

Wolfgang In this cases it is not really possible to sniff the right
Wolfgang delimiter.  To not allow digits or letters is not a good
Wolfgang solution.  I think the behavior as now is ok, and at this time
Wolfgang I see now way to improve it.

I mostly agree.  I'm waiting for the original submitter to chime in though.

Skip

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



[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

 int('1') is 1
False
 1 is int('0b1', 2)
False
 1 is 0b1  4
False

there are probably more ...

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



[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Facundo Batista

Facundo Batista [EMAIL PROTECTED] added the comment:

I really don't understand *why* it's a bug.

Is anywhere in the Language Reference that says that 1 should be the
same object that another 1?

Or do you mean that they *should* be the same object for speed and/or
memory reasons? In this case... is this a bug? Or a request for
improvement or something?

--
nosy: +facundobatista

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



[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Adam Olsen

Adam Olsen [EMAIL PROTECTED] added the comment:

The original bug is not whether or not python reuses int objects, but
rather that an existing optimization disappears under certain
circumstances.  Something is breaking our optimization.

The later cases where the optimization is simply gone in 3.0a3 are more
difficult.  We don't *have* to keep them.. but we probably want them. 
The small int reuse happens for a reason.

--
nosy: +Rhamphoryncus

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



[issue2414] Fix implicit relative imports

2008-03-19 Thread David Wolever

David Wolever [EMAIL PROTECTED] added the comment:

Added in r61626.

--
status: open - closed

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



[issue2412] Check 2to3 for support of print function.

2008-03-19 Thread David Wolever

Changes by David Wolever [EMAIL PROTECTED]:


--
assignee: collinwinter - David Wolever
nosy: +David Wolever

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



[issue2411] test_nis.py fails if NIS is not configured or used

2008-03-19 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

Applied in revision 61627.

--
resolution:  - accepted
status: open - closed

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



[issue2424] Logging module hides user code errors (bare except)

2008-03-19 Thread Brad Allen

New submission from Brad Allen [EMAIL PROTECTED]:

The logging module contains several bare except statements. It's
understandable that the logging module should be completely silent, but
in the case of logging.config, the bare except can make it very
difficult to identify when there is a problem with a customer handler or
even with configuration.

These are the offending lines (lines 133-134): 

except: #if an error occurs when instantiating a handler, too bad
pass#this could happen e.g. because of lack of privileges

Maybe this should only catch OSError, so that other problems will
generate a failure at this point and show the correct traceback. My
experience is that there is usually a failure anyway when there is a
configuration problem, but the error is usually misleading.

By the way, exceptions generated here seem to mainly occur when a Python
script is first starting up, as it involves the initial configuration. I
am not convinced that the logging module should be silent at that stage.

--
components: Library (Lib)
messages: 64069
nosy: bradallen
severity: normal
status: open
title: Logging module hides user code errors (bare except)
type: behavior
versions: Python 2.4

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



[issue2424] Logging module hides user code errors (bare except)

2008-03-19 Thread Brad Allen

Brad Allen [EMAIL PROTECTED] added the comment:

in the previous post, please replace the word 'customer' with the word
'user'

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



[issue2346] Py3K warn against using __members__

2008-03-19 Thread Jack Diederich

Jack Diederich [EMAIL PROTECTED] added the comment:

This patch raises a py3k warning from inside the dir() machinery so it
will only warn when dir() is called on an object with an old style
__members__ or __methods__ attribute.  It does not warn if there is an
old style __members__ attribute that is not used.

--
assignee:  - jackdied
keywords: +patch
nosy: +jackdied
Added file: http://bugs.python.org/file9768/methods_members.patch

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



[issue2354] cmp argument to list.sort()/sorted() should raise a Py3K warning

2008-03-19 Thread Jeff Balogh

Jeff Balogh [EMAIL PROTECTED] added the comment:

Fixing the compare to raise the warning when cmp != NULL, and adding a 
test

--
keywords: +patch
nosy: +jeff.balogh
Added file: http://bugs.python.org/file9769/sort-cmp.diff

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



[issue2425] test_py3kwarn doesn't use sys.py3kwarning

2008-03-19 Thread Jeff Balogh

New submission from Jeff Balogh [EMAIL PROTECTED]:

This patch fixes the TODO in test_py3kwarn

--
components: Tests
files: py3kwarn-refactor.diff
keywords: patch
messages: 64073
nosy: brett.cannon, jeff.balogh
severity: normal
status: open
title: test_py3kwarn doesn't use sys.py3kwarning
versions: Python 2.6
Added file: http://bugs.python.org/file9770/py3kwarn-refactor.diff

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



[issue2426] pysqlite provides no interface for database SQL dump

2008-03-19 Thread Paul Kippes

New submission from Paul Kippes [EMAIL PROTECTED]:

Without the command line interface to sqlite3, there is no easy method
of extracting a database into an SQL dump file.  This creates a problem
should a user want to create an in-memory database (which is useful for
a performance boost) and then save the data for later use.  It also
would be useful should the sqlite3 command not be installed.

The attached patch implements this feature as a method of the Connection
class.

--
components: Extension Modules, Library (Lib)
files: sqlite_dump_addition.r61630.patch
keywords: patch
messages: 64074
nosy: kippesp
severity: normal
status: open
title: pysqlite provides no interface for database SQL dump
type: feature request
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file9771/sqlite_dump_addition.r61630.patch

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



[issue2349] Py3K warn against assigning to True/False

2008-03-19 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

Actually, the patch is incomplete. You can still do assignment through
things such as ``def True(): pass``. If you go through ast.c and find
the various places None is protected (search for \None\ and note the
places where an ast_error() call is made) you should put the warnings there.

--
resolution: accepted - 

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



[issue2425] test_py3kwarn doesn't use sys.py3kwarning

2008-03-19 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

Fixed in revision 61631.

--
resolution:  - fixed
status: open - closed

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



[issue2348] Py3K warn using file.softspace

2008-03-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I have a few comments:
1) Please use PyErr_WarnEx.
2) Please add tests to Lib/test/test_py3kwarn.py

--
nosy: +benjamin.peterson

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



[issue2354] cmp argument to list.sort()/sorted() should raise a Py3K warning

2008-03-19 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

Doh!

Fixed in r61632

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



[issue2090] __import__ with fromlist=[''] causes double initialization of modules

2008-03-19 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

As you said, it's a hack, so supporting an abuse of the API is not
reasonable. You don't have to set the fromlist for the import to work.
And if you are doing it to get the tail module, you can write some
simple code to use getattr() to walk down from the root module to the
one you want.

And I plan to add a much simpler API to the imp module for people to use
directly so that these abuses don't continue.

--
resolution:  - invalid
status: open - closed

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



[issue2421] doc\make.bat fails for htmlhelp because of hardcoded filename

2008-03-19 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


--
assignee: georg.brandl - tiran
nosy: +tiran

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



[issue2090] __import__ with fromlist=[''] causes double initialization of modules

2008-03-19 Thread hauser

hauser [EMAIL PROTECTED] added the comment:

There are quite a few projects that use this solution:
http://google.com/codesearch?hl=enlr=q=__import__.*%5C%5B%27%27%5C%5D
. I would change it even if it is a hack, but I understand your point.

--
versions: +Python 2.5

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



[issue2349] Py3K warn against assigning to True/False

2008-03-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Wow! I never realized how many ways you could possibly assign to
something. I found all the None assignments and put the True/False ones
under it.

Added file: http://bugs.python.org/file9772/bool_assign3.patch

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



[issue2426] pysqlite provides no interface for database SQL dump

2008-03-19 Thread Gregory P. Smith

Changes by Gregory P. Smith [EMAIL PROTECTED]:


--
assignee:  - gregory.p.smith
nosy: +gregory.p.smith

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



[issue2357] sys.exc_{type, values, traceback} should raise a Py3K warning

2008-03-19 Thread Jack Diederich

Jack Diederich [EMAIL PROTECTED] added the comment:

Fixer patch works for me (both must be applied).

A 3k warning for accessing is harder - it would have to copy the module
type or dict type and supply a custom to_getattro that watches for
accesses to exc_(type|values|traceback).  I'll look into it.

--
nosy: +jackdied

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



[issue2349] Py3K warn against assigning to True/False

2008-03-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I just added on a test.

Added file: http://bugs.python.org/file9773/bool_assign4.patch

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



[issue1152248] Enhance file.readlines by making line separator selectable

2008-03-19 Thread Facundo Batista

Facundo Batista [EMAIL PROTECTED] added the comment:

I took a look at it...

It's not as not-complicated as I original thought. 

The way would be to adapt the Py_UniversalNewlineFread() function to
*not* process the normal separators (like \n or \r), but the passed one.

A critical point would be to handle more-than-1-byte characters... I
concur with Nick that this would better suited for Py3k.

So, I'm stepping down from this, and flagging it for that version.

--
assignee: facundobatista - 
versions: +Python 3.0

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



[issue2358] Using sys.exc_clear should raise a Py3K warning

2008-03-19 Thread Jeff Balogh

Changes by Jeff Balogh [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file9707/issue2358.diff

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



[issue2412] Check 2to3 for support of print function.

2008-03-19 Thread David Wolever

David Wolever [EMAIL PROTECTED] added the comment:

I've updated the fixer (checkin to come shortly), but 2to3 gets upset when 
you it comes across print statements with kwargs (eg: print(spam, end= 
)), so the tests will be commented out 'till this is fixed.

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



[issue2349] Py3K warn against assigning to True/False

2008-03-19 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

FWIW, I don't think it's important to catch every possible assignment. 
Add warnings for the common cases and declare victory.

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



[issue2412] Check 2to3 for support of print function.

2008-03-19 Thread David Wolever

David Wolever [EMAIL PROTECTED] added the comment:

As of r61635, the fix_print fixer has been fixed and tests have been added 
(which will ``assert False`` when 2to3 is fixed so it can handle 
``print(**kwargs)``).

--
assignee: David Wolever - collinwinter

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



[issue2054] add ftp-tls support to ftplib - RFC 4217

2008-03-19 Thread Giampaolo Rodola'

Giampaolo Rodola' [EMAIL PROTECTED] added the comment:

 This is a straightforward implementation of client-side use of SSL,
 but it's missing a test case for evaluation.  It should include a 
 patch to test_ftplib to test it.

I'm not sure how it could be tested, since we don't have an FTPS server
to test against. The current test suite itself only tests the new
timeout feature added in ftplib.FTP class in Python 2.6 and nothing else.

 Another thing to look at is what the useful arguments are to pass in
 for TLS usage over FTP.  If, for example, the client needs to validate
 the server's certificate or identity, provision should be made for a 
 file of cacerts to be passed to the FTP_TLS instance.  Passing in a 
 keyfile and certfile is usually only necessary when the client uses 
 them to identify itself to the server.

I drew from the SSL classes defined in httplib, imaplib, poplib, smtplib
and urllib modules which accept a keyfile and a certfile in the class
constructor so I thought it was the right way. Is there a reason why
the FTP protocol should behave differently as you have described?

 In FTP_TLS.__init__ you call FTP.__init__. The latter in turn calls
 FTP.login if a username is supplied. Thus you end up trying to login
 before issuing the AUTH TLS command. The result is, that username and
 passwords are send unencrypted. Or do I miss a subtle trick here? 

You're right, I avoided doing that since the TLS encryption should be
requested specifically by the user. We could implicitly secure the
control connection if the user argument is provided when invoking the
class constructor and eventually add a secure kwarg to login method
that defaults to True.

 The lib should give programmer choice wether to send login through TLS
 or not. (as it is described in RFC 4217).

This is what it does if you use auth_tls() before login().

 Also, there should be an optional parameter to specify port for ftp
 connection.

This is already possible by using the original (inherited) connect() method.

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



[issue2348] Py3K warn using file.softspace

2008-03-19 Thread Jeff Balogh

Changes by Jeff Balogh [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file9717/issue2348.diff

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



[issue2349] Py3K warn against assigning to True/False

2008-03-19 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Do you think we should remove some?

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



[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Terry J. Reedy

Terry J. Reedy [EMAIL PROTECTED] added the comment:

I agree that this is not a bug in the strict sense.  I could have
selected Type: resource usage (for memory increase).  But the change of
behavior is also visible.  I suspect the change is not intentional both
because of the pattern and because of recent discussion on PyDev that
small int caching should be kept.

If the precise change is intentional, this should be documented (here)
to answer further questions on c.l.p.

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



[issue2348] Py3K warn using file.softspace

2008-03-19 Thread Jeff Balogh

Jeff Balogh [EMAIL PROTECTED] added the comment:

Here's a new patch that uses PyErr_WarnEx, has a test, and even updates 
Misc/NEWS.

Added file: http://bugs.python.org/file9774/issue2348.diff

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



[issue2427] 2to3 should translate itertools.imap into generator expression, not list comprehension

2008-03-19 Thread Bruce Frederiksen

New submission from Bruce Frederiksen [EMAIL PROTECTED]:

2to3, svn rev 61623 translates itertools.imap(lambda x: ..., ...) into a
list comprehension.  This should be translated instead into a generator
expression so that doing itertools.imap on infinite iterators still works.

--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
messages: 64092
nosy: collinwinter, dangyogi
severity: normal
status: open
title: 2to3 should translate itertools.imap into generator expression, not list 
comprehension
type: behavior
versions: Python 2.6

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



[issue2054] add ftp-tls support to ftplib - RFC 4217

2008-03-19 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

As you point out, the other classes should be fixed.  The old client-side
protocol was never very well thought out, IMHO.  Continuing to propagate it
would be a mistake.
Bill

On Wed, Mar 19, 2008 at 12:22 PM, Giampaolo Rodola' [EMAIL PROTECTED]
wrote:


 Giampaolo Rodola' [EMAIL PROTECTED] added the comment:
  Another thing to look at is what the useful arguments are to pass in
  for TLS usage over FTP.  If, for example, the client needs to validate
  the server's certificate or identity, provision should be made for a
  file of cacerts to be passed to the FTP_TLS instance.  Passing in a
  keyfile and certfile is usually only necessary when the client uses
  them to identify itself to the server.

 I drew from the SSL classes defined in httplib, imaplib, poplib, smtplib
 and urllib modules which accept a keyfile and a certfile in the class
 constructor so I thought it was the right way. Is there a reason why
 the FTP protocol should behave differently as you have described?


Added file: http://bugs.python.org/file9775/unnamed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2054
__As you point out, the other classes should be fixed. nbsp;The old client-side 
protocol was never very well thought out, IMHO. nbsp;Continuing to propagate 
it would be a mistake.divbr/divdivBillbrbrdiv class=gmail_quote
On Wed, Mar 19, 2008 at 12:22 PM, Giampaolo Rodola#39; lt;a 
href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/agt; wrote:brblockquote 
class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc 
solid;padding-left:1ex;
br
Giampaolo Rodola#39; lt;a href=mailto:[EMAIL PROTECTED][EMAIL 
PROTECTED]/agt; added the comment:br
div class=Ih2E3dgt; Another thing to look at is what the useful arguments 
are to pass inbr/divdiv class=Ih2E3d
gt; for TLS usage over FTP. nbsp;If, for example, the client needs to 
validatebr
gt; the server#39;s certificate or identity, provision should be made for 
abr
gt; file of cacerts to be passed to the FTP_TLS instance. nbsp;Passing in 
abr
gt; keyfile and certfile is usually only necessary when the client usesbr
gt; them to identify itself to the server.br
br
/divI drew from the SSL classes defined in httplib, imaplib, poplib, 
smtplibbr
and urllib modules which accept a keyfile and a certfile in the classbr
constructor so I thought it was the quot;right wayquot;. Is there a reason 
whybr
the FTP protocol should behave differently as you have 
described?br/blockquote/divbr/div
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2427] 2to3 should translate itertools.imap into generator expression, not list comprehension

2008-03-19 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

Why isn't itertools.imap() being translated directly to builtins.map()?

--
nosy: +rhettinger

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



[issue2375] PYTHON3PATH environment variable to supersede PYTHONPATH for multi-Python environments

2008-03-19 Thread Glyph Lefkowitz

Glyph Lefkowitz [EMAIL PROTECTED] added the comment:

The idea is that PYTHON3PATH will be honored in preference to
PYTHONPATH, but PYTHONPATH will still be honored.  It's exposed only to
people who specifically need it.

However, I think it's misleading to call the Python 3 transition a
transient problem.  If we're lucky, it's going to be a decade of slow
progress.  If we're not, it will never end.  Try, for example, compiling
your system C library without gets, and see what happens.  (And that's
been an issue for more than 10 years!)

The biggest way to shorten this problem is to provide tools and idioms
for developers to use when porting.  Specifically like this feature.

As far as version specific file extensions - I'd be very happy with
that but Guido has said several times that he doesn't like it.  Feel
free to discuss that with him, but this change is far less invasive. 
Users who don't need it will simply never know about it.

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



[issue2354] cmp argument to list.sort()/sorted() should raise a Py3K warning

2008-03-19 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

Collin, is there some place where I should write-up how to transition
sort cmp functions?

Often, it is straight-forward to write a simpler key function, but
sometimes it isn't obvious how to proceed (i.e. cases that have an
ascending primary key and descentding secondary key or cases where a
user supplied cmp function is an unchangable, exposed part of the API).

I would like to issue some guidance on the subject.

--
assignee: rhettinger - collinwinter
nosy: +collinwinter
status: closed - open

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



[issue2054] add ftp-tls support to ftplib - RFC 4217

2008-03-19 Thread Giampaolo Rodola'

Giampaolo Rodola' [EMAIL PROTECTED] added the comment:

 As you point out, the other classes should be fixed.  The old 
 client-side protocol was never very well thought out, IMHO.  
 Continuing to propagate it would be a mistake.

Ok, how do you think it would have be modified?
Could you provide an example or a new patch?

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



[issue2102] New style vs. old style classes __ror__() operator overloading

2008-03-19 Thread Sean Reifschneider

Changes by Sean Reifschneider [EMAIL PROTECTED]:


--
assignee:  - fdrake
components: +Documentation -Interpreter Core
nosy: +fdrake
priority:  - normal

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



[issue2428] 2to3 deletes # comments before from __future__ import with_statement

2008-03-19 Thread Bruce Frederiksen

New submission from Bruce Frederiksen [EMAIL PROTECTED]:

2to3, svn rev 61623.  To reproduce this error:

$ cat !  foobar.py
# line 1
# line 2

from __future__ import with_statement
import sys
!
$ 2to3 -w foobar.py
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: ws_comma
--- foobar.py (original)
+++ foobar.py (refactored)
@@ -1,5 +1,2 @@
-# line 1
-# line 2
 
-from __future__ import with_statement
 import sys
RefactoringTool: Files that were modified:
RefactoringTool: foobar.py
$ cat foobar.py

import sys
$

--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
messages: 64098
nosy: collinwinter, dangyogi
severity: normal
status: open
title: 2to3 deletes # comments before from __future__ import with_statement
type: behavior
versions: Python 2.6

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



[issue1641] asyncore delayed calls feature

2008-03-19 Thread Sean Reifschneider

Sean Reifschneider [EMAIL PROTECTED] added the comment:

Giampaolo: Can you pleaes bring this up on python-dev or the normal
python mailing list for further discussion on the issue?

--
assignee:  - akuchling
keywords: +patch
nosy: +akuchling, jafo
priority:  - normal
type:  - feature request

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



[issue2349] Py3K warn against assigning to True/False

2008-03-19 Thread Brett Cannon

Changes by Brett Cannon [EMAIL PROTECTED]:


--
assignee: brett.cannon - rhettinger

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



[issue2113] Bad interaction between signal and subprocess

2008-03-19 Thread Sean Reifschneider

Sean Reifschneider [EMAIL PROTECTED] added the comment:

Daniele: Please provide an updated version of this patch based on the
feedback below.

--
assignee:  - gregory.p.smith
keywords: +patch
nosy: +gregory.p.smith, jafo
priority:  - normal
type: crash - behavior

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



[issue2116] weakref copy module interaction

2008-03-19 Thread Sean Reifschneider

Sean Reifschneider [EMAIL PROTECTED] added the comment:

Rick: In the future, please provide a context or unified diff (diff
-c) so that we get the file name that the diff is for and some
additional context.

--
assignee:  - tim_one
keywords: +patch
nosy: +jafo, tim_one
priority:  - normal
type: crash - behavior

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



[issue1053369] ftplib: add support for MDTM command

2008-03-19 Thread Giampaolo Rodola'

Giampaolo Rodola' [EMAIL PROTECTED] added the comment:

IMHO aside from the plus of providing a workaround for a broken FTP
server response I don't think this is really necessary since the same
thing can be done by just using sendcmd('mdtm filename').

--
nosy: +giampaolo.rodola

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



[issue2125] Read support for Records in msilib

2008-03-19 Thread Sean Reifschneider

Changes by Sean Reifschneider [EMAIL PROTECTED]:


--
assignee:  - loewis
keywords: +patch
nosy: +loewis
priority:  - normal
title: [patch] Read support for Records in msilib - Read support for Records 
in msilib

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



[issue1248] ftplib needs a rewrite to use bytes/buffers

2008-03-19 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' [EMAIL PROTECTED]:


--
nosy: +giampaolo.rodola

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



[issue1641] asyncore delayed calls feature

2008-03-19 Thread Giampaolo Rodola'

Giampaolo Rodola' [EMAIL PROTECTED] added the comment:

Sean, I already tried to raise two discussion attempts on both lists here:
http://groups.google.com/group/python-dev2/browse_thread/thread/ecbf4d38a868d4f/ec5c7dbd40664b7f?lnk=gstq=asyncore+giampaolo
...and here:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/603d6c05aa6965c0/af451aedadb75832?lnk=gstq=delayed+call#af451aedadb75832
...but no one seems to be interested at this feature.

Moreover, before doing anything against asyncore and asynhat there are a
lot of long-time pending patches which should be committed first; see here:
http://groups.google.com/group/python-dev2/browse_thread/thread/eec1ddadefe09fd8/a38270231620870e?lnk=gstq=asyncore

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



[issue1390] toxml generates output that is not well formed

2008-03-19 Thread Sean Reifschneider

Sean Reifschneider [EMAIL PROTECTED] added the comment:

Martin: What do you think of this patch?

--
assignee:  - loewis
nosy: +jafo
priority:  - normal

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



[issue2413] os.strerror does not check for out of range argument

2008-03-19 Thread Ralf Schmitt

Ralf Schmitt [EMAIL PROTECTED] added the comment:

my manpage (debian testing) states:

POSIX.1-2001  permits strerror() to set errno if the call encounters an
error, but does not specify what value should be returned as the  func‐
tion  result  in  the  event  of an error.  On some systems, strerror()
returns NULL if the error number is unknown.  On  other  systems,  str‐
error()  returns  a string something like Error nnn occurred and sets
errno to EINVAL if the error number is unknown.

So, I think this patch should be rejected.

--
nosy: +schmir

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



[issue1390] toxml generates output that is not well formed

2008-03-19 Thread Thomas Conway

Thomas Conway [EMAIL PROTECTED] added the comment:

On Thu, Mar 20, 2008 at 8:26 AM, Sean Reifschneider
[EMAIL PROTECTED] wrote:

  Sean Reifschneider [EMAIL PROTECTED] added the comment:

  Martin: What do you think of this patch?

Looks fine.

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



[issue1943] improved allocation of PyUnicode objects

2008-03-19 Thread Sean Reifschneider

Sean Reifschneider [EMAIL PROTECTED] added the comment:

Marc-Andre: Wit the udpated patches, is this a set of patches we can accept?

--
assignee:  - lemburg
keywords: +patch
nosy: +jafo
priority:  - normal

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



[issue1813] Codec lookup failing under turkish locale

2008-03-19 Thread Sean Reifschneider

Sean Reifschneider [EMAIL PROTECTED] added the comment:

Marc-Andre: How should we proceed with this bug?  Discuss on python-dev
or c.l.python?

--
assignee:  - lemburg
keywords: +patch
nosy: +jafo
priority:  - normal

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



[issue2354] cmp argument to list.sort()/sorted() should raise a Py3K warning

2008-03-19 Thread Collin Winter

Collin Winter [EMAIL PROTECTED] added the comment:

There's currently no central repository that I know of. We should have
an informational PEP on the subject; would you like to start one with
sort/sorted keys as the seed? I've got some notes I can contribute, and
I'd like to milk Guido for his experience with str/bytes porting.

--
assignee: collinwinter - rhettinger

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



[issue1576598] ftplib doesn't follow standard

2008-03-19 Thread Giampaolo Rodola'

Giampaolo Rodola' [EMAIL PROTECTED] added the comment:

I think the problem you described is up to the FTP server implementation
which does not have unicode support.
The telnet protocol is used in FTP only when dealing with ABOR and STAT
commands. It has nothing to do with pathnames.

--
nosy: +giampaolo.rodola

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



[issue751758] ftplib.retrbinary fails when called from retrlines callback

2008-03-19 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' [EMAIL PROTECTED]:


--
nosy: +giampaolo.rodola


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

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



[issue1943] improved allocation of PyUnicode objects

2008-03-19 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Thanks for your interest Sean :)
By the way, on python-3000 both GvR and Martin von Löwis were ok on the
proposed design change, although they did not review the patch itself.
http://mail.python.org/pipermail/python-3000/2008-February/012076.html

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



[issue2413] os.strerror does not check for out of range argument

2008-03-19 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

And on some system Unknown error: nnn is returned with no error indication.

Your concern that the patch is invalid on some unidentified system.
This concern
can easily be addressed by checking for NULL return *in addition* to
the errno check.

The real question is whether it is desirable  to raise ValueError from
strerror() when
error code is out of bound.  I would say the existing code intends to
do exactly that,
but th error check is incorrect on at least one popular platform. I
believe it is better
to raise an error because as a user, seeing unknown error has
occurred message,
is one of the worst experiences.

On the other hand, if the consensus is that  strerror() should always
(short of out of
memory condition) return a string, then (assuming null return is a
possibility) the code
needs to be changed to return Unknown error: nnn  instead of raising an error.

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



[issue2427] 2to3 should translate itertools.imap into generator expression, not list comprehension

2008-03-19 Thread David Wolever

David Wolever [EMAIL PROTECTED] added the comment:

itertools.imap is being translated directly to map... But I bet this is 
another one of those ordering problems -- itertools.imap is converted to 
the map, then the map is converted to list(map(...)) because fix_map 
doesn't know that map was already fixed.

--
assignee: collinwinter - David Wolever
nosy: +David Wolever

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



[issue2428] 2to3 deletes # comments before from __future__ import with_statement

2008-03-19 Thread David Wolever

Changes by David Wolever [EMAIL PROTECTED]:


--
assignee: collinwinter - David Wolever
nosy: +David Wolever

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



[issue2132] Blocking sockets take entirely too long to timeout

2008-03-19 Thread Sean Reifschneider

Sean Reifschneider [EMAIL PROTECTED] added the comment:

smtplib is for sending messages via SMTP, not for testing to see if a
user is behind an ISP that is incorrectly blocking outgoing SMTP
connections.  I would argue the incorrectly because they are dropping
rather than rejecting the connection packets.

One mechanism would be to use an alarm(30) call which would limit the
whole transaction to 30 seconds (connection, EHLO, RCPT, QUIT), not just
the connection.  My experience with dealing with remote machines in a
time-sensitive manner is that this approach is much more usable than
using socket timeouts.

A better mechanism is probably to use non-blocking socket I/O directly
and make connections to all or many of the remote servers and test them
in parallel, meaning all servers could be tested in 30 seconds (or
whatever your timeout is) rather than 5 minutes (you imply in your
message that you may be doing more than a dozen requests).

So, I believe the current functionality in the smtplib of being simple
and conservative at trying to get messages through, rather than trying
to be optimized for checking for account existance, is reasonable.  And
that in any case, using alarm() is a better solution than socket timeouts.

--
nosy: +jafo
priority:  - normal
resolution:  - wont fix
status: open - closed

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



[issue1641] asyncore delayed calls feature

2008-03-19 Thread Daniel Arbuckle

Daniel Arbuckle [EMAIL PROTECTED] added the comment:

Unfortunately, it appears that asyncore and asynchat are caught in a
deadlock, in which it is demanded that certain patches be applied before
any further work is done, but nobody (even among those making the
demands) is both willing and able to review and apply those patches.

We need this situation to be resolved, preferably by somebody with
commit access doing the necessary work, but failing that by allowing new
patches and requiring the old ones to be updated at whatever time
somebody decides to actually address them.

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



[issue2366] Fixer for new metaclass syntax is needed

2008-03-19 Thread Collin Winter

Collin Winter [EMAIL PROTECTED] added the comment:

A quick test indicates that the old way doesn't work anymore.

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



[issue2407] warnings.filterwarnings() not isolated between tests

2008-03-19 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

Fixed in revision 61651.

--
nosy: +brett.cannon
resolution:  - accepted
status: open - closed

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



[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

Attached patch fixes the cases discovered so far.  It is possible that 
in some of these cases creation of the long object that is later 
discarded can be avoided by detecting small int return early, but such 
optimizations should probably be left for later.

Any advise on how to write a unit test?  Should the unit test detect 
python compiled with NSMALLNEGINTS + NSMALLPOSINTS == 0 and disable 
identity checks?

--
keywords: +patch
Added file: http://bugs.python.org/file9776/issue2417.diff

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



[issue2381] test_subprocess fails if your sys.executable is on a path with a space in it

2008-03-19 Thread Jeff Balogh

Jeff Balogh [EMAIL PROTECTED] added the comment:

The patch works for me, and doesn't change anything except the test 
strings.

Not having spaces in your path also helps. ;)

--
nosy: +jeff.balogh

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



[issue2429] Patch for test_urllib2_net moving tests to use a local server

2008-03-19 Thread Michael Foord

New submission from Michael Foord [EMAIL PROTECTED]:

This patch moves some tests from test_urllib2_net to
test_urllib2_localnet. The moved tests now use a local server rather
than going out to external servers.

Mainly the work of Jerry Seutter - so blame him. ;-)

--
components: Tests
files: network_tests.patch
keywords: patch
messages: 64121
nosy: fuzzyman
severity: normal
status: open
title: Patch for test_urllib2_net moving tests to use a local server
versions: Python 2.6
Added file: http://bugs.python.org/file9777/network_tests.patch

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



[issue2417] [py3k] Integer floor division (//): small int check omitted

2008-03-19 Thread Adam Olsen

Adam Olsen [EMAIL PROTECTED] added the comment:

Unless someone has a legitimate use case for disabling small_int that
doesn't involve debugging (which I really doubt), I'd just assume it's
always in use.

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



[issue2413] os.strerror does not check for out of range argument

2008-03-19 Thread Terry J. Reedy

Changes by Terry J. Reedy [EMAIL PROTECTED]:


--
nosy:  -tjreedy

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



[issue1471] ioctl request argument broken on 64-bit OpenBSD or OS X

2008-03-19 Thread Gregory P. Smith

Gregory P. Smith [EMAIL PROTECTED] added the comment:

I am unable to reproduce this problem at all on Mac OS X 10.4 or 10.5
with 32-bit or 64-bit python trunk builds.

I have however checked in a fix that'll prevent negative code values
passed in from being sign extended to 64-bits when converted to an
unsigned long on platforms that use those.

A unittest for fcntl.ioctl behavior when passed both positive and
negative values is included.

trunk r61652

while the Linux man page describe's ioctl's code parameter as an int,
the sys/ioctl.h file on linux has it as an unsigned long int in the
function prototype.  So its quite possible it is actually an unsigned
long on all platforms and we should change unsigned int code to unsigned
long code and the 'I' to a 'k'.

However if that is done we -might- have a sign extension problem again
if anyone is passing a negative value in and expecting it to act like a
32-bit value.   If the OS kernels only look at the lower 32-bits of the
ioctl code during the syscall it'd work, but if it tested the 64bit
value -123 64bit != -123 32bit.  The better answer to that would be to
just reject all negative values and fix any defined ioctl code constants
to be positive on all platforms.

fbvortex.  Can you apply the change from svn to your python and test
that it works properly on your 64-bit OpenBSD system?  Thanks.

paste a note here once you have with the results.

--
resolution:  - fixed
status: open - pending

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



[issue2141] Pydoc interactive browser misses some docs

2008-03-19 Thread Sean Reifschneider

Changes by Sean Reifschneider [EMAIL PROTECTED]:


--
assignee:  - ping
nosy: +ping
priority:  - normal

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



[issue2148] nis module not supporting group aliases

2008-03-19 Thread Sean Reifschneider

Changes by Sean Reifschneider [EMAIL PROTECTED]:


--
assignee:  - loewis
priority:  - normal

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



[issue2155] optparse.OptionGroup with_statement context handling

2008-03-19 Thread Sean Reifschneider

Sean Reifschneider [EMAIL PROTECTED] added the comment:

Patch is inline.

--
assignee:  - gward
keywords: +patch
nosy: +gward, jafo
priority:  - normal

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



[issue2366] Fixer for new metaclass syntax is needed

2008-03-19 Thread Jack Diederich

Jack Diederich [EMAIL PROTECTED] added the comment:

Here is a partial implementation.  It doesn't warn about __metaclass__
at the module level and doesn't handle multiple __metaclass__
assignements in one class.  tests pending.

--
keywords: +patch
Added file: http://bugs.python.org/file9778/fix_metaclass.patch

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



  1   2   >