Tomas Hoger tho...@redhat.com added the comment:
+ - If the name of an existing script is passed in ``argv[0]``, its absolute
+ path is prepended to :data:`sys.path`
Absolute path to the directory where script is located. And I believe there's
no absolute path guarantee for platforms
Pascal Chambon chambon.pas...@gmail.com added the comment:
This would require patching separately py2k and py3k visibly...
I'll have a look at it when I have time.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8765
Mark Dickinson dicki...@gmail.com added the comment:
Alexander, I still don't understand your objection. What's the downside of
allowing the multiplication or division of a timedelta by a float?
Perhaps it's true that there are applications where timedeltas are best viewed
as integers (with
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Do you have set the PYTHONHOME environment variable? this does not work from a
build directory.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8760
holger krekel holger.kre...@gmail.com added the comment:
David, your getsourcefile.patch looks fine (and better than mine) to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8720
___
Ray.Allen ysj@gmail.com added the comment:
pakal wrote:
In test_fileio, one of the tests wants to ensure writing to closed raw streams
fails, but it actually tries to write an unicode string
I don't understand. Isn't b'xxx' and 'xxx' the same in py2.x? They are not
unicode string, but
Mark Dickinson dicki...@gmail.com added the comment:
Python reference implementation showing how to do correct rounding.
--
Added file: http://bugs.python.org/file17426/timedelta_arith.py
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
Absolute path to the directory where script is located. And I believe
there's no absolute path guarantee for platforms without realpath /
GetFullPathName.
Yes, this is more precise indeed. As for realpath(), I would expect it
to be present on
Antoine Pitrou pit...@free.fr added the comment:
This was committed in r81392.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4870
Mark Dickinson dicki...@gmail.com added the comment:
N.B. There's already logic for doing div_nearest (i.e., divide one integer by
another, returning the closest integer to the result) in the long_round
function in Objects/longobject.c. It might be worth pulling that logic out and
making it
holger krekel holger.kre...@gmail.com added the comment:
Well, maybe we could introduce a linecache.setlines function to give
the linecache module control over its internal caching and data
handling. What do you think?
--
___
Python tracker
STINNER Victor victor.stin...@haypocalc.com added the comment:
Commited: r81393 (py3k), r81394 (3.1).
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8774
Pascal Chambon chambon.pas...@gmail.com added the comment:
yes, but the same tests are used for py3k as well, where xxx is interpreted
as unicode (2to3 tools dont try to guess if a py2k string intended to be a byte
string or an unicode one).
--
___
Antoine Pitrou pit...@free.fr added the comment:
test_fileio and test_io both use from __future__ import unicode_literals,
which means classical string literals construct unicode strings rather than
byte strings.
So, yes, Pascal is right, this should be corrected (both the tests, and the
STINNER Victor victor.stin...@haypocalc.com added the comment:
Yes, make clean should remove *.a and *.so.* files. The patch looks ok.
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4007
STINNER Victor victor.stin...@haypocalc.com added the comment:
As you explain in your own documentation, the proposed method
is equivalent to ``(time.mktime(self.timetuple()), self.microsecond)``,
so all it does is replacing a less than a one-liner.
a one-liner, but an horrible one liner
Antoine Pitrou pit...@free.fr added the comment:
I agree with Victor that the APIs need improving, even if it involves providing
obvious replacements of obscure one-liners. As an occasional user of datetime
and time modules, I have too often wanted to curse those limited, awkwardly
Changes by Matthias Troffaes matthias.troff...@gmail.com:
Added file:
http://bugs.python.org/file17427/py3k-rev81387-clearfreelist-dict_set_list.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6695
Changes by Matthias Troffaes matthias.troff...@gmail.com:
Added file:
http://bugs.python.org/file17428/py3k-rev81387-clearfreelist-gc_collect.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6695
Changes by Matthias Troffaes matthias.troff...@gmail.com:
Added file:
http://bugs.python.org/file17429/py3k-rev81387-clearfreelist-time_gc_collect.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6695
Matthias Troffaes matthias.troff...@gmail.com added the comment:
I uploaded updates of the three relevant patches against the current revision
of the py3k branch, as the old patches no longer applied cleanly due to
whitespace changes.
To summarize:
* The first patch,
New submission from STINNER Victor victor.stin...@haypocalc.com:
The following code works on 2.6, 2.7 (trunk), 3.1, but not on py3k.
import subprocess, sys
subprocess.call([sys.executable, '-c', 'print(Hello World!)'])
On py3k, sys.stdout and sys.stderr are equal to... None.
I hope that it's
STINNER Victor victor.stin...@haypocalc.com added the comment:
(doesn't work means that the example doesn't print anything)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8780
___
Antoine Pitrou pit...@free.fr added the comment:
It's just under Windows, right?
--
assignee: - brian.curtin
components: +Windows
nosy: +brian.curtin, pitrou
priority: normal - critical
___
Python tracker rep...@bugs.python.org
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com:
If ./configure detects that the system's wchar_t type is compatible, it will
define #define PY_UNICODE_TYPE wchar_t and enable certain optimizations when
converting between Py_UNICODE and wchar_t (i.e., it can just do a
Antoine Pitrou pit...@free.fr added the comment:
The problem with a signed Py_UNICODE is implicit sign extension (rather than
zero extension) in some conversions, for example from char or unsigned char
to Py_UNICODE. The effects could go anywhere from incorrect results to plain
crashes. Not
STINNER Victor victor.stin...@haypocalc.com added the comment:
It's just under Windows, right?
It works on Linux. I suppose that the issue is specific to Windows.
--
title: py3k: child process don't inherit stdout / stdout - py3k: child process
don't inherit stdout / stdout on
STINNER Victor victor.stin...@haypocalc.com added the comment:
Recent change of subprocess in py3k, I don't know if it's related: r78946.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8780
Orlando Irrazabal oirr...@mendoza.gov.ar added the comment:
Amoury, you are right, when i unset the PYTHONHOME environment variable
the program run. The output was:
r...@host:python-2.6.5# ./python -m test.regrtest -w
test_grammar
test_opcodes
test_dict
test_builtin
test_exceptions
test_types
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Usually you wouldn't want to cast a char directly to a Py_UNICODE, because you
need to take into account the encoding of the char and map it to the
appropriate Unicode character. The exception is when you're certain the char
Antoine Pitrou pit...@free.fr added the comment:
Another option would be to test Py_UNICODE_SIZE == SIZEOF_WCHAR_T to
enable the optimizations, instead of defined(HAVE_USABLE_WCHAR_T).
The plus side is that we wouldn't be changing the semantics of
anything.
I guess it's sufficient, indeed.
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Yeah, this is a I noticed this small optimization while working on something
else kind of thing. ;) (something else being Issue8654)
I can make a patch to change the #if's to test Py_UNICODE_SIZE ==
SIZEOF_WCHAR_T, though
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Closing as Invalid. PYTHONHOME should not be set when building Python.
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
STINNER Victor victor.stin...@haypocalc.com added the comment:
Ok, it *is* a regression introduced by r78946. Attached patch fixes the issue
and adds a regression test.
Add also the author of r78946 to the nosy list :-)
--
keywords: +patch
nosy: +gregory.p.smith
Added file:
New submission from holger krekel holger.kre...@gmail.com:
Executing the attached inspect_failure.py under python2.6 or python3.1
results in an assertion error: Python fails to obtain the source code of a
function that is defined at the end of a module whose last line does not
contain a line
Brian Curtin cur...@acm.org added the comment:
Looks fine to me.
The first line of the test comment has if instead of is but you could fix
that on checkin.
--
assignee: brian.curtin - haypo
___
Python tracker rep...@bugs.python.org
Mark Dickinson dicki...@gmail.com added the comment:
py3k patch applied in r81397, with some tweaks:
- fix reference leak (j wasn't being Py_DECREF'd in the long branch)
- remove trailing whitespace
- put 'else' and 'else if' on a new line following a closing brace
- remove unnecessary NULL
Mark Dickinson dicki...@gmail.com added the comment:
Hmm. The current Python 2.7 behaviour really is a mess.
Your patch removes the coercion entirely; I'm not sure that's a good idea:
mightn't this change behaviour for user-defined classes with a __coerce__
method? Maybe it would be
Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
On Fri, May 21, 2010 at 7:26 AM, STINNER Victor rep...@bugs.python.org wrote:
..
... If the tzinfo of the datetime object does not match the
system TZ used by mktime, the result will be quite misleading.
Can you suggest
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6695
___
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6715
___
___
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Patch with unit test attached for MutableSet's:
x ^= x
x -= x
I was wrong about |= and = having a problem. Since they don't mutate the set,
they don't raise an exception (they only .add items that are already in the
set).
Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
On Fri, May 21, 2010 at 7:37 AM, Antoine Pitrou rep...@bugs.python.org wrote:
..
I agree with Victor that the APIs need improving, even if it involves
providing obvious replacements of obscure one-liners.
While I agree
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
assignee: - belopolsky
nosy: -Alexander.Belopolsky
stage: - unit test needed
versions: +Python 3.2 -Python 2.6, Python 3.0
___
Python tracker rep...@bugs.python.org
Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
On Fri, May 21, 2010 at 11:20 AM, Alexander Belopolsky
rep...@bugs.python.org wrote:
..
I believe it should be something like this:
from claendar import timegm
s/claendar/calendar/, of course.
--
nosy:
Meador Inge mead...@gmail.com added the comment:
Hmm. The current Python 2.7 behaviour really is a mess.
No doubt!
Your patch removes the coercion entirely;
Yeah, I know. The funny thing about this is that according to the
documentation [1]:
Arguments to rich comparison methods are
Antoine Pitrou pit...@free.fr added the comment:
The advantage of an obscure one-liner is
that it is obvious what it does, particularly for someone with a
C/UNIX background.
Well, I would argue that the C/Unix legacy in terms of dates and times isn't an
example to follow. Python does not
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
assignee: - belopolsky
nosy: +belopolsky
stage: - unit test needed
type: - feature request
versions: +Python 3.2 -Python 2.7, Python 3.1
___
Python tracker rep...@bugs.python.org
Alexander Belopolsky alexander.belopol...@gmail.com added the comment:
On Fri, May 21, 2010 at 12:20 PM, Antoine Pitrou rep...@bugs.python.org wrote:
..
Well, for example, the datetime module encourages you to use aware datetime
objects (rather than so-called naive objects),
but there isn't
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
nosy: +belopolsky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5094
___
___
Changes by Dave Malcolm dmalc...@redhat.com:
--
nosy: +dmalcolm
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1621
___
___
Python-bugs-list
Antoine Pitrou pit...@free.fr added the comment:
Committed in r81398 (trunk), r81399 (2.6), r81400 (py3k), r81401 (3.1). Thank
you!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
Here is a revised patch based on Benjamin's comments on Rietveld.
--
Added file: http://bugs.python.org/file17433/mapping2.patch
___
Python tracker rep...@bugs.python.org
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
On Thu, May 20, 2010 at 7:27 PM, Antoine Pitrou rep...@bugs.python.org wrote:
.. The OP's premise was that
t.timetuple()[7] was unreadable, but in the modern python, the same
can be written as t.timetuple().tm_yday.
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1436346
___
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com:
At the bottom of the documentation for hashlib, there's a link to
http://www.cryptography.com/cnews/hash.html
which the hashlib documentation describes as Hash Collision FAQ with
information on which algorithms have known
Changes by Adomas Paltanavičius adomas.paltanavic...@gmail.com:
--
nosy: +admp
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1621421
___
___
Georg Brandl ge...@python.org added the comment:
The FAQ can still be found in the internet archive,
http://web.archive.org/web/20070928160638/http://www.cryptography.com/cnews/hash.html
but of course this is not a good link, especially because it's not updated.
I've added the link to the
Georg Brandl ge...@python.org added the comment:
This was due to a review of the programming FAQ not yet having been merged to
the 3.1 branch. Now fixed in r81407.
--
nosy: +georg.brandl
resolution: - fixed
status: open - closed
___
Python tracker
Changes by Christophe Simonis simonis.christo...@gmail.com:
--
nosy: +Christophe Simonis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6715
___
Georg Brandl ge...@python.org added the comment:
Eric should know the exact semantics best.
--
assignee: d...@python - eric.smith
nosy: +eric.smith, georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8691
STINNER Victor victor.stin...@haypocalc.com added the comment:
Fixed by r81403 (py3k).
Even if the issue is a regression specific to 3.x, I backported the new test in
3.1: r81408.
--
resolution: - fixed
status: open - closed
title: py3k: child process don't inherit stdout / stdout on
Benjamin Peterson benja...@python.org added the comment:
Fixed in r81414. Thanks for the patch.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8729
Georg Brandl ge...@python.org added the comment:
Thanks, fixed in r81419.
--
nosy: +georg.brandl
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8724
STINNER Victor victor.stin...@haypocalc.com added the comment:
Attached base64_main.patch fixes errors described in
b64-decode-str-bytes-typeerror.txt.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4769
Georg Brandl ge...@python.org added the comment:
Thanks, fixed in r81431.
--
nosy: +georg.brandl
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8707
Benjamin Peterson benja...@python.org added the comment:
Fixed in r81432 by making linecache smarter.
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8782
Georg Brandl ge...@python.org added the comment:
Thanks, applied in r81450.
--
nosy: +georg.brandl
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8709
STINNER Victor victor.stin...@haypocalc.com added the comment:
Hyeshik Chang commited the fix one year ago in py3k (r71045).
I ported the fix to trunk (r81454) and 2.6 (r81456).
--
nosy: +haypo
resolution: - fixed
status: open - closed
___
Python
STINNER Victor victor.stin...@haypocalc.com added the comment:
Here is a patch for trunk. This bug is minor, and so I don't know if it can be
commited to 2.7.
The patch adds also a test that I added to py3k in r81252:
handle_system_exit() flushs files to warranty the output order
STINNER Victor victor.stin...@haypocalc.com added the comment:
I applied a similar patch to py3k (r81457) to use sys.stderr encoding and error
handler, instead of the default encoding (utf8).
Wait for the buildbot before backporting to 3.1.
--
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
@benjamin.peterson: Do you plan to port r75928 to 2.7 and 3.1? If not, can you
close this issue?
I think that this issue priority is minor because few people write directly
non-BMP characters in Python files (maybe only one, Ezio
STINNER Victor victor.stin...@haypocalc.com added the comment:
Would it be possible to implement a cp65001 codec in Python using
MultiByteToWideChar() / WideCharToMultiByte() with codepage=CP_UTF8?
--
nosy: +haypo
___
Python tracker
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue850997
___
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
The bug is fixed in Python3. I would like to say that you should use Python3
(which has a much better unicode support) instead of Python2 to get such
feature, and that this issue should be closed (as wontfix).
--
nosy:
STINNER Victor victor.stin...@haypocalc.com added the comment:
I patched py3k with mbcs_errors.patch (only encode_mbcs, not the decoder
function) and most test pass: I opened #8784 for test_tarfile failure.
I don't think that it's a problem that mbcs only supports few error handlers,
eg.
STINNER Victor victor.stin...@haypocalc.com added the comment:
Since this change breaks backward compatibility, it's a very bad idea to change
mbcs codec in Python 2.7: remove this version from this issue.
--
versions: -Python 2.7
___
Python
STINNER Victor victor.stin...@haypocalc.com added the comment:
As I wrote in issue #7768: this issue is already fixed in Python3 (getpass
supports unicode prompt) and you should use Python3 instead of Python2 because
Python3 has a much better unicode support. It would be harder to fix Python2,
STINNER Victor victor.stin...@haypocalc.com added the comment:
and that this issue should be closed (as wontfix).
... because this issue has no patch and we are close to 2.7rc1 (and 2.7 should
be the last major version of the 3.x branch).
--
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7983
___
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Fixed: 2.7 (r81459), 2.6 (r81460), 3.2 (r81461), 3.1 (r81462).
--
nosy: +haypo
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
STINNER Victor victor.stin...@haypocalc.com added the comment:
(For your information, io module had the same problem in Python3: it was fixed
in #4862)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6268
Alberto Trevino albe...@byu.edu added the comment:
On Thursday 20 May 2010 07:46:43 am you wrote:
If you don't specify the size, the response of EHLP won't list
SIZE as one of the extensions. But, if a size is specified, then it
will show it on EHLP.
Sorry, the EHLP above should be EHLO.
83 matches
Mail list logo