New submission from Manuel Jacob:
When evaluating, signed zero complex numbers aren't recovered correctly.
-0j
(-0-0j)
(-0-0j)
0j
0j
0j
According to
http://docs.python.org/dev/reference/datamodel.html#object.__repr__ the
representation can be used to recreate an object with the same value.
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti, mark.dickinson, skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17336
___
Ezio Melotti added the comment:
For one thing, I think resources could be implemented in terms of skips
While working on #17333 I noticed a related problem. Most of the tests in
test_imaplib are skipped if the 'network' resource is not specified. The test
contains the following lines to
Roundup Robot added the comment:
New changeset 02bbc5375a56 by Ezio Melotti in branch '3.3':
#17333: test_imaplib now works with unittest test discovery. Patch by Zachary
Ware.
http://hg.python.org/cpython/rev/02bbc5375a56
New changeset b8bafae4a15a by Ezio Melotti in branch 'default':
Ezio Melotti added the comment:
Fixed, thanks for the patch!
As noted in msg183314, several tests are not included while using unittest
discovery, but that's a separate issue.
--
assignee: - ezio.melotti
resolution: - fixed
stage: - committed/rejected
status: open - closed
Roundup Robot added the comment:
New changeset 886df716cd09 by Ezio Melotti in branch '3.3':
#17334: test_index now works with unittest test discovery. Patch by Zachary
Ware.
http://hg.python.org/cpython/rev/886df716cd09
New changeset 1c71882938eb by Ezio Melotti in branch 'default':
#17334:
Ezio Melotti added the comment:
Fixed, thanks for the patch!
--
assignee: - ezio.melotti
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17334
Changes by Eric V. Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17336
___
___
Python-bugs-list
Ezio Melotti added the comment:
Is there a prefered style guide for css that we should use?
If you mean indentation/spacing, my preferred style is:
selector {
property1: value1;
property2: value2;
...
}
FWIW I agree an HTML5 doctype should be used.
--
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
type: - enhancement
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12301
___
Ezio Melotti added the comment:
Dino, what's the status of this?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7855
___
___
Python-bugs-list
Ezio Melotti added the comment:
Can this still go on 2.7/3.2/3.3?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10712
___
___
Python-bugs-list
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11787
___
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15866
___
___
karl added the comment:
http://hg.python.org/cpython/file/3.3/Lib/urllib/request.py#l359
def add_header(self, key, val):
# useful for something like authentication
self.headers[key.capitalize()] = val
and http://hg.python.org/cpython/file/3.3/Lib/urllib/request.py#l271
in
New submission from mic_e:
With a prompt that uses ANSI color escape codes, python3 input() and python2
raw_input() behave incorrectly when it comes to the wrapping of the first line
- almost certainly due to the wrong string length calculation.
The line breaking occurs k characters early,
Ezio Melotti added the comment:
I can reproduce the issue, but only from the interactive interpreter while
using input() directly (Linux/py3).
I tried the following things:
$ ./python -c 'print(\x1b[31;1mthis is a bold red prompt \x1b[m, end=);
input()'
$ ./python -c 'input(\x1b[31;1mthis is
Ezio Melotti added the comment:
Not yet, I wanted to make sure that everyone agrees on the change.
If I don't get other replies I'll commit it soon.
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17032
Ram Rachum added the comment:
(I fixed the patch to not have a typo.)
--
Added file:
http://bugs.python.org/file29290/cpython_patch1of1_8e9346e7ae87.patch.txt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17032
Changes by Ram Rachum r...@rachum.com:
Removed file:
http://bugs.python.org/file29006/cpython_patch1of1_8e9346e7ae87.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17032
___
Michael Enßlin added the comment:
The issue might very well be strictly related to GNU readline.
I have both successfully reproduced it in a C program:
#include stdio.h
#include readline/readline.h
int main() {
readline(\x1b[31;1mthis is a bold red prompt\x1b[m );
}
gcc -lreadline
R. David Murray added the comment:
We have previously discussed adding resource-awareness to unittest, but that is
a much bigger project (API design, scope considerations, etc etc). In the
meantime, what we could do is modify the current resource-skip logic slightly:
make it so that tests
Gregory P. Smith added the comment:
Yes! 2to3 features are allowed in stable releases.
On Mar 2, 2013 5:17 AM, Ezio Melotti rep...@bugs.python.org wrote:
Ezio Melotti added the comment:
Can this still go on 2.7/3.2/3.3?
--
___
Python tracker
Ezio Melotti added the comment:
There are actually three separate issues here:
1) The resources don't use unittest skip (or at least not always), so while
running the tests without regrtests there are no indication that some tests
have been skipped. This could be addressed by converting the
New submission from Alex Gaynor:
Following the length_hint PEP, we should expose this facility to end-python
programmers. The semantics would be basically: the list has behavior identical
to if you hadn't provided length_hint, except the VM is free to preallocate
efficiently.
CPython (and
Changes by Evgeny Kapun abacabadabac...@gmail.com:
--
nosy: +abacabadabacaba
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9334
___
___
Raymond Hettinger added the comment:
Thanks for the suggestion. isidentifier() was exactly what was needed.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17331
R. David Murray added the comment:
No controversy on (1), we should just do that.
I don't see a strong reason to change (2). I always run the test suite with
-uall, but if I were running a restricted set I'd rather not have resources
outside the local machine be accessed.
My proposal is a
Ezio Melotti added the comment:
I'd rather not have resources outside the local machine be accessed.
Fair enough.
If you *also* want a way to skip tests based on resource when running
them outside regrtest, then unittest would have to grow a resource API.
This can already be done though
R. David Murray added the comment:
So you are agreeing with my proposal?
And no, I don't think the goal is to get rid of regrtest, it is just to make it
as small as practical. Or to put it another way, to add the features of
regrtest that are generally useful to unittest.
--
R. David Murray added the comment:
My proposal is how to do this without adding anything to unittest. It is about
how to implement the skips so that all tests are run when run under unittest,
but resource control still happens when the tests run under regrtest.
--
Ezio Melotti added the comment:
So you are agreeing with my proposal?
I will have to see a concrete proposal first. If a resource API is useful
enough to be added to unittest, and we can come up with a decent API we can
move it there, otherwise it can just stay in regrtest. There's also
Benjamin Peterson added the comment:
Definitely needs to be discussed on python-ideas/python-dev.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17338
___
Benjamin Peterson added the comment:
This has been fixed recently:
$ ./python bytes.py
b'\x00'
b'hello'
--
nosy: +benjamin.peterson
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
Ezio Melotti added the comment:
Yes, that could be done as well, but even if they are not run by default under
unittest, I'd be already happy to see them marked as skipped. If I see that
they are skipped I can always switch to regrtest to enable the necessary
resource, or just execute the
Mark Dickinson added the comment:
This is not easy to avoid, I'm afraid, and it's a consequence of Python's usual
rules for mixed-type arithmetic: (-0-0j) is interpreted as 0 - (0.0 + 0.0j)
--- that is, the 0j is promoted to a complex instance (by giving it zero real
part) before the
Mark Dickinson added the comment:
An aside: C99 gets around this problem by allowing an (optional) Imaginary
type, separate from Complex. Very few compilers support it, though.
--
___
Python tracker rep...@bugs.python.org
Changes by Terry J. Reedy tjre...@udel.edu:
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17032
___
___
R. David Murray added the comment:
Ah, but for me the point of running directly under unit test (and unittest
discovery) it to be able to use the standard unittest facilities for running a
single testcase or individual test. Converting them to skips without making
them run if regrtest isn't
New submission from Terry J. Reedy:
If an object ob does not have a __bytes__ method or buffer interface and is not
a string, integer, or iterable, bytes(ob) fails with
TypeError: 'object' object is not iterable
This is misleadingly narror (similar to #17032). We should either list *all*
Terry J. Reedy added the comment:
I just opened #17339 about another situation where the error message references
only the last of several checks that failed.
bytes(object()) # raises
TypeError: 'object' object is not iterable # or 4 other possibilities
I think any message like this should
Francisco Martín Brugué added the comment:
Hi Joar,
just a detail: is there a reason for the asymmetric check for timedelta
isinstance (and raising NotImplemented)? And BTW. isn't a double check for the
__sub__ case (or have I missed something)?
+def __add__(self, other):
+Add a
Ezio Melotti added the comment:
See also #16518.
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17339
___
___
Raymond Hettinger added the comment:
Guido has previously rejected any kind of user specified presizing parameter
for dictionaries. He felt that it was breaking the abstraction in a way that
caused people to focus on implementation specific details.
Also, set() and dict() use presizing (and
Changes by Berker Peksag berker.pek...@gmail.com:
--
keywords: +patch
nosy: +berker.peksag
Added file: http://bugs.python.org/file29291/issue13477.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
Terry J. Reedy added the comment:
Do you prefer the long or short form?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17339
___
___
Brett Cannon added the comment:
So Nick Coghlan pointed out that this would require a deprecation warning which
is doable using ImportWarning. But that also lowers my motivation to bother
since there is no performance benefit.
I will, though, at least make it clearer in the What's New doc and
Antoine Pitrou added the comment:
hi Charles-François,
I'm attaching a patch doing the cleanup in PyEval_ReInitThreads(), with
test.
Did you forget to attach the patch?
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
I think it is going a bit too far in the direction of exposing low-level
optimizations. Python is not C++. I also agree with Raymond that it's rather
rare to construct read-only containers (in the sense that they are allocated
once and for all).
--
Éric Araujo added the comment:
Patch looks good! Some minor comments on Rietveld.
Could you add tests?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
Éric Araujo added the comment:
Short form for me.
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17339
___
___
Raymond Hettinger added the comment:
+1 for adding a CLI and +1 for keeping it minimal.
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13477
___
karl added the comment:
I created 4 tests for testing trailing and leading spaces on
* add_unredirected_header()
* add_header()
and modified the functions.
Tests passed.
→ ./python.exe Lib/test/test_urllib2net.py
[…]
test_headers_with_spaces (__main__.OtherNetworkTests) ... ok
[…]
karl added the comment:
Ah thanks Eric, I will fix that.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11448
___
___
Python-bugs-list mailing
karl added the comment:
ok made a proper patch on the rst file with hg diff.
See issue-11448-1.patch
--
Added file: http://bugs.python.org/file29293/issue-11448-1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11448
Alex Gaynor added the comment:
python-dev/ideas may be a better place to have this discussion, but basically
if you're going to insist that stuff like this doesn't go into Python because
it isn't C++, people are going to have to write C++, and that makes me
incredibly sad.
There's an obvious
Benjamin Peterson added the comment:
I think the emphasis is on internally :).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17338
___
___
karl added the comment:
Are there issues related to removing the capitalize() and title() appears?
# title()
* http://hg.python.org/cpython/file/886df716cd09/Lib/urllib/request.py#l1239
# capitalize()
* http://hg.python.org/cpython/file/886df716cd09/Lib/urllib/request.py#l359
*
Ankur Ankan added the comment:
I was also working on this issue so thought I should also submit my patch.
Has a few extra features from berker.peksag's patch:
1) the name of the files to be extracted can be specified
2) output directory can be specified for extracting files.
--
Added
karl added the comment:
tests in
http://hg.python.org/cpython/file/886df716cd09/Lib/test/test_wsgiref.py#l370
also checking that everything is case insensitive.
And the method to get the headers in wsgiref, make sure they are lower-case
Changes by Ankur Ankan ankuran...@gmail.com:
--
nosy: +Ankur.Ankan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15542
___
___
Python-bugs-list
61 matches
Mail list logo