Joachim Strombergson [EMAIL PROTECTED] added the comment:
Aloha!
I followed the suggestions in msg74544 by Leo M and can confirm that
IDLE starts as OK.
*BUT* when I try to import Tkinter I get:
import Tkinter
Traceback (most recent call last):
File stdin, line 1, in module
File
New submission from Andre Heider [EMAIL PROTECTED]:
The MSVC build process currently embeds the .manifest file, which is
generated by the MS linker, in the following files:
- python.exe
- pythonXY.dll
- *.pyd
The latter is problematic on machines without the MS CRT redistributable
installed
Andre Heider [EMAIL PROTECTED] added the comment:
Note that this patch will break the loading of compiled modules on
machines without the MS CRT redistributable installed.
See Issue 4120
--
nosy: +aheider
___
Python tracker [EMAIL PROTECTED]
Fredrik Johansson [EMAIL PROTECTED] added the comment:
Some elaboration (that perhaps could be adapted into the documentation
or at least source comments).
There are two primary uses for numbits, both of which justify
(0).numbits() == 0.
The first is that for positive k, n = k.numbits() gives
New submission from STINNER Victor [EMAIL PROTECTED]:
In the C library, fopen() have two arguments: filename and the mode,
and open() has three arguments: filename, mode and flags. In Python,
open() has 7 arguments:
- file
- mode
- buffering
- encoding
- errors
- newline
- closefd
Most
Changes by STINNER Victor [EMAIL PROTECTED]:
Added file: http://bugs.python.org/file11785/explicit_open-fixtests.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4121
___
Martin v. Löwis [EMAIL PROTECTED] added the comment:
I'm skeptical about this patch. It seems like it could produce an
incompatibility with existing installations or deployment procedures. In
any case, the VS 2008 project files are not officially supported.
If VS 2005 is any similar with VS
STINNER Victor [EMAIL PROTECTED] added the comment:
Instead of ASCII, I think that it would be better to use ISO-8859-1
since it's the most common charset.
New patch:
- use ISO-8859-1 as the default charset
- remove set_encoding() method: was it really needed
- use makefile('r',
STINNER Victor [EMAIL PROTECTED] added the comment:
About the number of bits: I prefer an the implementation in int/long
types proposed in issue #3439.
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3724
Andre Heider [EMAIL PROTECTED] added the comment:
Yes, i know that v2.5 doesn't officially support MSVC9. But the same
problem applies to MSVC8 and its CRT. But in contrast to MSVC9, the CRT8
redist is installed on almost every machine, because alot of software
installs it. But thats basically
STINNER Victor [EMAIL PROTECTED] added the comment:
Do you suggest that 'buffering' should be allowed
as positional argument?
No, I would prefer to keep also two positional arguments: file and
mode. I hate open(filename, 'r', s): I don't know what is s, the
buffering or the encoding? And I
STINNER Victor [EMAIL PROTECTED] added the comment:
See also issue #3724 which proposes to support long integers for
math.log2().
--
nosy: +haypo
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3439
STINNER Victor [EMAIL PROTECTED] added the comment:
I changed the title since I agree that numbits() with long integer is
not related to floats.
--
title: math.frexp and obtaining the bit size of a large integer - create a
numbits() method for int and long types
Changes by Mark Dickinson [EMAIL PROTECTED]:
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3439
___
___
Python-bugs-list mailing list
Unsubscribe:
Ralf Schmitt [EMAIL PROTECTED] added the comment:
I hope someone else can test this, as I don't feel like setting up a
windows build environment...
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4122
___
Mark Dickinson [EMAIL PROTECTED] added the comment:
Accidentally removed the following message from Victor Stinner;
apologies. (Time to turn off tap-to-click on my trackpad, methinks.)
See also issue #3724 which proposes to support long integers for
math.log2().
One other note: in
STINNER Victor [EMAIL PROTECTED] added the comment:
Accidentally removed the following message from Victor Stinner
No problem.
Is there any good reason to make this a property?
Since numbits() cost is O(n) with n: number of digits. I prefer a
method than a property because, IMHO, reading a
Bill Janssen [EMAIL PROTECTED] added the comment:
Victor, what kind of content have you tried this with? For instance, have
you passed unencoded (Content-Transfer-Encoding: binary) binary data through
it, by mailing a JPEG, for instance? These things are strings really only
at the application
STINNER Victor [EMAIL PROTECTED] added the comment:
Unless I missed something, numbits() is O(1).
Ooops, you're right. I looked quickly at the patch and I
read while(n) but n is a digit, not the number of digits! So it's
very quick to compute number of bits.
STINNER Victor [EMAIL PROTECTED] added the comment:
socket.makefile() already uses keyword only argument, but buffering is
not a keyword only argument:
def makefile(self, mode=r, buffering=None, *,
encoding=None, newline=None):
___
Terry J. Reedy [EMAIL PROTECTED] added the comment:
I consider .numbits to be an internal property of ints and would prefer
it accessed that way. To me, this sort of thing is what property() is for.
Guido has said that the nuisance of tacking on otherwise unnecessary
empty parens is a warning
Fredrik Johansson [EMAIL PROTECTED] added the comment:
Another tack is to notice that numbits is the length of the bit sequence
representation of an int (excepting 0) and give ints a .__len__ method
;-). I would not expect that suggestion to fly very far, though.
FWIW, I'm one of the people
STINNER Victor [EMAIL PROTECTED] added the comment:
A property /looks/ like an attribute and an user might try to change
its value: x=1; x.numbits = 2 (gives 3 or 4 ? :-))
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3439
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11790/unnamed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1210
___
___
Gregory P. Smith [EMAIL PROTECTED] added the comment:
looks like it already has been merged in py3k.
--
versions: +Python 2.5.3 -Python 3.0
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3863
___
Andre Heider [EMAIL PROTECTED] added the comment:
Ok, point taken, so lets aim at v2.6. Should i open a new issue then?
Attached you'll find a new diff against v2.6. This time pyd_d.vsprops
gets patched too and the linker doesn't even generate a .manifest file.
So no, the *.pyd files do not get
Raymond Hettinger [EMAIL PROTECTED] added the comment:
Properties can be made read-only. Also, there is a good precedent:
c=4+5j; print c.real
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3439
___
STINNER Victor [EMAIL PROTECTED] added the comment:
IMAP_stream() is also broken because it uses os.popen2() which has
been deprecated since long time and now replaced by subprocess.
Here is a patch replacing os.popen2() by subprocess, but also using
transparent conversion from/to unicode
STINNER Victor [EMAIL PROTECTED] added the comment:
what kind of content have you tried this with?
I only tried the most basic commands like capability(). I retried with
search() and... hey, search() has a charset argument!? It should reuse
self.encoding. Same for sort().
Then I tried to
Martin v. Löwis [EMAIL PROTECTED] added the comment:
I'm just repurposing the issue (despite what I usually claim as a policy)
--
resolution: rejected -
status: closed - open
versions: +Python 2.6 -Python 2.5
___
Python tracker [EMAIL PROTECTED]
Changes by Martin v. Löwis [EMAIL PROTECTED]:
Removed file:
http://bugs.python.org/file11783/Python-2.5.2-no.manifest.in.pyd.diff
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4120
___
Don Braffitt [EMAIL PROTECTED] added the comment:
I've just installed Python 2.6 on Mac OS X 10.5.5 and IDLE won't start.
I have the same problem with Python 2.6 IDLE on Mac OS X 10.4.11.
--
nosy: +donbraffitt
___
Python tracker [EMAIL PROTECTED]
Nat [EMAIL PROTECTED] added the comment:
If you look in /Library/Frameworks/Tcl.framework/Versions/, what's
there? How about in /Library/Frameworks/Tcl.framework/Versions/8.5/?
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4017
Martin v. Löwis [EMAIL PROTECTED] added the comment:
Yes, i know that v2.5 doesn't officially support MSVC9. But the same
problem applies to MSVC8 and its CRT.
The point is that even the MSVC8 project files are not supported.
They have been included, but they are not actually used for
STINNER Victor [EMAIL PROTECTED] added the comment:
Ok for UTF-8 which is a superset of ASCII and raise an error when
trying to decode Latin1 or KOI-8.
You need to have a possibility to change encoding after object
creation
If you share a connection for the different groups, you will have
Mark Dickinson [EMAIL PROTECTED] added the comment:
One more minor deficiency in the patch: it gives incorrect results for
very large integers. For example, on a 32-bit build of the trunk:
x = 1 2**31-1
x = 2**31-1
x.numbits() # expect 4294967295
4294967295L
x = 2
x.numbits() # expect
Bill Janssen [EMAIL PROTECTED] added the comment:
Maybe the first thing to do is to expand the Lib/test/test_imaplib.py
file, which right now is pretty darn minimal. We really need an IMAP
server somewhere to test against, with a standard library of varied
messages.
Perhaps Python.org is
Roumen Petrov [EMAIL PROTECTED] added the comment:
May be OutputDebugStringA has to be part of wince-port library but if
is fine all win platforms to call *W what about patch to use function
MultiByteToWideChar() ?
___
Python tracker [EMAIL PROTECTED]
Changes by Martin v. Löwis [EMAIL PROTECTED]:
--
resolution: - rejected
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4120
___
STINNER Victor [EMAIL PROTECTED] added the comment:
I think that telnet should only use bytes (and not characters). For an
HTTP connection, the charset is only known after parsing the HTTP
headers. So telnet should use bytes, and your HTTP browser will
convert bytes to characters using the
Martin v. Löwis [EMAIL PROTECTED] added the comment:
May be OutputDebugStringA has to be part of wince-port library but if
is fine all win platforms to call *W what about patch to use function
MultiByteToWideChar() ?
Is there a problem with the proposed patch?
STINNER Victor [EMAIL PROTECTED] added the comment:
Here is a patch for imaplib:
- add encoding attribute to IMAP4 class (as ftplib and see also issue
3727 for my poplib patch)
- use makefile('r', encoding=self.encoding) instead of a binary file
(mode='rb')
- remove duplicate code in
Benjamin Peterson [EMAIL PROTECTED] added the comment:
The patch looks pretty straightforward to me. If somebody else gives
their nod, I'll apply it.
--
assignee: - benjamin.peterson
nosy: +benjamin.peterson
___
Python tracker [EMAIL PROTECTED]
Fredrik Johansson [EMAIL PROTECTED] added the comment:
One other note: in Fredrik's patch there's commented out code for a
numbits *property* (rather than a method). Is there any good reason to
make this a property?
Aesthetically, I think numbits as a function would make more sense.
Mark Dickinson [EMAIL PROTECTED] added the comment:
Note that log2(int) - float wouldn't entirely replace
numbits, due to loss of precision in the result.
e.g. log2(2**100), log2(2**100+1) and log2(2**100-1) would likely all
return exactly the same result (100.0), where numbits wants results
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
It's true that the order of arguments is difficult to remember
correctly. However I think this deserves Guido's approval.
About the implementation:
To build the kw dict, did you consider using Py_BuildValue?
Something like:
kw =
Ulrich Eckhardt [EMAIL PROTECTED] added the comment:
If this patch required for CE 5.0?
The patch I created is required for all CEs that I know of. I have
personally worked with 4.20, 5 and now 6, and had some exchange with
others who worked on 3.x variants to get STLport (C++ stdlibrary
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11786/imaplib_unicode.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1210
___
Guido van Rossum [EMAIL PROTECTED] added the comment:
This is certainly out of scope for 3.0. Remember, for 3.0 we're trying
to get a release out of the door, not cram in new features, no matter
how small.
Beyond 3.0, I'm still rather reluctant -- I expect most users will be
wise and use
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
Committed r66891 (trunk) and r66892 (release26-maint).
Thanks for the report and the patch!
In the meantime, you may use _PyUnicode_IsWhitespace(ch), like the 2.5
version did.
--
resolution: - fixed
status: open - closed
New submission from paul rubin [EMAIL PROTECTED]:
This is observed in Python 2.5.1, I haven't tried any later versions.
d = collections.deque(xrange(10))
random.shuffle(d)
is quite slow. Increasing the size to 200k, 300k, etc. shows that the
runtime increases quadratically or worse. It's
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
Do you suggest that 'buffering' should be allowed as positional argument?
This would help with migration from 2.x, where open() accepts 3
positional arguments:
open(...)
open(name[, mode[, buffering]]) - file object
And no need
STINNER Victor [EMAIL PROTECTED] added the comment:
You can try this patch for Python.
--
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file11789/export_Py_ascii_whitespace.patch
___
Python tracker [EMAIL PROTECTED]
STINNER Victor [EMAIL PROTECTED] added the comment:
The server can send raw 8 bits email in any charset (charset is
specified in the email headers). That's why I think that it's better
to keep bytes instead of the unicode conversion using a fixed charset.
Each email can use a different
Benjamin Peterson [EMAIL PROTECTED] added the comment:
Closing in favor of #2876.
--
nosy: +benjamin.peterson
resolution: - duplicate
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2046
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11795/imaplib_bytes-2.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1210
___
STINNER Victor [EMAIL PROTECTED] added the comment:
Oops, my previous patch didn't include changes to the documentation.
New patch changes:
- fix the documentation: os.popen2() = subprocess.Popen(); no more
ssl() method: use socket()
- use a buffer of 4096 bytes in read() method (as
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
Yes, the patch is good.
I think that documentation (both Doc\library\telnetlib.rst and the
docstrings in telnetlib.py) should reflect the change, at least the code
samples.
--
nosy: +amaury.forgeotdarc
New submission from STINNER Victor [EMAIL PROTECTED]:
The -bb (raise ByteWarning error) is useful for debugging and needed
to improve bytes/unicode distinction in Python3. Here is a small patch
to always run Python with -bb option.
The patch helps issue3988 test.
--
files:
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11647/bytes_ne_warning-2.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3988
___
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11648/test_bytes.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3988
___
STINNER Victor [EMAIL PROTECTED] added the comment:
New patch including the test. The test doesn't fail anymore if -bb is
not set (test is just ignored). See also issue #4125 (force -bb option
for runtests.sh).
Added file: http://bugs.python.org/file11798/bytes_ne_warning-3.patch
STINNER Victor [EMAIL PROTECTED] added the comment:
My patch causes a crash with:
import sys
try:
raise Exception(hm!)
except:
t, v, tb = sys.exc_info()
tb.tb_frame = {}
raise t, v, tb
Change tb.tb_frame value is not a good idea. It's better to clear
locals/globals: see
New submission from STINNER Victor [EMAIL PROTECTED]:
Python3 skips environment variables which can not be parsed and
decoded as unicode strings. But exec*() functions keep the original
environment and so the child process environment is different than the
Python environement (than
STINNER Victor [EMAIL PROTECTED] added the comment:
Note: I don't have Windows at home to test my patch on Windows. At
least, the patch works correctly on Ubuntu Gutsy/i386.
Example to demonstrate the issue:
$ env -i a=a b=$(echo -e '--\xff--') c=c ./python -c import os;
STINNER Victor [EMAIL PROTECTED] added the comment:
while+strcmp() in _Py_unsetenv() is useless since we already get the
pointer to the evil variable. The new patch is shorter.
Added file: http://bugs.python.org/file11800/unsetenv-2.patch
___
Python tracker
Changes by STINNER Victor [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file11799/unsetenv.patch
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4126
___
STINNER Victor [EMAIL PROTECTED] added the comment:
See also issue #4126 which is the opposite :-)
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4006
___
___
STINNER Victor [EMAIL PROTECTED] added the comment:
See also issue #4006 which asks the opposite (keep invalid variables,
even in os.environ(b)) :-)
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4126
___
Toshio Kuratomi [EMAIL PROTECTED] added the comment:
Yep :-) I am against throwing away valid data just because we can't
interpret it automatically. Environment variables in Unix hold bytes.
Those bytes are usually ASCii characters, however, they do not have to
be. This is a case of being on
New submission from David W. Lambert [EMAIL PROTECTED]:
http://docs.python.org/dev/3.0/library/reprlib.html#module-reprlib
names the module reprlib.
However, the example at bottom of page uses:
http://docs.python.org/dev/3.0/library/reprlib.html#subclassing-repr-
objects
import repr
Benjamin Peterson [EMAIL PROTECTED] added the comment:
Thanks for the report! Fixed in r66897.
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4127
Martin v. Löwis [EMAIL PROTECTED] added the comment:
Committed as r66901
--
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue4072
___
73 matches
Mail list logo