Serhiy Storchaka added the comment:
вівторок, 30-вер-2014 19:26:52 ви написали:
How do I reconstruct an arbitrary OSError error message using the filename
parameter?
if not e.args:
msg = ''
elif len(e.args) == 1:
msg = str(e.args[0])
elif len(e.args) = 5:
msg = '[Error %s] %s' %
Marc-Andre Lemburg added the comment:
Thanks, Serhiy.
The patch looks good, except for one nit: the makelocalealias.py normaly also
generates a list of changes and these are put at the top of the locale_alias
dictionary.
Could you add that as well ?
--
Andreas Schwab added the comment:
https://build.opensuse.org/package/show/openSUSE:Factory:ARM/python3-base
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17873
___
Serhiy Storchaka added the comment:
The makelocalealias.py generates only a list of removes and updates, not
additions.
I recommend first apply issue20076, it will eliminate most additions.
--
___
Python tracker rep...@bugs.python.org
Xavier de Gaye added the comment:
This issue has been entered while checking for duplicate test names in issue
16079.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19113
___
STINNER Victor added the comment:
Oh by the way, I also prefer to revert the commit.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21963
___
Andriy Sokolovskiy added the comment:
I'll try to do this issue.
https://mail.python.org/mailman/private/core-mentorship/2014-October/002766.html
--
nosy: +coldmind
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21574
Georg Brandl added the comment:
Looks good.
sys.stdout, when rebound to a binary mode file
Not sure that is supported in any way :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22492
New submission from Antony Lee:
A small lib improvement suggestion could be to make contextlib.redirect_stdout
and contextlib.suppress inherit from ContextDecorator.
As a side note, the source of contextlib has some classes inheriting explicitly
from object while others don't, so perhaps this
Marc-Andre Lemburg added the comment:
Thanks, Serhiy
The patch looks good. Please apply.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20076
___
Marc-Andre Lemburg added the comment:
On 01.10.2014 09:52, Serhiy Storchaka wrote:
The makelocalealias.py generates only a list of removes and updates, not
additions.
Ah, ok.
I recommend first apply issue20076, it will eliminate most additions.
Agreed. Please apply both patches.
Antoine Pitrou added the comment:
I'm a bit surprised here, since the comma is not the default (US) decimal point.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22494
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
keywords: +easy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21971
___
___
Python-bugs-list
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22001
___
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21999
___
Georg Brandl added the comment:
It's not so surprising, since the string before the milliseconds part is a
strftime() result, not a whole number. The decimal point need not necessarily
be used for this.
Just like the rest of the default time format, it is probably best for the
millisecond
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22531
___
___
Python-bugs-list
Vinay Sajip added the comment:
ISO 8601 governs the format used. From the Wikipedia article on the same:
A decimal mark, either a comma or a dot (without any preference as stated in
resolution 10 of the 22nd General Conference CGPM in 2003, but with a
preference for a comma according to ISO
Eric V. Smith added the comment:
Is there some particular problem you're trying to solve, which this would make
easier?
Without a use case, I'm -1.
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22515
Ram Rachum added the comment:
I needed it for an internal calculation in a combinatorics package I'm writing.
Do you want me to take the time to explain the calculation? It's quite complex.
--
___
Python tracker rep...@bugs.python.org
New submission from Padmanabhan Tr:
Take a complex number n = 3+4j. n.real is taken as 3.0 n.imag as 4.0 in
Python3. One has to use the int(0 function to get back the parts as integers.
I guess this is a compiler error?
--
messages: 228073
nosy: Padmanabhan.Tr
priority: normal
R. David Murray added the comment:
Thank you, Serhiy.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22472
___
___
Python-bugs-list mailing list
R. David Murray added the comment:
-100 on doing this for suppress. That would be exactly the kind of
wrong-headed code that I was worried that context manager would invite.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
Geoffrey Spear added the comment:
From the documentation: Complex numbers have a real and imaginary part, which
are each a floating point number.
Needing to use int() to convert these floats to integers is not a bug, it's the
expected behavior.
--
nosy: +geoffreyspear
Changes by Geoffrey Spear geoffsp...@gmail.com:
--
components: +Interpreter Core
type: compile error - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22532
___
Changes by Eric V. Smith e...@trueblade.com:
--
resolution: - not a bug
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22532
___
Eric V. Smith added the comment:
No need to explain it. It sounds like it's not generally useful, so I'm still
-1.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22515
___
Nick Coghlan added the comment:
Aye, suppress is only intended for use around a single line of code. Using it
for an entire function would be OnError Resume Next levels of poor coding
style.
I'm also -1 on implicitly wrapping redirect_stdout around functions due to the
immediate thread
Friedrich Spee von Langenfeld added the comment:
Excuse me, but it would be nice to fix the documentation of the modules
symtable and compileall too. Thanks.
--
resolution: fixed -
status: closed - open
___
Python tracker rep...@bugs.python.org
Padmanabhan Tr added the comment:
Dear Mr SpearThanks for the prompt response clarification.(in Python) If the
real imaginary parts of numbers you deal with are integers, results of
operations (except division) - like +, -, *, **, - appear with respective
integers as real imginary parts.
Antoine Pitrou added the comment:
Even if you don't find it useful, Eric, it doesn't take up the method space.
You can very easily ignore it, there's no cognitive burden.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22515
Ethan Furman added the comment:
Curiousity question: What happens if you try to sort a list of partially
ordered Counters?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22515
___
Antoine Pitrou added the comment:
If it is so specialized as to only be needed in complex combinatorial
calculations
How do you know it is only needed in complex combinatorial calculations?
What happens if you try to sort a list of partially ordered Counters?
Try it with partially ordered
Ethan Furman added the comment:
If it is so specialized as to only be needed in complex combinatorial
calculations, does it belong in the general-purpose part of the language?
After all, we have the math and cmath modules for more specialized arithmetic
operations.
--
Ram Rachum added the comment:
I don't see why it's so hard to imagine how this will be used. Say I have a
counter signifying how many of each product I have in my warehouse, and I have
another counter saying how many of each product a client wants. I may use
`counter2 = counter1` to check
Ethan Furman added the comment:
-- s1 = set([1])
-- s2 = set([1, 2])
-- s3 = set([1, 2, 3])
-- s4 = set([2])
-- s5 = set([2, 3])
-- s6 = set([3])
-- l = [s1, s2, s3, s4, s5, s6]
-- sorted(l)
[{1}, {2}, {1, 2}, {3}, {2, 3}, {1, 2, 3}]
-- s1 s4
False
-- s4 s2
True
-- s1 s2
True
-- s4 s6
Steven D'Aprano added the comment:
Ethan said:
If it is so specialized as to only be needed in complex combinatorial
calculations, does it belong in the general-purpose part of the
language?
It's a multi-set, a general purpose and fairly fundamental data type.
Changes by Thomas Kluyver tak...@gmail.com:
--
nosy: +takluyver
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9949
___
___
Python-bugs-list
Ethan Furman added the comment:
I'll go with +0.5. :)
If this goes in, I think a missing key in either Counter should default to 0
for purposes of the ordering.
--
stage: - test needed
___
Python tracker rep...@bugs.python.org
Ram Rachum added the comment:
If/when there's general agreement that this functionality should be merged in
(assuming the implementation is acceptable), let me know and I'll be happy to
write the code and tests.
--
___
Python tracker
Roundup Robot added the comment:
New changeset a4da150fbfd4 by Georg Brandl in branch 'default':
Closes #20218: Added convenience methods read_text/write_text and read_bytes/
https://hg.python.org/cpython/rev/a4da150fbfd4
--
nosy: +python-dev
resolution: - fixed
stage: - resolved
Antoine Pitrou added the comment:
Thanks, Georg!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20218
___
___
Python-bugs-list mailing list
Antoine Pitrou added the comment:
I'll go with +0.5. :)
I was going to make a joke about Counters only accepting integral values, but
the constructor is actually quite laxist:
Counter({'a': 2.5})
Counter({'a': 2.5})
Counter({'a': 2.5 + 1j})
Counter({'a': (2.5+1j)})
Counter({'a': 'b'})
Georg Brandl added the comment:
Committed in 18983332626b.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19529
___
Glyph Lefkowitz added the comment:
Would simply replacing this function with pipes.quote resolve the issue?
--
nosy: +glyph
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22187
___
Ethan Furman added the comment:
That does seem odd -- how can you have 'b' of something?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22515
___
Ram Rachum added the comment:
The real problem is that `Counter` was put into the standard library with such
lenient conditions on how it should be used-- basically looking at it as a
`dict` subclass rather than a counter, putting emphasis on implementation
rather than purpose, which was a
Stefan Behnel added the comment:
That does seem odd -- how can you have 'b' of something?
Don't ask this kind of question as long as any math guys are listening.
But seriously, I consider this proposal reasonable. If the problem is that the
counter values can be non-integers, then why not
Ram Rachum added the comment:
Stefan: If you'd want to raise an exception, you'll need to define in which
cases. Should it raise an exception for decimal numbers? Complex numbers? etc.
Personally I'd enjoy it raising exceptions in as many situations as possible
(so we could keep Counter usage
Stefan Behnel added the comment:
I'd raise an exception whenever the values of the Counter turn out to be
uncomparable. If users manage to fill Counters with non-number values that are
comparable amongst each other, or even if each key has a value of a different
type, why not just support
Ethan Furman added the comment:
I have to disagree. The intent is clearly expressed in the docs [1]. However,
if I have a need to deal with partial amounts (say, 2.5 apples because I gave
half of one to my horse ;), Counter will still work with that:
-- treats = Counter({'carrots':12,
Ram Rachum added the comment:
Ah, now I understand you Stefan. That sounds like a good scheme; let any
comparison errors between the values simply propagate up.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22515
Francis MB added the comment:
I have to thank for your time, David!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22512
___
___
anon added the comment:
I noticed feature freeze for 3.5 is in May 2015 which is actually only 7-8
months. It'd be really awesome if this feature could make it. Is there anyone
who can get this into 3.5?
--
status: open - pending
___
Python tracker
Ethan Furman added the comment:
[1] https://docs.python.org/3/library/collections.html#collections.Counter
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22515
___
Changes by Andrej A Antonov polymor...@gmail.com:
--
nosy: +polymorphm
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21356
___
___
Ryan added the comment:
This is not fixed. The documentation may be more correct now, but the behavior
still does not match Python 2 as purported.
The default bufsize changed in 3.3.1 is incorrect, at least when tested in
3.4.0 and 3.4.1.
Here is a test for systems with cat available.
Logan Chien added the comment:
It seems that this is still reproducible with Python 3.5 (dev) by running:
$ gcc test.c `python3-config --includes --ldflags`
cpython-install/lib/python3.5/config-3.5m/libpython3.5m.a(pytime.o): In
function `_PyTime_ObjectToTime_t':
Serhiy Storchaka added the comment:
Thank you Aivars for your patch. I have verified and confirm that this method
works on AIX and True64 UNIX (it should also work on IRIX, but I can't login in
Snakebite's i6).
Here is modified patch. MAC address is now searched only in column with the
Cybjit added the comment:
3f7d5c235d82 runs script, 70ea05f762a1 does not.
0c8f41ca9c94 + t.patch from #21354 does not run script.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22103
___
Roundup Robot added the comment:
New changeset 9b519f72860a by Terry Jan Reedy in branch '3.4':
Issue 22492: Be explicit that print does not support binary mode files.
https://hg.python.org/cpython/rev/9b519f72860a
--
nosy: +python-dev
___
Python
Changes by Terry J. Reedy tjre...@udel.edu:
--
assignee: - terry.reedy
resolution: - fixed
stage: commit review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22492
New submission from Ethan Furman:
According to the docs [1]:
Counter objects have a dictionary interface except that they return a
zero count for missing items instead of raising a KeyError
Which a simple test confirms:
-- Counter()['b']
0
However, if the key is present but set to zero,
Serhiy Storchaka added the comment:
Oh, sorry, issue20076 doesn't eliminate additions in this issue, but vice verse
this issue eliminates some additions of issue20076. So this patch should be
applied first.
--
assignee: - serhiy.storchaka
___
Georg Brandl added the comment:
I see test failures on Windows:
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%20custom/builds/62/steps/test/logs/stdio
http://buildbot.python.org/all/builders/x86%20Windows7%20custom/builds/52/steps/test/logs/stdio
Do the tests need changing
Changes by Georg Brandl ge...@python.org:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19855
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset 7ce56727edc7 by Georg Brandl in branch '3.2':
ref #19855: skip uuid test_find_mac on non-Posix as in later branches
https://hg.python.org/cpython/rev/7ce56727edc7
--
___
Python tracker
Nathan McCorkle added the comment:
I've just got done experiencing this bug. It would be much more helpful if the
error message was a bit more helpful (I had no idea where to start looking with
the ImportError: No module named [moduleStartingMultiprocess] exception
message)
--
nosy:
Mark Lawrence added the comment:
@Peter could you provide a patch for this?
--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4609
___
Roundup Robot added the comment:
New changeset 810542d07b4e by Serhiy Storchaka in branch 'default':
Issue #20079: Added locales supported in glibc 2.18 to locale alias table.
https://hg.python.org/cpython/rev/810542d07b4e
New changeset 00e4190b308f by Serhiy Storchaka in branch '3.4':
Issue
Mark Lawrence added the comment:
@Eric can you provide a doc patch for this?
--
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.1, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9274
Antoine Pitrou added the comment:
@anon: if there is a patch, any committer here can get it into 3.5. You'll
recognize them as they have a nice Python logo next to their usernames ;-) If
you want to try your hand at a patch, see https://docs.python.org/devguide/
By the way, I think it would
Serhiy Storchaka added the comment:
After applying patch from issue20079, pa_pk.utf8, te_in.utf8, and zh_sg.utf8
are eliminated from this patch.
--
assignee: - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
Mark Lawrence added the comment:
@Santiago can you provide a patch for this issue?
--
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.4, Python 3.5 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8138
Mark Lawrence added the comment:
@Ronny can you provide a patch for this?
--
nosy: +BreamoreBoy
type: - behavior
versions: +Python 2.7, Python 3.4, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17446
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: +eli.bendersky, scoder
type: - behavior
versions: +Python 3.4, Python 3.5 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17582
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: +alanmcintyre, serhiy.storchaka
type: - behavior
versions: +Python 3.5 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17753
Roundup Robot added the comment:
New changeset c4284fa75ec7 by Serhiy Storchaka in branch '2.7':
Issue #20076: Added non derived UTF-8 aliases to locale aliases table.
https://hg.python.org/cpython/rev/c4284fa75ec7
New changeset 3bff73df6dab by Serhiy Storchaka in branch '3.4':
Issue #20076:
Mark Lawrence added the comment:
@Matthias can you provide a patch for this?
--
nosy: +BreamoreBoy
type: - enhancement
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17784
Serhiy Storchaka added the comment:
Thank you for your review Marc-Andre.
See also related issue20087.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20079
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20079
___
Mark Lawrence added the comment:
@Matthias can you provide a patch for this?
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17780
___
New submission from TJ:
The following code causes memory usage to grow excessively.
'''
import shelve
def func():
for i in range(100):
sh = shelve.open('blah')
sh.close()
func()
'''
--
components: Library (Lib)
messages: 228127
nosy: tjhnson
priority: normal
New submission from Kristian Rother:
I am trying to create an email address as in the Python doc example
https://docs.python.org/3/library/email-examples.html
The example does not work as given on the page.
I tried Python 3.4rc1 and the 3.5 compiled from source on Ubuntu 12.
I found two
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20076
___
Alex Gaynor added the comment:
Attached patch sound fix the issue. I guess this function has no tests :-(
--
keywords: +needs review, patch
Added file: http://bugs.python.org/file36770/issue22523.diff
___
Python tracker rep...@bugs.python.org
Josh Rosenberg added the comment:
Reading the note on the Counter class (about intent vs. actual use), it looks
like changing this behavior would involve potentially breaking a lot of code.
If you're using Counters that are intended to maintain positive counts
(treating a count = 0 as if the
Alex Gaynor added the comment:
My patch is incomplete, I'm working on an improved one.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22523
___
Alex Gaynor added the comment:
New patch resolves the issue. Turns out there were tests, but they weren't
being run. Now they are.
--
Added file: http://bugs.python.org/file36771/issue22523.diff
___
Python tracker rep...@bugs.python.org
Changes by Ned Deily n...@acm.org:
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22533
___
___
Python-bugs-list mailing list
Cybjit added the comment:
Turns out I had a build problem (#11598).
0c8f41ca9c94 + t.patch does actually solve the problem.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22103
___
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
Added file: http://bugs.python.org/file36772/80eea6bd898c.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1521950
___
Cybjit added the comment:
Building bdist_wininst with VS2010 Express also gives RC1015. With this patch
it works.
--
nosy: +Cybjit
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11598
___
Ned Deily added the comment:
What happens if you use xrange instead of range?
range(100).__sizeof__()
856
xrange(100).__sizeof__()
56
--
nosy: +ned.deily
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22534
Vinay Sajip added the comment:
I've updated the patch on #1521950 to address this case, and also added a test
there (which is not in this patch). Thanks, RDM, for the notification.
--
___
Python tracker rep...@bugs.python.org
paul j3 added the comment:
A simpler solution is to make a copy of each Action when importing a parent
parser. The current practice is to just copy references. With a copy, an
Action will belong to only one group and parser, and the 'resolve' handler will
operate without problems.
In the
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: +steve.dower, tim.golden, zach.ware
type: - compile error
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11598
___
Ethan Furman added the comment:
Exactly what operation is unary minus supposed to be? It seems to act like
absolute value.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22533
___
Steve Dower added the comment:
We could add an afxres.h file alongside install.rc that includes the code
posted by Lorenz Aebi. That will avoid the auto-generation issue, though it may
be overwritten if VS does actually generate code for it.
(I had thought that file was generated on project
Antoine Pitrou added the comment:
Can you try with Python 3.x? The import machinery is different there.
--
nosy: +ncoghlan, pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21614
___
1 - 100 of 124 matches
Mail list logo