Julien Nabet added the comment:
Thank you for your feedback, you can close this tracker.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18521
___
Steven D'Aprano added the comment:
On 03/08/13 13:02, Alexander Belopolsky wrote:
Alexander Belopolsky added the comment:
Is there a reason why there is no review link? Could it be because the
file is uploaded as is rather than as a patch?
I cannot answer that question, sorry.
In any
Ronald Oussoren added the comment:
My initial plan was to add the patch soon after filing the issue, but that's
before I noticed that this needs some API design to integrate nicely :-)
My current idea for the api:
* add symlink(path, target) to write a symlink
* add readlink(path) to read a
Vajrasky Kok added the comment:
Is there a reason why there is no 'review' link? Could it be because the file
is uploaded as is rather than as a patch?
I think I can answer this question. The answer is yes. You can have review
only if you use diff not raw file.
The original poster, Steven
Changes by koobs koobs.free...@gmail.com:
--
nosy: +koobs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16463
___
___
Python-bugs-list mailing
Changes by Phil Connell pconn...@gmail.com:
--
nosy: +pconnell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18566
___
___
Python-bugs-list
Changes by Phil Connell pconn...@gmail.com:
--
nosy: +pconnell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18594
___
___
Python-bugs-list
Changes by Jean-Paul Calderone exar...@twistedmatrix.com:
--
nosy: -exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11798
___
___
Jason R. Coombs added the comment:
It's not obvious to me if the authors originally intended to have the 'name'
attribute as a formal interface, so I've decided the change should probably be
added to Python 3.4. Here's a diff I've put together:
http://paste.jaraco.com/tMdQ2
It updates the
Changes by Jason R. Coombs jar...@jaraco.com:
--
keywords: +needs review
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18532
___
Charles-François Natali added the comment:
Guido van Rossum added the comment:
Can you try again with the failing assert replaced with this?
self.assertTrue(0.018 = t2-t0 = 0.028, t2-t0)
That should be a better way to check that code works.
I'm still getting - less frequent -
Charles-François Natali added the comment:
This can only be raised (above the hard limit) by a privileged
process, so I would be out of luck there, as I could not convince
my sysadmins to raise this further.
We all know that feeling :-)
Meanwhile, I will just use my own module, so feel
Charles-François Natali added the comment:
The problem is that the test passes a DNS address to connect(), which means
that it has to perform a name resolution first.
And since there's not timeout on gethostbyname()/getaddrinfo() you can end up
well above the timeout.
The hostnames should be
Marc-Andre Lemburg added the comment:
On 03.08.2013 00:47, Alexander Belopolsky wrote:
Alexander Belopolsky added the comment:
Does a result of one and one half seconds make sense as the result of a
floor division operation?
Yes. Timedeltas behave as integers containing the number of
Mark Dickinson added the comment:
I think that's a very obscure interpretation of floor division for
timedeltas :-)
Agreed.
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18629
Mark Dickinson added the comment:
Exception message fixed in revision dab7d6f33b87
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18570
___
___
Charles-François Natali added the comment:
And here's a patch.
--
keywords: +patch
Added file: http://bugs.python.org/file31137/connect_timeout.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16463
New submission from Al Korgun:
It would be pretty good, if 'assert' could raise specified exception, like that:
data = None
assert isinstance(data, basestring), TypeError('data' must be a string)
sAssertionError/sTypeError: 'data' must be a string
--
components: Interpreter Core
Mark Dickinson added the comment:
What's wrong with:
if not isinstance(data, basestring):
raise TypeError(...)
?
In any case, you appear to be wanting to use assert to check user input.
That's not its intended use; instead, it's there for making debugging
assertions. Bear in mind
New submission from Charles-François Natali:
socketpair() is quite useful, notably for tests.
Currently, it's not defined on Windows.
Since it's rather easy to implement, it would be nice to have it, if not in the
stdlib, at least in test.support.
--
components: Library (Lib)
messages:
Nick Coghlan added the comment:
I checked the getsignal docs, and indeed None is the expected return value for
signal handler exists, but was not installed from Python. That's accurate
given the way faulthandler works:
On Linux (Python 3.3.0):
$ python3 -c import signal;
Chris Lambacher added the comment:
My use case is a generic mixin for Enums and a generic mixin for Django ORM
fields that uses the Enums to generate choices.
The Enum mixin has to call cls.__class__._get_mixins_(cls.__bases__) to get the
member_type so that it can call the
Roundup Robot added the comment:
New changeset b7834800562f by Nick Coghlan in branch '3.3':
Close #18396: fix spurious test_signal failure on Windows
http://hg.python.org/cpython/rev/b7834800562f
New changeset 6fc71ed6a910 by Nick Coghlan in branch 'default':
Merge #18396 from 3.3
Nick Coghlan added the comment:
I added one slight tweak to Jeremy's patch - an assertion to ensure that test
loop is checking at least some* signals, even when faulthandler is enabled.
--
___
Python tracker rep...@bugs.python.org
Al Korgun added the comment:
Mark Dickinson, and I just think it might be useful in debug. PYO is another
story.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18642
___
Charles-François Natali added the comment:
Unless anyone objects, I'll backport it soonish.
--
stage: - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15233
___
Changes by Charles-François Natali cf.nat...@gmail.com:
--
keywords: +easy, needs review
stage: - patch review
type: - enhancement
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12015
Mark Dickinson added the comment:
Ah, so I think I don't understand the proposal. In your original message, is
it your intention that the assert raises TypeError, or that it raises
AssertionError?
Again: what's the benefit over existing solutions? Either:
if not isinstance(data,
New submission from Vajrasky Kok:
This python is compiled with --with-pydebug option.
[sky@localhost cpython]$ cat /tmp/a.txt
manly man likes cute cat.
[sky@localhost cpython]$ ./python
Python 3.4.0a0 (default:e408e821d6c8, Jul 27 2013, 10:49:54)
[GCC 4.7.2 20121109 (Red Hat 4.7.2-8)] on linux
Vajrasky Kok added the comment:
Sorry, I forgot about stdin. Attached the patch to handle stdin gracefully.
--
Added file:
http://bugs.python.org/file31139/formatter_fix_resource_warning_v2.patch
___
Python tracker rep...@bugs.python.org
Vajrasky Kok added the comment:
I guess I should not close stdin just in case people are using test function in
the script.
Attached the patch to only close the open files not stdin.
--
Added file:
http://bugs.python.org/file31140/formatter_fix_resource_warning_v3.patch
R. David Murray added the comment:
I think it would be confusing for assert to raise anything other than an
AssertionError, so I also think this should be rejected.
It might be interesting for there to be a way to call unittest's assert methods
in a debug context (that is, without having to
Serhiy Storchaka added the comment:
* read will raise an exception when trying to read a symlink
(alternative: do symlink resolving, but that's too magical to my taste)
And perhaps when trying to read a directory entry too.
* extract and extractall extract the symlink as a symlink
(but
Martijn Pieters added the comment:
Why is the `formatter` module still part of Python 3? This was a dependency for
the `htmllib` module in Python 2 only, and that module was deprecated and
removed from Python 3.
--
nosy: +mjpieters
___
Python
Ethan Furman added the comment:
Eli, your method is good. I thought I had tried something similar but I
obviously had the wrong PyLong constructor.
I'll get it implemented.
--
___
Python tracker rep...@bugs.python.org
Marc-Andre Lemburg added the comment:
On 02.08.2013 16:37, R. David Murray wrote:
I got the impression from what I read that -e included additional control
sequences, but perhaps I misunderstood and that only meant that the data
stream was expected to *use* additional control sequences
R. David Murray added the comment:
Terry: I would not be in favor of using the normal iter, since iterating a
collection doesn't normally empty it, and there may be tools that iterate a
test suite outside of test execution. Adding a pop_iter method would be a
backward compatibility issue,
Charles-François Natali added the comment:
The test shouldn't pass 4096 as nbytes: apparently, recent FreeBSD kernels
zero-fill.
--
nosy: +neologix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18296
Roundup Robot added the comment:
New changeset 86b8b035529b by Serhiy Storchaka in branch '3.3':
Issue #17998: Fix an internal error in regular expression engine.
http://hg.python.org/cpython/rev/86b8b035529b
New changeset 36702442ffe0 by Serhiy Storchaka in branch 'default':
Issue #17998: Fix
Alexander Belopolsky added the comment:
What is so special about seconds? Why not days? As in
timedelta(3) // 2
timedelta(1)
Note that in 3.x we have timedelta over timedelta division that lets you do
floor division in arbitrary time units.
What is the use case for timedelta // int that
Mark Dickinson added the comment:
I'm not sure I see a use-case for timedelta // int at all. To make sense of
that, you first need some way to make sense of floor(timedelta), and as you say
it's not clear what that should mean: number of seconds? number of days?
Either of those would seem
Mark Dickinson added the comment:
-1 on changing the behaviour in 2.7, though; I think it's far too late for
that.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18629
___
Marc-Andre Lemburg added the comment:
On 03.08.2013 18:32, Alexander Belopolsky wrote:
Alexander Belopolsky added the comment:
What is so special about seconds? Why not days? As in
timedelta(3) // 2
timedelta(1)
Note that in 3.x we have timedelta over timedelta division that lets
Serhiy Storchaka added the comment:
Sorry for the delay. I have committed a simple patch which fixes this bug. But
I don't close the issue still because there are other related issues.
--
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
This appears to have turned the buildbots red.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17998
___
Tim Peters added the comment:
Well, a timedelta is a duration. timedelta // n is as close as possible to one
n'th of that duration, but rounding down (if necessary) so that the result is
representable as a timedelta. In the same way, if i and j are integers, i // j
is as close as possible
Jean-Paul Calderone added the comment:
I think that's a very obscure interpretation of floor division for
timedeltas :-)
Note - I don't care about this. I just want `timedelta / int` to do the same
thing in Python 2.7 with __future__.division as `timedelta / int` does in
Python 3.
Please
Roundup Robot added the comment:
New changeset 797b1d13d16e by Martin v. Löwis in branch '3.3':
Issue #16067: Add description into MSI file to replace installer's temporary
name.
http://hg.python.org/cpython/rev/797b1d13d16e
New changeset 7d661f47f73b by Martin v. Löwis in branch 'default':
Eli Bendersky added the comment:
Yes, AFAIU PyNumber_Long is the equivalent of Python-level int(obj). With other
constructors of PyLong you are limited by long long (while Python integers may
be arbitrarily large).
Ethan - If you're still short on time I can pretty up this patch and put it
Alexander Belopolsky added the comment:
There are two schools of thought here. One school (MAL and Mark) thinks of
durations as real number of seconds. The other school (Tim and I) think of
durations as integer number of resolution intervals. This is why I and Tim
before me resisted adding
Roundup Robot added the comment:
New changeset ecc8512b427d by Serhiy Storchaka in branch '3.3':
Issue #16741: Fix an error reporting in int().
http://hg.python.org/cpython/rev/ecc8512b427d
New changeset 4fd48a807812 by Serhiy Storchaka in branch 'default':
Issue #16741: Fix an error reporting
Ethan Furman added the comment:
Thanks for the offer, Eli, but I almost have the tests done. :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18264
___
Roundup Robot added the comment:
New changeset ee0bdc007a0f by Martin v. Löwis in branch '2.7':
Issue #16067: Add description into MSI file to replace installer's temporary
name.
http://hg.python.org/cpython/rev/ee0bdc007a0f
--
___
Python tracker
Martin v. Löwis added the comment:
Thanks for the report. This is now fixed on the active branches.
--
nosy: +loewis
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16067
Larry Hastings added the comment:
This broke the test suite on all the 32-bit Linux buildbots. Sample output is
here:
http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/8349/steps/test/logs/stdio
There's no obvious fix, and I want to cut 3.4a1 right about now, so I'm
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16741
Alexander Belopolsky added the comment:
I just want `timedelta / int` to do the same thing in Python 2.7
with __future__.division as `timedelta / int` does in Python 3.
It other words you want to backport timedelta / int true division. I am afraid
it is 3-4 years too late for this request,
Al Korgun added the comment:
Mark Dickinson, #1 if dedug (and type check, respectively, as in this example,
and 'raise') isn't needed we just need pyo
Python won't execute those asserts at all
that is convenient.
if not isinstance(data, basestring):
raise TypeError(...)
- here we need
Terry J. Reedy added the comment:
With that fixed, I am inclined to close this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18570
___
___
Al Korgun added the comment:
Mark Dickinson, sorry, didn't answer the first questiuon.
In your original message, is it your intention that the assert raises
TypeError, or that it raises AssertionError?
I suggest to add the ability to raise relevant (for specific part of code)
exception on
Ethan Furman added the comment:
Okay, patch attached with C code (thanks, Eli!), more python code, and some new
tests.
Only the `int` case is handled.
--
Added file: http://bugs.python.org/file31141/issue18264.stoneleaf.01.patch
___
Python tracker
Changes by Tshepang Lekhonkhobe tshep...@gmail.com:
--
nosy: +tshepang
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18606
___
___
mrDoctorWho0 . added the comment:
Assert with this feature will make code simplest. Simplification isn't python
way? Why don't add it in python? It's must be really useful. Sometimes its
necessary, when need to catch specified exception. Its easier to search errors
by type, not by error body
Alexander Belopolsky added the comment:
Here is the use-case that was presented to support adding additional operations
on timedelta objects:
I'm conducting a series of observation experiments where I
measure the duration of an event. I then want to do various
statistical analysis such as
R. David Murray added the comment:
If your code is catching an exception generated by an assert statement, your
code is using assert incorrectly. There is never any reason, as far as I can
see, to catch an assert outside of a testing framework, and in a testing
framework you definitely want
New submission from Raymond Hettinger:
We can make it easier for users make custom, high-performance builds tailored
to their actual use cases.
Here's an example of how Firefox does it:
https://developer.mozilla.org/en-US/docs/Building_with_Profile-Guided_Optimization
--
components:
New submission from Terry J. Reedy:
[0. On mailing lists, 'lambda expression' is used rather than 'lambda form'.
Docs use both. Consistency across docs is a broader issue than this one. So
leave title alone for this one.]
1. (first sentence) By popular demand, a few features commonly found in
New submission from Serhiy Storchaka:
Now all doctests failed on 32-bit platforms due to the unlucky coincidence of
my patch with at least two bugs which were hided before.
SubPattern.getwidth() is wrong, it truncates resulted values to sys.maxsize
(should be MAXREPEAT). As side effect of my
Roundup Robot added the comment:
New changeset c243896e12be by Serhiy Storchaka in branch '3.3':
Issue #18647: Temporary disable the nothing to repeat check to make buildbots
happy.
http://hg.python.org/cpython/rev/c243896e12be
New changeset 4faf9b73c3df by Serhiy Storchaka in branch
Serhiy Storchaka added the comment:
See issue18647.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17998
___
___
Python-bugs-list mailing list
Ethan Furman added the comment:
Well, aside from not having a clue as to what Chris is trying to do, should we
make _member_type_ public? The only reason I put it there was to aid
introspection -- Enum does not use it.
--
___
Python tracker
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17119
___
___
New submission from Terry J. Reedy:
Functional Programming HowTo, near the end, has a section
Small functions and the lambda expression
http://docs.python.org/3/howto/functional.html#small-functions-and-the-lambda-expression
To illustrate, it starts with
adder = lambda x, y: x+y
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - Tk.split() doesn't work with nested Unicode strings
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
There is a test in test_unicode which expects an UnicodeError for
int('\ud800'). Now it fails. Should we fix a test or int()?
--
resolution: fixed -
status: closed - open
___
Python tracker rep...@bugs.python.org
Alexander Belopolsky added the comment:
This issue is effectively a duplicate #1083 (see msg101281.)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18629
___
Alexander Belopolsky added the comment:
I'd say fix the test. Raising ValueError is correct in this case.
UnicodeError was an implementation artifact.
--
nosy: +belopolsky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16741
Eli Bendersky added the comment:
-1 on making more internals public.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18635
___
___
New submission from Piotr Dobrogost:
According to the docstring of list2cmdline function in subprocess module the
sequence of a backslash followed by a double quote mark should denote double
quote mark in the output string. However it's not the case
Python 2.7.4 (default, Apr 6 2013,
Eli Bendersky added the comment:
Posted a Rietveld code review
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18264
___
___
Python-bugs-list
Alexander Belopolsky added the comment:
I cleaned up the patch a little:
1. Removed now unused static round_to_long() function.
2. Removed commented out code.
Mark,
Any reason not to apply this? Do we need a NEWS entry for something like this?
--
priority: low - normal
stage: test
New submission from Ned Deily:
Testing the 3.4.0a1 OS X 10.6 installer on OS X 10.8, I've now seen test_pydoc
fail twice when the tests are run in order but then passing when the test is
automatically rerun. I've not seen this failure previously.
/usr/local/bin/python3.4 -m test -w
Roundup Robot added the comment:
New changeset 7b023134ad83 by Serhiy Storchaka in branch '3.3':
Issue #16741: Remove testing of implementation artifact.
http://hg.python.org/cpython/rev/7b023134ad83
New changeset 1b4772ab420f by Serhiy Storchaka in branch 'default':
Issue #16741: Remove
Changes by Eli Bendersky eli...@gmail.com:
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3591
___
Alexander Belopolsky added the comment:
With the current patch we still have the following quirks:
timedelta(seconds=0.6112295) == timedelta(seconds=1)*0.6112295
False
timedelta(seconds=0.6112295) == timedelta(seconds=round(0.6112295, 6))
False
This is not a reason to hold the patch, though.
Eli Bendersky added the comment:
Brian - gentle ping
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13368
___
___
Python-bugs-list mailing list
Eli Bendersky added the comment:
I've noticed this is a duplicate of issue #14465. Closing it - let's continue
the discussion there, when the time comes.
--
resolution: - duplicate
stage: needs patch - committed/rejected
status: open - closed
superseder: - xml.etree.ElementTree: add
Eli Bendersky added the comment:
A patch exists in the duplicate #17372
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14465
___
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18647
___
Changes by Tim Peters tim.pet...@gmail.com:
--
nosy: +tim_one
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18647
___
___
Python-bugs-list mailing
Eli Bendersky added the comment:
Could you please refresh the patch for Python 3.3 and 3.4 (_elementtree went
through many changes in 3.3)?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7990
Eli Bendersky added the comment:
Fixed. Thanks!
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17011
___
Roundup Robot added the comment:
New changeset 854ded9135c2 by Eli Bendersky in branch '3.3':
Issue #17011: Fix caching of xpath path when namespaces are present.
http://hg.python.org/cpython/rev/854ded9135c2
New changeset ce0be0d03c0a by Eli Bendersky in branch 'default':
Merge fix for Issue
Changes by Eli Bendersky eli...@gmail.com:
--
nosy: -eli.bendersky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17359
___
___
Python-bugs-list
Eli Bendersky added the comment:
I'm not sure what the issue here is, exactly. Python 2.7 is known for implicit
conversions between ascii and unicode, and this appears to be an artifact of
your data. Note that Python 2.7 only gets fixes for serious bugs at this point.
Can you reproduce this
Eli Bendersky added the comment:
I'm (somewhat) back looking at this. Should the first step be
sys.get_calling_module_name()? I can provide a patch. Re its name, perhaps the
long name isn't that bad given that this is a rather obscure API. But
suggestions for something shorter/better will be
Alexander Belopolsky added the comment:
I would just change my usual course is to avoid using lambda to PEP 8
prescribes using def. Note that PEP 8 itself displays f = lambda x: 2*x as an
example of what not to do. I see no problem with the current examples.
--
nosy: +belopolsky
Steven D'Aprano added the comment:
On 04/08/13 05:31, Alexander Belopolsky wrote:
Alexander Belopolsky added the comment:
Here is the use-case that was presented to support adding additional
operations on timedelta objects:
I'm conducting a series of observation experiments where I
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18606
___
___
Nick Coghlan added the comment:
It occurs to me that operator.index() (without a preceding type check) is
likely the more ducktyping friendly option here.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18264
1 - 100 of 104 matches
Mail list logo