[issue6841] A typo in Doc/library/stdtypes.rst

2009-09-05 Thread Cheese Lee

New submission from Cheese Lee cheese...@126.com:

See the patch.
This typo is found in all branches.

--
assignee: georg.brandl
components: Documentation
files: stdtypes-rst-cheese.patch
keywords: patch
messages: 92273
nosy: cheeselee, georg.brandl
severity: normal
status: open
title: A typo in Doc/library/stdtypes.rst
versions: Python 2.6
Added file: http://bugs.python.org/file14835/stdtypes-rst-cheese.patch

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



[issue6841] A typo in Doc/library/stdtypes.rst

2009-09-05 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r74666, will be merged to other branches soon.

--
resolution:  - fixed
status: open - closed

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



[issue6842] program run in interpreter, fails at command line

2009-09-05 Thread John Van Praag

New submission from John Van Praag j...@jvp247.com:

My platform: Win XP.
Program fibo.py from the tutorial runs correctly in the interpreter.
When I run it from the command line I get the following error:

file fibo.py line 6
  print(b, end=' ')
  ^

--
components: Windows
files: fibo.py
messages: 92275
nosy: jvanpraag
severity: normal
status: open
title: program run in interpreter, fails at command line
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file14836/fibo.py

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



[issue6842] program run in interpreter, fails at command line

2009-09-05 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

You're probably trying to run it under Python 2.5 or Python 2.6 instead of 
Python 3.1.  The line you show only makes sense for Python 3.x.

You code runs fine for me (using python3.1, on OS X 10.5).

--
nosy: +marketdickinson
resolution:  - works for me
status: open - closed

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



[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-09-05 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

I've made two subsequent patches. I found after reading the symlink
documentation that I had gotten the parameters mixed up.

This patch, tagged r4274, addresses that issue.

--
Added file: http://bugs.python.org/file14837/python-core_rev4274.patch

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



[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-09-05 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

This second patch adds the documentation to os.rst to formally define
the behavior of the symlink function in Windows. Only changes needed to
be made to the lstat and symlink functions.  readlink remains Unix-only.
We may consider implementing this method for Windows as well at a later
date.

--
Added file: http://bugs.python.org/file14838/python-core_rev4275.patch

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



[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-09-05 Thread Jean-Paul Calderone

Changes by Jean-Paul Calderone exar...@divmod.com:


Added file: http://bugs.python.org/file14839/subprocess-conversion-doc.patch

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



[issue5329] os.popen2 and os.popen3 in python 2.6 incompatible with os.popen* in python 2.5

2009-09-05 Thread Jean-Paul Calderone

Jean-Paul Calderone exar...@divmod.com added the comment:

Ah, thanks for the clarification, Philip.  I've attached another patch
updating those docs.

--

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



[issue6843] No documentation for the module argument to warnings.filterwarnings

2009-09-05 Thread Jean-Paul Calderone

New submission from Jean-Paul Calderone exar...@divmod.com:

None of the documentation seems to cover this parameter.  The test suite
doesn't even seem to exercise it, either.  What does it do?  What kind
of values are expected to be passed for it?

--
assignee: georg.brandl
components: Documentation
messages: 92280
nosy: exarkun, georg.brandl
severity: normal
status: open
title: No documentation for the module argument to warnings.filterwarnings
versions: Python 2.5, Python 2.6, Python 2.7

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



[issue6844] BaseException DeprecationError raises inappropriately

2009-09-05 Thread Alan Isaac

New submission from Alan Isaac alan.is...@gmail.com:

In Python 2.6 if I subclass Exception and intialize my instances with a
`message` attribute, I get a DeprecationError via BaseException.

Of course there is no problem in Py3, because adding a `message`
attribute to instances of a subclass is in fact **not** a problem and
will **not** be disallowed.  I.e., the DeprecationError is raised
incorrectly in Python 2.6.

I am not sure how to raise a DeprecationError *only* in the correct
cases, but certainly the current behavior can be much improved.  As a
crude example, if the `args` passed to BaseException has length 0, then
a flag could be set not to raise this DeprecationError.  Even if not
perfect, this would be **much** better than the current behavior, since
it is common practice not to pass the subclass's initialization
arguments on to Exception.__init__.

This behavior can be expected to affect entire libraries and therefore
should be fixed.  (Eg., it affects docutils.)  I.e., change the name of
your variable is the wrong answer to this bug report.

--
components: Interpreter Core
messages: 92281
nosy: aisaac
severity: normal
status: open
title: BaseException DeprecationError raises inappropriately
type: behavior
versions: Python 2.6

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



[issue6843] No documentation for the module argument to warnings.filterwarnings

2009-09-05 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

The values for a filter entry are documented under the The Warnings
Filter heading.  I've added a link to it from filterwarnings in r74671.

--
resolution:  - fixed
status: open - closed

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



[issue6837] Mark the compiler package as deprecated

2009-09-05 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

The compiler package is surprisingly often used; we already had
complaints when (I think) 2.6 began emitting lots of new
DeprecationWarnings, but for modules/APIs whose replacements was
straightforward.

Replacing usage of the compiler package is usually not straightforward,
since the AST differs from Python's own, and the API for accessing it
even more.  This means that lots of code will continue spewing out these
warnings.

However, a more visible notice in the docs would not hurt, I guess.

--
nosy: +georg.brandl

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



[issue6837] Mark the compiler package as deprecated

2009-09-05 Thread Jean-Paul Calderone

Jean-Paul Calderone exar...@divmod.com added the comment:

Hi Georg, thanks for your comment.

I'm not sure I fully understand, though.

The compiler package is widely used, okay.  So I suppose that means that
the desire here is to make those users happy?

But the compiler package is deprecated, and has known bugs which will
not be fixed.

But to avoid making people unhappy, using the compiler package shouldn't
emit a deprecation warning (despite the fact that it is deprecated). 
Because... seeing the message will make people unhappy?  In contract
specifically to the fact that bugs in the package are going to remain
unfixed and a replacement is being put forward.  It's the message that
is going to cause the upset?

Thanks for any clarification.

--

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



[issue6837] Mark the compiler package as deprecated

2009-09-05 Thread Jean-Paul Calderone

Jean-Paul Calderone exar...@divmod.com added the comment:

Oops.  I wrote In contract in my previous message.  I meant In contrast.

--

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



[issue6843] No documentation for the module argument to warnings.filterwarnings

2009-09-05 Thread Jean-Paul Calderone

Jean-Paul Calderone exar...@divmod.com added the comment:

Thanks for that Georg.

I'm still having trouble with this.  I'm aware that the issue tracking
isn't the right place to ask for help with writing programs, but I think
that since I still can't get this code to work, even looking at the new
documentation, there is still a documentation issue.  Perhaps there's
something else I'm doing wrong, though.

The code causing the warning to be emitted is here:

http://twistedmatrix.com/trac/browser/trunk/twisted/conch/ssh/filetransfer.py?rev=27062#L829

It's a simple example of the new-in-2.6 BaseException.message
deprecation warning.  I'm trying to suppress this.  My attempt goes
something like this:

warnings.filterwarnings(
'ignore',
message='BaseException.message has been deprecated as of Python 2.6',
category=DeprecationWarning,
module=r'twisted\.conch\.ssh\.filetransfer')

When I remove the module argument from this call, the warning is
suppressed.  When I include it, it is not.  The string given seems to be
a string containing a regular expression that the module name must
match, the meaning the documentation suggests.  Am I just doing
something wrong, or are the docs still not right?

--
status: closed - open

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



[issue6845] ftplib rest support for storbinary

2009-09-05 Thread Pablo Mouzo

New submission from Pablo Mouzo pablomo...@gmail.com:

FPT class doesn't support the rest parameter in storbinary method.

--
components: None
messages: 92287
nosy: pablomouzo
severity: normal
status: open
title: ftplib rest support for storbinary
type: feature request
versions: Python 2.7

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



[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-09-05 Thread Jason R. Coombs

Jason R. Coombs jar...@jaraco.com added the comment:

After a short time and some more learning about Mercurial, I discovered
how to rebase my local repository and create a new unified diff against
the latest py3k branch.  This latest patch (7) supercedes all previous
patches.

I hope this patch is suitable for painless merging into the py3k branch.

Eric, please let me know if you encounter any trouble merging it.

--
Added file: http://bugs.python.org/file14840/windows symlink draft 7.patch

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



[issue6837] Mark the compiler package as deprecated

2009-09-05 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Bugs are not fixed is somewhat misleading -- I assume you're referring
to bugs like the one I closed recently. Those are all bugs that have
been in the compiler package for ages, and users that hit them know them
or work around them.  If a regression comes up, it should be fixed IMO.

The only way to make the compiler users happy would be to add it back,
fully supported, to Python3 :)

If you want to understand my reasoning: I want to avoid a situation like
a few months ago, when Python 2.6 was released -- people claimed e.g.
the latest Mercurial release at that time wasn't compatible with 2.6
because it emitted quite a few DeprecationWarnings.  This statement is
not true, of course, but this is how users see it.  In that case, it was
easy for Mercurial to fix because all the deprecated features could be
replaced without effort.  For libraries/programs that use the compiler
package, this won't be effortless and many maintainers may not be able
to spend the time and effort to fix that.

Also, if you look at other modules removed in Py3k, like new or
rfc822, they all only raise a Py3k deprecation warning.

--

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



[issue6845] ftplib rest support for storbinary

2009-09-05 Thread Pablo Mouzo

Pablo Mouzo pablomo...@gmail.com added the comment:

I attached a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file14841/issue6845.patch

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



[issue6843] No documentation for the module argument to warnings.filterwarnings

2009-09-05 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

A simple isolated test here shows that the module argument works as
intended.  I can't help with your problem without more information (but
you probably should debug this somewhere in warnings.py/_warnings.c). 
But you're right, this is not a subject for the bugtracker anymore :)

--
status: open - closed

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



[issue6846] bytearray.pop() returns negative ints

2009-09-05 Thread Hagen Fürstenau

New submission from Hagen Fürstenau hfuerste...@gmx.net:

This looks pretty bad:

 b = bytearray(b\xff)
 b[0]
255
 b.pop()
-1

Fortunately it's easy too fix (attached).

--
components: Interpreter Core
messages: 92292
nosy: hagen
severity: normal
status: open
title: bytearray.pop() returns negative ints
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

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



[issue6846] bytearray.pop() returns negative ints

2009-09-05 Thread Hagen Fürstenau

Changes by Hagen Fürstenau hfuerste...@gmx.net:


--
keywords: +patch
Added file: http://bugs.python.org/file14842/bytearray.patch

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



[issue6847] Exception strings for bytearray say bytes

2009-09-05 Thread Hagen Fürstenau

New submission from Hagen Fürstenau hfuerste...@gmx.net:

Various exceptions thrown by bytearray objects talk of bytes instead
of bytearray. Correction attached.

--
components: Interpreter Core
files: bytearray_strings.patch
keywords: patch
messages: 92293
nosy: hagen
severity: normal
status: open
title: Exception strings for bytearray say bytes
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14843/bytearray_strings.patch

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



[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2009-09-05 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Finally got around to looking at this properly.

Here's a first attempt at a patch to add gamma, lgamma, erf and erfc to 
the math module.  It uses the pymath.c.diff code from nirinA, and adds 
docs, tests, and the extra infrastructure needed for the build system.

The code has gone in a new file called Modules/math_cextra.c.  The old 
approach of sticking things in pymath.c really isn't right, since that 
ends up putting the extra code into the core Python executable instead 
of the math module.

There are currently many test failures;  some of these are undoubtedly 
due to the tests being too strict, but some of them show problems with 
the code for these functions.  It should be possible to have erf and 
erfc produce results accurate to within a few ulps (50, say) over the 
entire extended real line;  getting gamma and lgamma accurate for 
positive inputs should also be perfectly possible.  Negative arguments 
seem to be more difficult to get right.

To test the code on non-Windows, build with something like:

CC='gcc -DTEST_GAMMA' ./configure  make

the '-DTEST_GAMMA' just forces the build to use nirinA's code;  without 
this, the math module will use the libm functions if they're available.

This is just work-in-progress;  apart from the test failures, there's 
still a lot of polishing to do before this can go in.

The patch is against the trunk.

--
versions: +Python 3.2 -Python 3.1
Added file: http://bugs.python.org/file14844/gamma.patch

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



[issue6844] BaseException DeprecationError raises inappropriately

2009-09-05 Thread Jean-Paul Calderone

Jean-Paul Calderone exar...@divmod.com added the comment:

This also affects Twisted.  We worked around it a couple months ago by
putting a read-only `message` property onto our Exception subclass
(Here's the revision: http://twistedmatrix.com/trac/changeset/27062).
 This seemed reasonable enough, but it turns out that it's incompatible
with PyPy so we'll probably have to do something else instead.

--
nosy: +exarkun

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



[issue6844] BaseException DeprecationError raises inappropriately

2009-09-05 Thread ivank

ivank i...@ludios.org added the comment:

That trac link should be http://twistedmatrix.com/trac/changeset/27062

--
nosy: +ivank

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



[issue6839] zipfile can't extract file

2009-09-05 Thread Kim Kyung Don

Kim Kyung Don newercoo...@gmail.com added the comment:

P.S
I tested extraction by using 7-zip.
It works fine.

--

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