Martin v. Löwis mar...@v.loewis.de added the comment:
+1
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13350
___
___
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 3a0a94797ac5 by Petri Lehtinen in branch '3.2':
curses.tparm() is expecting a byte string, not curses.tigetstr()
http://hg.python.org/cpython/rev/3a0a94797ac5
New changeset 626c6c7f3af6 by Petri Lehtinen in branch
Martin v. Löwis mar...@v.loewis.de added the comment:
I think the patch currently lacks a lot of symbolic constants; see my review.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10570
___
New submission from Bas Wijnen wij...@debian.org:
http://docs.python.org/py3k/library/socketserver.html says:
The solution is to create a separate process or thread to handle each request;
the ForkingMixIn and ThreadingMixIn mix-in classes can be used to support
asynchronous behaviour.
There
New submission from Mark mhughes...@gmail.com:
When low and mode are the same in random.triangular it gives the following
error:
type 'exceptions.ZeroDivisionError': float division
args = ('float division',)
message = 'float division'
When high and mode are the same there is no
Mark Dickinson dicki...@gmail.com added the comment:
I can't reproduce this:
Python 2.7.2 |EPD 7.1-2 (32-bit)| (default, Jul 3 2011, 15:40:35)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type packages, demo or enthought for more information.
from random import triangular
triangular(low=1,
Mark mhughes...@gmail.com added the comment:
Many thanks, Mark. I'm very new to python so apologies for my obvious mistake
(you were absolutely right, I was feeding the high and mode in back to front).
As a separate aside, it would be convenient if low=high=mode returned low (or
mode or
Mark Dickinson dicki...@gmail.com added the comment:
What do you suggest? Doing it in _PyEval_SliceIndex() in 2.7 is
problematic, as we don't want x[None:2], right? :)
Eh? Don't we already have this?
Python 2.7.2 (default, Aug 22 2011, 13:53:27)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
Floris Bruynooghe floris.bruynoo...@gmail.com added the comment:
Apologies for not attaching a patch, I thought it was pretty trivial. Attached
it now.
--
keywords: +patch
Added file: http://bugs.python.org/file23616/pyatomic.diff
___
Python
Petri Lehtinen pe...@digip.org added the comment:
Or am I misunderstanding?
Ah, no, sorry. I wasn't aware of this.
Now the error message set by _PyEval_SliceIndex() makes sense. It doesn't
itself accept None, but apply_slice() and assign_slice() handle the None case.
There's still the
Changes by Petri Lehtinen pe...@digip.org:
--
keywords: +needs review
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13338
___
Petri Lehtinen pe...@digip.org added the comment:
This would chop unnecessary lines of code very nicely. +1
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13350
___
Mark Dickinson dicki...@gmail.com added the comment:
it would be convenient if low=high=mode returned low (or mode or high)
Yes, I agree that random.triangular should degrade gracefully, in the same way
that random.uniform does.
--
___
Python
Julien ÉLIE jul...@trigofacile.com added the comment:
A drawback is that CAPABILITIES will still being unsent after an upgrade of the
news server to a more up-to-date version supporting the command.
If CAPABILITIES is not understood by the news server, it is not an issue. A
500 response code
Antoine Pitrou pit...@free.fr added the comment:
By always sending capabilities at connection, some servers immediately
throw an error. I've modified the class initialization to include an
optional parameter to indicate if this should be disabled.
Which kind of error? As Julien says, we
STINNER Victor victor.stin...@haypocalc.com added the comment:
The entry in Misc/NEWS mentions the change in curses.tigetstr(),
but actually curses.tparm() has been changed
Woops, thanks for fixing the NEWS file :-)
--
___
Python tracker
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 386a319b1825 by Amaury Forgeot d'Arc in branch 'default':
Issue #13350: Replace most usages of PyUnicode_Format by PyUnicode_FromFormat.
http://hg.python.org/cpython/rev/386a319b1825
--
nosy: +python-dev
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Now PyUnicode_Format is only called by unicode_mod...
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13350
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +vinay.sajip
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13353
___
Charles-François Natali neolo...@free.fr added the comment:
Here's an updated patch:
- address returned by recvfrom()
- recv flags (MSG_PEEK)
- congestion behavior
I've also added a bunch of constants:
- all the typical SO_ constants
- CMSG flags
- RDMA-related options (RDMA is probably one of
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13355
___
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
There's still the question whether {list,tuple}.index() should accept None or
not.
The API should not be changed for Py2.7 and Py3.2. Those changesets should be
reverted.
For Py3.3, it is open to discussion, but we probably
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
One other thought: the API for list.index() doesn't exist in isolation. There
is also str.index, the sequence abstract base class, and tons of code that has
been written to emulate lists. This is an ancient API (approx 20
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment:
up?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10115
___
___
Python-bugs-list
New submission from Ezio Melotti ezio.melo...@gmail.com:
$ ./python -Wd -3 -m test.regrtest -v test_logging
== CPython 2.7.2+ (2.7:39573be48b4a, Nov 6 2011, 17:13:44) [GCC 4.6.1]
== Linux-3.0.0-12-generic-i686-with-debian-wheezy-sid little-endian
==
Antoine Pitrou pit...@free.fr added the comment:
What value should we assign to sock-sock_timeout if SOCK_NONBLOCK was
specified in accept4() call?
The same value as for other non-blocking sockets, IMO.
And in socket.py should we check as in original accept:
if getdefaulttimeout() is None
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment:
The same value as for other non-blocking sockets, IMO.
There are three possible values I think:
1. parent's current sock_timeout
2. global default socket timeout
3. 0
Can you please tell which one? I assume it should be number 3.
Antoine Pitrou pit...@free.fr added the comment:
The same value as for other non-blocking sockets, IMO.
There are three possible values I think:
1. parent's current sock_timeout
2. global default socket timeout
3. 0
Can you please tell which one? I assume it should be number 3.
Yes
New submission from Michael Brooks firealwayswo...@gmail.com:
Open the attached file red_test.html in a browser. The bad elements are
blue because the style tag isn't parsed by any known browser. However, the
HTMLParser library will incorrectly recognize them.
--
components:
Ezio Melotti ezio.melo...@gmail.com added the comment:
Thanks for the report.
Could you try with the latest 2.7 and see if you can reproduce the problem?
(see the devguide for instructions.)
If you can reproduce the issue even on the latest 2.7, it would be great if you
could provide a patch
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 19ffa12ffdd4 by Petri Lehtinen in branch '2.7':
Revert Accept None as start and stop parameters for list.index() and
tuple.index()
http://hg.python.org/cpython/rev/19ffa12ffdd4
New changeset ed0e85efac47 by Petri
Petri Lehtinen pe...@digip.org added the comment:
It's now reverted on all branches. I posted to python-dev alreay earlier.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13340
___
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 99e118951a80 by Brian Curtin in branch 'default':
Fix #13327. Remove the need for an explicit None as the second argument to
http://hg.python.org/cpython/rev/99e118951a80
--
nosy: +python-dev
Petri Lehtinen pe...@digip.org added the comment:
If the thread safety of setlocale() is a problem, does anybody know how
portable uselocale() is? It sets the locale of the current thread only, so it's
safe to temporarily change the locale and then set it back.
--
nosy:
New submission from Michael Brooks firealwayswo...@gmail.com:
The HTML tag at the bottom of this page correctly identified has having cdata
like properties and trigger set_cdata_mode(). Due to the cdata properties of
this tag, the only way to end the data segment is with a closing /script
Changes by Michael Brooks firealwayswo...@gmail.com:
--
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13358
___
___
Ezio Melotti ezio.melo...@gmail.com added the comment:
Have you tried with the latest 2.7? (see msg147170)
--
nosy: +ezio.melotti
stage: - test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13358
Michael Brooks firealwayswo...@gmail.com added the comment:
Yes, I am running the latest version, which is python 2.7.2.
On Sun, Nov 6, 2011 at 12:14 PM, Ezio Melotti rep...@bugs.python.orgwrote:
Ezio Melotti ezio.melo...@gmail.com added the comment:
Thanks for the report.
Could you try
Michael Brooks firealwayswo...@gmail.com added the comment:
Yes I am running python 2.7.2.
On Sun, Nov 6, 2011 at 12:52 PM, Ezio Melotti rep...@bugs.python.orgwrote:
Ezio Melotti ezio.melo...@gmail.com added the comment:
Have you tried with the latest 2.7? (see msg147170)
--
Ezio Melotti ezio.melo...@gmail.com added the comment:
I mean 2.7.3 (i.e. the development version).
You need to get a clone of Python as explained here:
http://docs.python.org/devguide/
--
___
Python tracker rep...@bugs.python.org
New submission from Davide Rizzo sor...@gmail.com:
urllib2.urlopen('http://foo/url and spaces') will send a HTTP request line like
this to the server:
GET /url and spaces HTTP/1.1
which the server obviously does not understand. This contrasts with urllib's
behaviour which replaces the spaces
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
stage: - test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13359
___
New submission from Florent Xicluna florent.xicl...@gmail.com:
The UnicodeWarning is raised on some dict or set operations.
It is not very helpful, and sometimes annoying.
And it is somewhat inconsistent.
# ** warning not raised **
$ python2.7 -c print u'd\xe9' in {'foo', 'bar'}
False
$
Michael Brooks firealwayswo...@gmail.com added the comment:
Python 2.7.3 is still affected by both of these issues.
On Sun, Nov 6, 2011 at 12:56 PM, Ezio Melotti rep...@bugs.python.orgwrote:
Ezio Melotti ezio.melo...@gmail.com added the comment:
I mean 2.7.3 (i.e. the development version).
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
dependencies: +UnicodeWarning raised on dict() and set()
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13356
___
Florent Xicluna florent.xicl...@gmail.com added the comment:
Similar expressions where the warning is raised or not (depending on latin-1
comparison):
$ python2.7 -c print u'd\xe9' in {'foo', 'd\xe9r'}
False
$ python2.7 -c print u'd\xe9' in {'foo', 'd\xe9'}
-c:1: UnicodeWarning: Unicode equal
Nathan Clayton nathanclay...@gmail.com added the comment:
When using Easynews, it sends a 480 error (e.g. nntplib.NNTPTemporaryError:
480 You must log in.)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10287
Martin v. Löwis mar...@v.loewis.de added the comment:
Not having tests for the control messages is fine with me - we don't need to
test Linux, but Python.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue
Florent Xicluna florent.xicl...@gmail.com added the comment:
This is the expression which raises the warning.
u'compiler.parser' in ['\xab\xd7\xbb', u'\u013f\xd6G']
__main__:1: UnicodeWarning: Unicode equal comparison failed to convert both
arguments to Unicode - interpreting them as being
Martin v. Löwis mar...@v.loewis.de added the comment:
I fail to see the issue. What exactly is the problem with the warning? It looks
all consistent and helpful to me.
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
Florent Xicluna florent.xicl...@gmail.com added the comment:
Often sequences or sets have heterogeneous keys, mixing str and unicode,
and in this case there's no easy way to work with them without raising this
UnicodeWarning.
The logging module is such an example.
Of course it is only a
Ezio Melotti ezio.melo...@gmail.com added the comment:
I'm not sure what is the best solution here.
unescape uses a regex with replaceEntities as callback to replace the entities
in attribute values.
The problem is that replaceEntities currently returns unicode, and if unescape
receives a
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 0b779988e8b7 by Vinay Sajip in branch '2.7':
Closes issue #13353: version doumentation about utc parameter corrected.
http://hg.python.org/cpython/rev/0b779988e8b7
--
nosy: +python-dev
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13353
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3932
___
___
Python-bugs-list
Martin v. Löwis mar...@v.loewis.de added the comment:
Often sequences or sets have heterogeneous keys, mixing str and
unicode, and in this case there's no easy way to work with them
without raising this UnicodeWarning.
That's a bug in the application. You must not mix byte strings
and
David Fischer djfis...@gmail.com added the comment:
With this patch, the AbstractBasicAuthHandler (and its subclasses) performs a
regex search on the amalgamated www-authenticate header for basic
authentication.
This fixes the case where you have an HTTP response of the form:
HTTP/1.1 401
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
Thanks, Florent. This patch was by you in response to issue #8201 - do you have
any suggestion as to the best way to resolve this? I tried changing the
non-ASCII logger to '\xc3\xb4\xc3\xbc', which decodes cleanly to u'\xf4\xfc'
Florent Xicluna florent.xicl...@gmail.com added the comment:
I suggest to use encoded string as keys in loggerDict.
It should solve both issue #8201 and this one.
Moreover, it seems in line with msg147191 from Martin on issue #13360.
Patch attached.
--
components: +Unicode
New submission from Florent Xicluna florent.xicl...@gmail.com:
import logging
log = logging.getLogger(any)
Traceback (most recent call last):
File stdin, line 1, in module
File ./Lib/logging/__init__.py, line 1730, in getLogger
return Logger.manager.getLogger(name)
File
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13361
___
___
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue583975
___
___
Python-bugs-list
New submission from skreft skr...@gmail.com:
Hi all, I was reading Python's source code and was surprised to find many PEP 8
errors.
The file that I found specially non PEP8 compliant is
Lib/encodings/punnycode.py, but there are many others that are not compliant.
I think that this issue
Benjamin Peterson benja...@python.org added the comment:
Generally, we don't do style cleanups for the sake of style cleanups.
--
nosy: +benjamin.peterson
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
New submission from skreft skr...@gmail.com:
In Python 2.7, there are many patterns of the form
for x in mapping.(keys()|values()|items()):
#code
when the iterator version of those method could be used.
Is there any reason for using those methods?
I see that in some other parts of the code
Jesús Cea Avión j...@jcea.es added the comment:
Éric, thanks for paying attention to this. In this particular case, I checked
the code and verified that the variables were not used anywhere. But I will
comply with the policy in the future.
Thanks again for pointing out.
--
New submission from skreft skr...@gmail.com:
By using tools like clonedigger is possible to spot some repeated code.
One file that caught my attention is Lib/decimal.py. It has many portions of
duplicated code.
Here is an example:
def logical_or(self, other, context=None):
Applies an
skreft skr...@gmail.com added the comment:
Hi all again:
in the original posting of this issue, I asked what would be the best way to
address this issue. Additionally I proposed to use existing tools to check the
current code. These tools could be easily added to the tests in a non failing
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
priority: normal - high
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13357
___
___
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
I concur with Benjamin.
This is a waste of time and a potential source of new errors.
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13362
Ned Deily n...@acm.org added the comment:
Thanks for you interest in improving Python. As noted in the response to one of
your other issues, we generally do not do style cleanups just for the sake of
style cleanups. In addition, our policy for current maintenance branches, like
Python 2.7,
David Townshend aquavita...@gmail.com added the comment:
It is already possible to write a wrapper function that does it:
def create(file):
fd = os.open(file, os.O_EXCL | os.O_CREAT | os.O_WRONLY)
return os.fdopen(fd)
The point it not that it can't be done, but that it is not straight
Mark Dickinson dicki...@gmail.com added the comment:
How would you suggest refactoring this?
For that example, I'd prefer not to remove the repetition; as it is, the code
is clean and clear. Eliminating the repetition would involve adding an extra
layer of indirection, making the code in
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13349
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
stage: - needs patch
Added file: http://bugs.python.org/file23621/issue3932-test.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3932
Martin v. Löwis mar...@v.loewis.de added the comment:
skreft: I can see nothing wrong by having a website that lists PEP 8 violations
in the standard library - feel free to create one on wiki.python.org.
Your preferred solution of having automated tests is not feasible. Taking
punycode.py
Martin v. Löwis mar...@v.loewis.de added the comment:
skreft: since you were asking for a reason why the code looks the way it looks
- the code in many cases predates the introduction of iterkeys and friends.
I personally find the names iterkeys/itervalues/iteritems fairly ugly, and
rather
78 matches
Mail list logo