Serhiy Storchaka added the comment:
You can uses cpXXX encodings explictly to read or write a file, but these
encodings are not used for sys.getfilesystemencoding() (or
sys.stdout.encoding).
At least CP1251 has been used for many cyrillic locales in before-UTF8 age (I
use it sometimes
New submission from Tom Pohl:
According to the documentation of the floor division
(http://docs.python.org/2/reference/expressions.html#binary-arithmetic-operations),
x//y should be equal to math.floor(x/y).
However, the result of 1//0.1 is 9.0 (tested on 2.6, 2.7, 3.2).
It might be related
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +mark.dickinson, skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16460
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16285
___
___
Serhiy Storchaka added the comment:
Yes, this is related to the internal representation of floating-point numbers.
0.1 is 3602879701896397/36028797018963968 in float.
import fractions
fractions.Fraction(0.1)
Fraction(3602879701896397, 36028797018963968)
36028797018963968 / 3602879701896397
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16203
___
___
Mark Dickinson added the comment:
9.0 *is* the correct result here. The number that Python stores for 0.1 is an
approximation that's actually a little greater than 0.1.
--
resolution: - invalid
___
Python tracker rep...@bugs.python.org
Changes by Mark Dickinson dicki...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16460
___
___
Serhiy Storchaka added the comment:
I propose to close this issue as won't fix. A long-UNC prefix support is a
new feature and can't be applied to 2.7. As workaround use splitunc() in
Python prior to 3.1.
--
status: open - pending
___
Python
Tom Pohl added the comment:
Thanks for your comments. From a technical/numerical point of view I agree with
you that the computed result is correct given the floating-point limitations.
From a user's point of view (and the documentation seems to agree with me) the
result is wrong. The
Christian Schubert added the comment:
new proposed fix: forbid concurrent poll() invocation
--
Added file: http://bugs.python.org/file27967/issue8865_v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8865
Mark Dickinson added the comment:
Tom: there's no reasonable way to define all 3 of /, // and % for
floating-point numbers that avoids all user surprises. There are a couple of
notes (nos 2 and 3) at the bottom of the documentation page you refer to that
attempt to explain some of the
Serhiy Storchaka added the comment:
The patch LGTM. I doubt about the exception type. May be RuntimeError is more
appropriate?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8865
___
Christian Schubert added the comment:
I doubt about the exception type. May be RuntimeError is more appropriate?
mea culpa, just copypasted without actually looking; fixed in v3
--
Added file: http://bugs.python.org/file27968/issue8865_v3.diff
___
Martin v. Löwis added the comment:
Tom: you are misinterpreting the docs. It says (paraphrased) that the result of
x//y equals floor(x mathematically-divided-by y), which is different from
floor(x/y). Your computer is not capable of performing the
mathematically-divided-by operation; you have
Serhiy Storchaka added the comment:
Your computer is not capable of performing the mathematically-divided-by
operation; you have to compute it on paper.
You can compute it with Python.
math.floor(1/fractions.Fraction(0.1))
9
--
___
Python
koobs added the comment:
Back to green for all branches on FreeBSD, thank you Victor
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
Stefan Krah added the comment:
The Mountain Lion bots still fail. :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
___
STINNER Victor added the comment:
Back to green for all branches on FreeBSD, thank you Victor
FreeBSD buildbots are green because I disabled the test on undecodable bytes!
See issue #16455 which proposes a fix for FreeBSD and OpenIndiana.
The Mountain Lion bots still fail. :)
Yeah I know,
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16391
___
Nikolay Bryskin added the comment:
Vinay, why do you close this feature request? Proposed workaround is just a
workaround and even doesn't provide some functionality - for example, it seems
impossible to define a terminator using config file.
--
resolution: invalid -
status: closed -
Serhiy Storchaka added the comment:
However, this patch isn't right, since it will cause all source to be
interpreted as UTF-8. This would be wrong when the sys.stdin.encoding is not
UTF-8, and byte string objects are created in interactive mode.
Can you show how to reproduce the error
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15809
___
___
Vinay Sajip added the comment:
Well, the config file format is older and fileConfig() does not cover as much
as dictConfig() does. (For example, filters). I don't propose to spend time
enhancing fileConfig(), now that dictConfig() is available. If you are forced
to use fileConfig(), you can
STINNER Victor added the comment:
macosx-2.patch patches _Py_wchar2char() and _Py_char2wchar() functions to
use UTF-8/surrogateescape for any function using the locale encoding, not
only file related functions of fileutils.h. The patch does also simplify
the code, no more specific #ifdef
Nikolay Bryskin added the comment:
Actually, I'm using dictConfig to load config from json file. And yes, ext://
provides a way to load custom handler, but, as far as I see
(https://github.com/jonashaag/cpython/blob/master/Lib/logging/config.py#L379-404),
there is no possibility to specify
Tom Pohl added the comment:
Thanks for all the explanations why Python's floor division (FD) works as
specified. And I agree, it does work as specified, but still, I think this is
not the behavior that most people would expect and is therefore dangerous to
provide/use.
What do I expect from
Tom Pohl added the comment:
Martin:
Ok, just as you suggested, I did the calculations on a sheet of paper:
floor(1 mathematically-divided-by 0.1) = floor(10) = 10
qed ;-)
--
___
Python tracker rep...@bugs.python.org
Stefan Krah added the comment:
Any programming language that uses binary floats behaves like that
and it is actually what people expect.
If you want behavior that is closer to pencil and paper calculations,
you need to use decimal:
Decimal(1) // Decimal(0.1)
Decimal('10')
Contrast with:
STINNER Victor added the comment:
Hijacking locale.getpreferredencoding() is maybe dangerous. I attached a
new patch, force_ascii.patch, which uses a different approach: be more
strict than mbstowcs(), force the ASCII encoding when:
- the LC_CTYPE locale is C
- nl_langinfo(CODESET) is ASCII or
Martin v. Löwis added the comment:
I think the patch will break on Unix systems that don't have uid_t or gid_t
types.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2005
___
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16455
___
___
Python-bugs-list mailing list
Ronald Oussoren added the comment:
The patch should work on OSX, although I haven't actually tested it yet. I've
verified that sizeof(uid_t) and sizeof(gid_t) are the same for x86_64 and i386,
which means SIZEOF_UID_T doesn't have to be added to pymacconfig.h.
A smal nit with the patch: it
Martin v. Löwis added the comment:
I don't think that using pathconf is an important part of this issue. Instead,
it is more important to deal with ENAMETOOLONG errors. To do so, we should get
rid of all stack allocations of arrays with PATH_MAX/MAXPATHLEN size (also
because they can consume
New submission from Christian Kern:
Writing .wav files is limited to a file size of 2 Gib, while
the WAV file format itself supports up to 4 Gib.
Trying to write a file beyond 2 Gib (e.g. 203 minutes at
CD quality (i.e. 44.1 kHz, 2 channels, 16 bit)) will crash
at the moment when
New submission from mike.a:
The greeting value is required by SPF, and should be returned by SMTPChannel.
This would involve a simple fix by adding self.__greeting to the list of
returned values in the status object
--
messages: 175451
nosy: mike.a
priority: normal
severity: normal
Jesús Cea Avión added the comment:
Mike, could you possibly elaborate more?. I don't understand your bug report.
BTW, Python 2.6 is open only for security bugfixes. Python 2.7, 3.2 and 3.3 are
currently open for regular bugfixes.
--
nosy: +jcea
___
Stefan Krah added the comment:
#15835 has a patch specifically for HP-UX. Also see the link in
msg171068 for evidence that PATH_MAX is quite a mess on HP-UX.
--
nosy: +skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16442
mike.a added the comment:
The greeting value is the HELO/EHLO identity. RFC 4408 (SPF) recommends
checking both the mail from domain as well as the HELO identity, so this value
is useful and could be passed to proc_message() function (API for doing
something useful with this message). Later
Martin v. Löwis added the comment:
The patch looks good, please apply.
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15835
___
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file27926/posix_uid_gid_conv.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2005
___
Serhiy Storchaka added the comment:
I think the patch will break on Unix systems that don't have uid_t or gid_t
types.
I think defines to int will be used on such systems. As I understand the
configure script.
A smal nit with the patch: it uses long long as a type instead of
R. David Murray added the comment:
Are you asking to have seen_greeting passed in the server.process_message call?
That is reasonable.
--
components: +email
nosy: +barry, r.david.murray
versions: +Python 2.6 -Python 2.7, Python 3.1, Python 3.2, Python 3.3
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +Library (Lib) -Extension Modules
stage: - needs patch
versions: +Python 3.2, Python 3.3, Python 3.4 -Python 2.6
___
Python tracker rep...@bugs.python.org
mike.a added the comment:
David,
Yes, that is what I am asking.
Thanks,
-Mike
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16462
___
___
Jesús Cea Avión added the comment:
Python 3.x affected too.
Python 2.6 is open only for security fixes.
4GB support confirmed: https://en.wikipedia.org/wiki/WAV#Limitations
But trying to find a canonical description of the format, I see tons of
inconsistencies. For instance
R. David Murray added the comment:
On the other hand, it would also be backward incompatible.
Can anyone think of a backward compatible way to provide this info? Maybe we
could use the new signature object support.
--
___
Python tracker
Changes by R. David Murray rdmur...@bitdance.com:
--
versions: +Python 3.4 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16462
___
___
Vinay Sajip added the comment:
I don't understand what you mean. For example, defining
def my_handler(*args, **kwargs):
terminator = kwargs.pop('terminator', '!\n')
h = logging.StreamHandler(*args, **kwargs)
h.terminator = terminator
return h
you can use with a definition of
Christian Kern added the comment:
Addendum: 4 Gib file size can only be achieved with unsigned
long. Moreover, for numbers 2^31, signed long and
unsigned long seem to be the same, so there should arise
no problem. (Tested on x86_64 linux)
BTW: Writing .wav files could gain performance it
Tom Pohl added the comment:
Since nobody seems to share my point of view, I give up. :-)
Thanks for your support and for working on Python (the best programming
language as we all know),
Tom
--
___
Python tracker rep...@bugs.python.org
Chromatix added the comment:
Actually many people try to compile python on an environment with freestanding
C library, so this can be a specific case of that. Is there any issue or thread
where compiling python with freestanding headers is discussed? As this relates
to that.
Shall you remove
Terry J. Reedy added the comment:
I agree. Larry H.'s patch in #5799 was called an enhancement and is explicitly
a replacement for splitunc. The latter was deprecated and may disappear in 3.4.
--
resolution: - wont fix
stage: test needed - committed/rejected
status: pending - closed
Roundup Robot added the comment:
New changeset 5db6d9ddf6e8 by Stefan Krah in branch '3.3':
Issue #15835: Define PATH_MAX on HP-UX.
http://hg.python.org/cpython/rev/5db6d9ddf6e8
--
nosy: +python-dev
___
Python tracker rep...@bugs.python.org
Stefan Krah added the comment:
Thanks for reviewing!
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15835
___
Changes by Herc Silverstein h...@schrodinger.com:
--
nosy: +hercs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16458
___
___
Python-bugs-list
Larry Hastings added the comment:
ISTM that fixing this for 3.x (3? 4?) is worthwhile though. Or did somebody
already fix it in 3.x?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15880
Terry J. Reedy added the comment:
Serhiy claims that the commit of Mark's version of your patch in #5799 fixed
this in 3.1. Retesting in IDLE, 3.3, Win7:
import os
d = '//?/e:/python-test/dir'
d = os.path.split(d)[0]
d
'//?/e:/python-test'
d = os.path.split(d)[0]
d
'//?/e:/'
d =
Serhiy Storchaka added the comment:
Alexander, do you want to backport r87736 to 2.7?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16137
___
Serhiy Storchaka added the comment:
Please, review the patches.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9720
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
If nobody has any objections, why not apply this patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1470548
___
Mark Dickinson added the comment:
Patch attached.
--
keywords: +patch
Added file: http://bugs.python.org/file27973/issue16451.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16451
___
Changes by Stefan Neufeind python@stefan-neufeind.de:
--
nosy: +neufeind
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11362
___
___
Mark Dickinson added the comment:
The patch looks okay to me.
What does inheriting from 'ref' buy you? This feels a bit strange to me: the
way I think of it, the WeakMethod *has* a weakref to the underlying object,
rather than *being* a weakref to the underlying object. The __repr__ also
Antoine Pitrou added the comment:
What does inheriting from 'ref' buy you?
Hmm, I'm not sure. I thought I'd mimick KeyedRef's inheritance design, plus
isinstance(..., weakref.ref) works, and composition would make the object
slightly bigger. Other than that, probably nothing.
--
New submission from Antoine Pitrou:
The RHEL buildbot consistently fails on test_timeout:
==
FAIL: testConnectTimeout (test.test_timeout.TCPTimeoutTestCase)
Roundup Robot added the comment:
New changeset 48fbdaf3a849 by Victor Stinner in branch 'default':
Issue #16416: OS data are now always encoded/decoded to/from
http://hg.python.org/cpython/rev/48fbdaf3a849
--
nosy: +python-dev
___
Python tracker
Roundup Robot added the comment:
New changeset f3e512b5ffb3 by Victor Stinner in branch 'default':
Issue #16416: Fix error handling in _Py_wchar2char() _Py_char2wchar() functions
http://hg.python.org/cpython/rev/f3e512b5ffb3
--
___
Python tracker
Roundup Robot added the comment:
New changeset 1b97cc71a05e by Victor Stinner in branch 'default':
Issue #16416: Fix Misc/NEWS entry, mention Mac OS X
http://hg.python.org/cpython/rev/1b97cc71a05e
--
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
@Serhiy: Thanks for your review, I missed it before my first commit.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16416
___
Serhiy Storchaka added the comment:
Victor, are you going to backport this to 3.3?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16416
___
___
STINNER Victor added the comment:
Victor, are you going to backport this to 3.3?
I'm waiting for the result of the buildbots, and maybe also the fix for the
issue #16455 (which has an impact on tests on undecodable bytes).
--
___
Python tracker
Changes by Rafik Draoui ra...@rafik.ca:
Added file: http://bugs.python.org/file27974/patch10395-3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10395
___
Hobs added the comment:
Seems like a great idea. `foo(**dict(args))` is very useful.
I tested `foo(**dict(iter(o.__dict__.items(` on python 2.7 Mac OSX for my
foo and it worked well.
--
nosy: +Hobson.Lane
___
Python tracker
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11076
___
___
Python-bugs-list
Terry J. Reedy added the comment:
The comment about urllib.request forcing .title() is consistent with
'Content-Length' and 'Content-Type' in the docs but puzzling and inconsistent
given that in 3.3, header names are printed .capitalize()'ed and not
.title()'ed and that has_header and
New submission from Terry J. Reedy:
Code based on python-list post by a do-not-wish-to-register urllib user.
import urllib.request
opener = urllib.request.build_opener()
request = urllib.request.Request(http://example.com/;, headers =
{Content-Type: application/x-www-form-urlencoded})
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue812369
___
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6386
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15480
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16163
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16392
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5950
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14228
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16421
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14260
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14369
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14373
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14803
___
___
Python-bugs-list
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16457
___
Raymond Hettinger added the comment:
It's unfortunate that the automatic scalar/tuple switchover design doesn't play
well with start-args. We have the same issue arising in a number of places
(for example, min(*args) isn't happy when args is of length 1).
While inconvenient for variable
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15223
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12703
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15272
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9325
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9914
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15376
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15358
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15577
___
___
Python-bugs-list
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15403
___
___
Python-bugs-list
1 - 100 of 134 matches
Mail list logo