Re: [Python-Dev] Problem with svn on community buildbot
Martin> Well - can you resolve `svn.python.org' on that machine Martin> (e.g. when using ping(1))? Yup: $ host svn.python.org svn.python.org has address 82.94.164.164 svn.python.org has IPv6 address 2001:888:2000:d::a4 $ ping svn.python.org PING svn.python.org (82.94.164.164): 56 data bytes 64 bytes from 82.94.164.164: icmp_seq=0 ttl=50 time=134.041 ms 64 bytes from 82.94.164.164: icmp_seq=1 ttl=50 time=135.441 ms 64 bytes from 82.94.164.164: icmp_seq=2 ttl=50 time=135.352 ms ^C --- svn.python.org ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 134.041/134.945/135.441/0.640 ms $ telnet svn.python.org 80 Trying 82.94.164.164... Connected to svn.python.org. Escape character is '^]'. ^] telnet> quit Connection closed. Skip ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Problem with svn on community buildbot
I don't know is this is related, but from my end, access to svn.python.org has been extremely slow recently: $ time curl -o /dev/null http://svn.python.org % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 353 100 3530 0 4 0 0:01:28 0:01:15 0:00:13 0 real1m15.045s user0m0.004s sys 0m0.004s I've seen similar slowdowns accessing bugs.python.org, but not now. It looks like it has something to do with IPv6: $ host svn.python.org svn.python.org has address 82.94.164.164 svn.python.org has IPv6 address 2001:888:2000:d::a4 $ time curl -v -o /dev/null http://svn.python.org * About to connect() to svn.python.org port 80 (#0) * Trying 2001:888:2000:d::a4... Operation timed out * Trying 82.94.164.164... connected ... No slowdown when IPv6 lookup is disabled with -4 option to curl: $ time curl -4 -o /dev/null http://svn.python.org % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 353 100 3530 0774 0 --:--:-- --:--:-- --:--:-- 0 real0m0.463s user0m0.004s sys 0m0.004s On Sun, Dec 14, 2008 at 8:58 AM, wrote: > >Martin> Well - can you resolve `svn.python.org' on that machine >Martin> (e.g. when using ping(1))? > > Yup: > >$ host svn.python.org >svn.python.org has address 82.94.164.164 >svn.python.org has IPv6 address 2001:888:2000:d::a4 >$ ping svn.python.org >PING svn.python.org (82.94.164.164): 56 data bytes >64 bytes from 82.94.164.164: icmp_seq=0 ttl=50 time=134.041 ms >64 bytes from 82.94.164.164: icmp_seq=1 ttl=50 time=135.441 ms >64 bytes from 82.94.164.164: icmp_seq=2 ttl=50 time=135.352 ms >^C >--- svn.python.org ping statistics --- >3 packets transmitted, 3 packets received, 0% packet loss >round-trip min/avg/max/stddev = 134.041/134.945/135.441/0.640 ms >$ telnet svn.python.org 80 >Trying 82.94.164.164... >Connected to svn.python.org. >Escape character is '^]'. >^] >telnet> quit >Connection closed. > > Skip > ___ > Python-Dev mailing list > [email protected] > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/alexander.belopolsky%40gmail.com > ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Reindenting the C code base?
On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou wrote: > Guido van Rossum python.org> writes: >> >> I think we should not do this. We should use 4 space indents for new >> files, but existing files should not be reindented. > > Well, right now many files are indented with a mix of spaces and tabs, > depending > on who did the edit and how their editor was configured at the time. That's a shame. We used to have more rigorous standards than allowing that. > Perhaps a graceful policy would be to mandate that all new edits be made with > spaces without touching other functions in the file. Then hopefully the code > base would gradually converge to a tabless scheme. I don't think so. I find local consistency more important than global consistency. A file can become really hard to read when different indentation schemes are used in random parts of the code. If you have a problem configuring your editor, just say so and someone will explain how to do it. --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Problem with svn on community buildbot
Alexander> It looks like it has something to do with IPv6: Alexander> $ host svn.python.org svn.python.org has address Alexander> 82.94.164.164 svn.python.org has IPv6 address Alexander> 2001:888:2000:d::a4 ... Alexander> No slowdown when IPv6 lookup is disabled with -4 option to Alexander> curl: ... But I have no problem on my laptop which is sitting right next to the G5 which is having problems. Both show an IPv6 address for svn.python.org. Skip ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Reindenting the C code base?
On Sun, Dec 14, 2008 at 8:26 AM, Guido van Rossum wrote: > On Sat, Dec 13, 2008 at 2:11 PM, Antoine Pitrou wrote: >> Guido van Rossum python.org> writes: >>> >>> I think we should not do this. We should use 4 space indents for new >>> files, but existing files should not be reindented. >> >> Well, right now many files are indented with a mix of spaces and tabs, >> depending >> on who did the edit and how their editor was configured at the time. > > That's a shame. We used to have more rigorous standards than allowing that. > >> Perhaps a graceful policy would be to mandate that all new edits be made with >> spaces without touching other functions in the file. Then hopefully the code >> base would gradually converge to a tabless scheme. > > I don't think so. I find local consistency more important than global > consistency. A file can become really hard to read when different > indentation schemes are used in random parts of the code. > > If you have a problem configuring your editor, just say so and someone > will explain how to do it. I've never figured out how to configure emacs to deduce whether the current file uses spaces or tabs and has a 4 or 8 space indent. I always try to get it right anyway, but it'd be a lot more convenient if my editor did it for me. If there are such instructions, perhaps they should be added to PEPs 7 and 8? Thanks, Jeffrey ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Reindenting the C code base?
Jeffrey Yasskin gmail.com> writes: > > I've never figured out how to configure emacs to deduce whether the > current file uses spaces or tabs and has a 4 or 8 space indent. Same question for Kate! Although I guess that if emacs isn't able to do it, Kate won't do it either... (Kate allows configuring on a directory basis, on a file extension basis, but not on a filename basis) Regards Antoine. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Reindenting the C code base?
On Sat, Dec 13, 2008 at 5:11 PM, Antoine Pitrou wrote: > Guido van Rossum python.org> writes: >> >> I think we should not do this. We should use 4 space indents for new >> files, but existing files should not be reindented. > > Well, right now many files are indented with a mix of spaces and tabs, > depending > on who did the edit and how their editor was configured at the time. > Personally, I think the indentation of, at least, Objects/unicodeobject.c should be fixed. This file has become so mixed-up with tab and space indents that I have no-idea what to use when I edit it. Just to give an idea how messy it is, they are 5214 lines indented with tabs and 4272 indented with spaces (out the 9733 of the file). -- Alexandre ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Reindenting the C code base?
On Sun, Dec 14, 2008 at 12:43 PM, Jeffrey Yasskin wrote: > I've never figured out how to configure emacs to deduce whether the > current file uses spaces or tabs and has a 4 or 8 space indent. I > always try to get it right anyway, but it'd be a lot more convenient > if my editor did it for me. If there are such instructions, perhaps > they should be added to PEPs 7 and 8? > I know python-mode is able to detect indent configuration of python code automatically, but I don't know if c-mode is able to. Personally, ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Reindenting the C code base?
On Sun, Dec 14, 2008 at 12:57 PM, Alexandre Vassalotti
wrote:
> On Sun, Dec 14, 2008 at 12:43 PM, Jeffrey Yasskin wrote:
>> I've never figured out how to configure emacs to deduce whether the
>> current file uses spaces or tabs and has a 4 or 8 space indent. I
>> always try to get it right anyway, but it'd be a lot more convenient
>> if my editor did it for me. If there are such instructions, perhaps
>> they should be added to PEPs 7 and 8?
>>
>
> I know python-mode is able to detect indent configuration of python
> code automatically, but I don't know if c-mode is able to. Personally,
>
[sorry, in gmail made it send my unfinished email]
Personally, I use auto-mode-alist to make Emacs choose the indent
configuration to use automatically.
Here's how it looks like for me:
(defmacro def-styled-c-mode (name style &rest body)
"Define styled C modes."
`(defun ,name ()
(interactive)
(c-mode)
(c-set-style ,style)
,@body))
(def-styled-c-mode python-c-mode "python"
(setq indent-tabs-mode t
tab-width 8
c-basic-offset 8))
(def-styled-c-mode py3k-c-mode "python"
(setq indent-tabs-mode nil
tab-width 4
c-basic-offset 4))
(setq auto-mode-alist
(append '(("/python.org/python/.*\\.[ch]\\'" . python-c-mode)
("/python.org/.*/.*\\.[ch]\\'" . py3k-c-mode)) auto-mode-alist))
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 2to3 question about fix_imports.
On Fri, Dec 12, 2008 at 11:39 AM, Lennart Regebro wrote: > The fix_imports fix seems to fix only the first import per line that you have. > So if you do for example > import urllib2, cStringIO > it will not fix cStringIO. > > Is this a bug or a feature? :-) If it's a feature it should warn at > least, right? > Which revision of python are you using? I tried the test-case you gave and 2to3 translated it perfectly. -- Alexandre a...@helios:~$ cat test.py import urllib2, cStringIO s = cStringIO.StringIO(urllib2.randombytes(100)) a...@helios:~$ 2to3 test.py RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal RefactoringTool: Skipping implicit fixer: ws_comma --- test.py (original) +++ test.py (refactored) @@ -1,3 +1,3 @@ -import urllib2, cStringIO +import urllib.request, urllib.error, io -s = cStringIO.StringIO(urllib2.randombytes(100)) +s = io.StringIO(urllib2.randombytes(100)) RefactoringTool: Files that need to be modified: RefactoringTool: test.py ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 2to3 question about fix_imports.
On Sun, Dec 14, 2008 at 19:19, Alexandre Vassalotti wrote: > Which revision of python are you using? I tried the test-case you gave > and 2to3 translated it perfectly. 3.0, I haven't tried with trunk yet, and possibly it's a more complicated usecase. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 2to3 question about fix_imports.
On Sun, Dec 14, 2008 at 1:34 PM, Lennart Regebro wrote: > On Sun, Dec 14, 2008 at 19:19, Alexandre Vassalotti > wrote: >> Which revision of python are you using? I tried the test-case you gave >> and 2to3 translated it perfectly. > > 3.0, I haven't tried with trunk yet, and possibly it's a more > complicated usecase. Strange, fix_imports in Python 3.0 (final) looks fine. If you can come up with a reproducible example, please open a bug on bugs.python.org and set me as the assignee (my user id is alexandre.vassalotti). Thanks, -- Alexandre ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 2to3 question about fix_imports.
On Sun, Dec 14, 2008 at 19:49, Alexandre Vassalotti wrote: >> 3.0, I haven't tried with trunk yet, and possibly it's a more >> complicated usecase. > > Strange, fix_imports in Python 3.0 (final) looks fine. If you can come > up with a reproducible example, please open a bug on bugs.python.org > and set me as the assignee (my user id is alexandre.vassalotti). Actually, it wasn't more complex, but it was completely different. It doesn't have anything with the amount of statements, but it's specifically if you have urlparse in the imports that breaks it. I'll open a bug report. -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] 2to3 question about fix_imports.
On Sun, Dec 14, 2008 at 20:02, Lennart Regebro wrote: > On Sun, Dec 14, 2008 at 19:49, Alexandre Vassalotti > wrote: >>> 3.0, I haven't tried with trunk yet, and possibly it's a more >>> complicated usecase. >> >> Strange, fix_imports in Python 3.0 (final) looks fine. If you can come >> up with a reproducible example, please open a bug on bugs.python.org >> and set me as the assignee (my user id is alexandre.vassalotti). > > Actually, it wasn't more complex, but it was completely different. It > doesn't have anything with the amount of statements, but it's > specifically if you have urlparse in the imports that breaks it. I'll > open a bug report. I couldn't assign it to you, so here goes: http://bugs.python.org/issue4664 -- Lennart Regebro: Zope and Plone consulting. http://www.colliberty.com/ +33 661 58 14 64 ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Problem with svn on community buildbot
> I don't know is this is related It shouldn't. AFAIK, buildbot makes its internet connections through twisted, and twisted doesn't use IPv6. Also, the diagnostics (cannot resolve name) doesn't match connectivity problems. > $ time curl -v -o /dev/null http://svn.python.org > * About to connect() to svn.python.org port 80 (#0) > * Trying 2001:888:2000:d::a4... Operation timed out Hmm. Can you debug this further? Do you have IPv6 connectivity at all? Do you have a global v6 address? What happens if you do a v6 traceroute? Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Reindenting the C code base?
> I've never figured out how to configure emacs to deduce whether the > current file uses spaces or tabs and has a 4 or 8 space indent. If it is now official policy that different files use different styles, then I think it would be helpful to put Emacs variables at the end of each file. See the end of Objects/unicodeobject.c for an example. I'm not aware of a builtin function that adjusts c-mode automatically; I could fine a package that does some basic guessing, though: http://members.iinet.net.au/~bethandmark/elisp/mst-guess-indentation.el http://www.emacswiki.org/cgi-bin/emacs/guess-offset.el I've tried the second one briefly. It guesses c-basic-offset fairly well, but doesn't attempt to guess indent-tabs. This one does; I haven't tried it yet: https://savannah.nongnu.org/projects/dtrt-indent/ http://git.savannah.gnu.org/gitweb/?p=dtrt-indent.git;a=blob_plain;f=dtrt-indent.el;hb=HEAD Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Reindenting the C code base?
> Personally, I think the indentation of, at least, > Objects/unicodeobject.c should be fixed. This file has become so > mixed-up with tab and space indents that I have no-idea what to use > when I edit it. Just to give an idea how messy it is, they are 5214 > lines indented with tabs and 4272 indented with spaces (out the 9733 > of the file). As an Emacs variables block is present in the file, I would consider this normative, and declare that the official indenting is 4 spaces for the file, no tabs. Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] How to force export of a particular symbol from python.exe?
Hi all, I'm having some trouble making some bits of the Python core code available to extension modules. Specifically, I'm trying to add a function 'Py_force_to_memory' to Python/pymath.c and then use it (via a macro) from Modules/cmathmodule.c. But importing of the cmath module fails with a 'Symbol not found' error. The function is declared with a 'PyAPI_FUNC' in Python/pymath.h. Here's the relevant portion of the make output: *** WARNING: renaming "cmath" since importing it failed: dlopen(build/lib.macosx-10.3-i386-2.7/cmath.so, 2): Symbol not found: _Py_force_to_memory Referenced from: /Users/dickinsm/python_source/branches/trunk/build/lib.macosx-10.3-i386-2.7/cmath.so Expected in: dynamic lookup This is a non-debug trunk build, on OS X (10.5.5), with all the defaults. I'm using Apple's standard toolchain (gcc 4.0.1, Darwin linker). The patch I'm building with can be seen at: http://bugs.python.org/issue4575 (It's the first of the two patches there, called 'force_to_memory.patch'.) I think I understand the cause of this problem; I just don't know how to fix it. The cause seems to be that none of the symbols in pymath.o is used in the Python executable; they're used only in the extension modules. So while the '_Py_force_to_memory' symbol appears in libpython2.7.a, it doesn't appear in the python.exe executable; hence the above error. If I move the definition of Py_force_to_memory from Python/pymath.c to Objects/floatobject.c then everything works as expected. Questions: (1) Is this an OS X only problem? (2) Is there an easy way to force a particular symbol (or all the symbols from a particular object file) to be exported in the Python executable, so that it's available to a dynamically loaded extension module? I've found the -u option to gcc, but this doesn't seem like a particularly portable solution. Of course, if this problem exists only on OS X, then the solution doesn't need to be portable. Thanks, Mark ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Reindenting the C code base?
> Same question for Kate! Although I guess that if emacs isn't able to do it, > Kate > won't do it either... > > (Kate allows configuring on a directory basis, on a file extension basis, but > not on a filename basis) I guess it would be possible to write a Kate plugin that does that. Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] How to force export of a particular symbol from python.exe?
> (1) Is this an OS X only problem? Probably not. If nothing of pymath.c is actually needed when linking the python executable, pymath.o will be excluded by the linker. > (2) Is there an easy way to force a particular symbol (or all the > symbols from a particular object file) to be exported in the Python > executable, so that it's available to a dynamically loaded extension > module? That's not the issue. Had pymath.o been linked into python, it's symbols would have been exported (is that proper use of English tenses?) To fix this, I see three solutions 1. Explicitly link the module to extensions which are known to require it, e.g. by explicitly adding it to the sources in setup.py. That might cause duplications, but would IMO be the cleanest solution (python.exe has no business in exporting standard math functions, IMO) 2. Explicitly link pymath.o to python.exe, instead of integrating it into libpythonxy.a. If the symbols need to be exposed through python.exe (for whatever reason), this is the clean way to do it. 3. Implicitly force linkage, by adding a dummy symbol to pymath.o which gets referenced from an object known to be linked into the interpreter. This has the least impact on the build process, but is the most hackish approach (IMO). Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Reindenting the C code base?
Martin v. Löwis v.loewis.de> writes: > > I guess it would be possible to write a Kate plugin that does that. Or perhaps more simply, Kate allows modelines at the beginning and at the end of source files. I don't know if it's ok to add these to the code base though. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Problem with svn on community buildbot
Please see below for more svn debugging, but now I also traced down the delays I observe when I go to bugs.python.com to the same issue. The offending download is the style sheet and that explains why curl does not show it when pointed to the main page: $ curl -v -o /dev/null http://python.org/styles/screen-switcher-default.css * About to connect() to python.org port 80 (#0) * Trying 2001:888:2000:d::a2... Operation timed out The offending main page element is: $ curl http://bugs.python.org 2>/dev/null | grep screen-switcher-default http://python.org/styles/screen-switcher-default.css"; type="text/css" id="screen-switcher-stylesheet" rel="stylesheet" /> On Sun, Dec 14, 2008 at 2:55 PM, "Martin v. Löwis" wrote: .. >> $ time curl -v -o /dev/null http://svn.python.org >> * About to connect() to svn.python.org port 80 (#0) >> * Trying 2001:888:2000:d::a4... Operation timed out > > Hmm. Can you debug this further? > > Do you have IPv6 connectivity at all? I don't think so. > Do you have a global v6 address? No, only private inet6 address: $ ifconfig en0 en0: flags=8863 mtu 1500 inet6 fe80::21f:5bff:fef3:c0a4%en0 prefixlen 64 scopeid 0x4 inet 192.168.1.6 netmask 0xff00 broadcast 192.168.1.255 ... > What happens if you do a v6 traceroute? > $ traceroute6 -v svn.python.org traceroute6 to svn.python.org (2001:888:2000:d::a4) from fdbd:a375:403a:51c6:21f:5bff:fef3:c0a4, 30 hops max, 12 byte packets 1 * 24 bytes from fe80::216:cbff:fec1:c94c%en0 to fe80::21f:5bff:fef3:c0a4: icmp type 136 (Neighbor Advertisement) code 0 : fe80 0216cbff fec1c94c 0010: 32 bytes from fe80::216:cbff:fec1:c94c%en0 to fe80::21f:5bff:fef3:c0a4: icmp type 135 (Neighbor Solicitation) code 0 : fe80 021f5bff fef3c0a4 0010: 01010016 cbc1c94c * * ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] How to force export of a particular symbol from python.exe?
On Sun, Dec 14, 2008 at 9:06 PM, "Martin v. Löwis" wrote: > That's not the issue. Had pymath.o been linked into python, it's > symbols would have been exported (is that proper use of English > tenses?) Sounds right to me. > > To fix this, I see three solutions > > [...] Thanks for this; this gives me a clearer idea of how things might be solved. > (python.exe has no business in exporting > standard math functions, IMO) It's a little bit messy: some bits of pymath.c (hypot, and possibly copysign) are needed in the core, but only on platforms whose math libraries haven't caught up with C99. The rest is only (possibly) needed in the math and cmath modules. In fact, on OS X none of pymath.c is needed at all, which results in lots of "ranlib: file: libpython2.7.a(pymath.o) has no symbols" in the build output... I'll try to find a non-hackish solution. Mark ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Problem with svn on community buildbot
I've found a work-around in Firefox: go to about:config page an change network.dns.disableIPv6 to true. Does anyone know a similar setting in Safari? On Sun, Dec 14, 2008 at 4:52 PM, Alexander Belopolsky wrote: > Please see below for more svn debugging, but now I also traced down > the delays I observe when I go to bugs.python.com to the same issue. > The offending download is the style sheet and that explains why curl > does not show it when pointed to the main page: > > $ curl -v -o /dev/null http://python.org/styles/screen-switcher-default.css > * About to connect() to python.org port 80 (#0) > * Trying 2001:888:2000:d::a2... Operation timed out > > The offending main page element is: > $ curl http://bugs.python.org 2>/dev/null | grep screen-switcher-default > href="http://python.org/styles/screen-switcher-default.css"; > type="text/css" id="screen-switcher-stylesheet" rel="stylesheet" /> > > > On Sun, Dec 14, 2008 at 2:55 PM, "Martin v. Löwis" wrote: > .. >>> $ time curl -v -o /dev/null http://svn.python.org >>> * About to connect() to svn.python.org port 80 (#0) >>> * Trying 2001:888:2000:d::a4... Operation timed out >> >> Hmm. Can you debug this further? >> >> Do you have IPv6 connectivity at all? > I don't think so. > >> Do you have a global v6 address? > No, only private inet6 address: > > $ ifconfig en0 > en0: flags=8863 mtu 1500 >inet6 fe80::21f:5bff:fef3:c0a4%en0 prefixlen 64 scopeid 0x4 >inet 192.168.1.6 netmask 0xff00 broadcast 192.168.1.255 > ... > >> What happens if you do a v6 traceroute? >> > $ traceroute6 -v svn.python.org > traceroute6 to svn.python.org (2001:888:2000:d::a4) from > fdbd:a375:403a:51c6:21f:5bff:fef3:c0a4, 30 hops max, 12 byte packets > 1 * > 24 bytes from fe80::216:cbff:fec1:c94c%en0 to > fe80::21f:5bff:fef3:c0a4: icmp type 136 (Neighbor Advertisement) code > 0 > : fe80 0216cbff fec1c94c > 0010: > > 32 bytes from fe80::216:cbff:fec1:c94c%en0 to > fe80::21f:5bff:fef3:c0a4: icmp type 135 (Neighbor Solicitation) code 0 > : fe80 021f5bff fef3c0a4 > 0010: 01010016 cbc1c94c > * * > ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] How to force export of a particular symbol from python.exe?
> It's a little bit messy: some bits of pymath.c (hypot, and possibly > copysign) are needed in the core, but only on platforms whose > math libraries haven't caught up with C99. It would be possible to only build the module if it defines any functions; that should be checked in configure. Alternatively, I believe that autoconf offers a mechanism to have fallback functions in files named like the function; autoconf will then build itself a list of all additional source files. Using that would require to split pymath.c into multiple files. Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Problem with svn on community buildbot
> I've found a work-around in Firefox: go to about:config page an change > network.dns.disableIPv6 to true. I'd advise against using such a work-around. The infrastructure is designed to cope with that case transparently; if it is not transparent, your system must be somehow misconfigured (it could also be the case that applications are buggy - but I don't think this is the case you are facing). The proper solution is to fix your system (although I'm still uncertain what precisely the problem might be). Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Problem with svn on community buildbot
On Sun, Dec 14, 2008 at 5:18 PM, "Martin v. Löwis" wrote: >> I've found a work-around in Firefox: go to about:config page an change >> network.dns.disableIPv6 to true. > > I'd advise against using such a work-around. The infrastructure is > designed to cope with that case transparently; if it is not transparent, > your system must be somehow misconfigured ... I've never had similar issues with any site other than those in python.org domain and I had these problems with bug.python.org on several systems in different locations. Another work-around, which happens to work for all browsers and svn is to disable IPv6 in network preferences (my system is Mac OS 10.5.5). since I don't have IPv6 connectivity, I think this is a solution I can live with, but I wonder why is it necessary for python.org to be registered as both an IPv4 and v6 domain? Google does not do that: $ host google.com google.com has address 72.14.205.100 google.com has address 74.125.45.100 google.com has address 209.85.171.100 google.com mail is handled by 10 smtp4.google.com. google.com mail is handled by 10 smtp1.google.com. google.com mail is handled by 10 smtp2.google.com. google.com mail is handled by 10 smtp3.google.com. $ host ipv6.google.com ipv6.google.com is an alias for ipv6.l.google.com. ipv6.l.google.com has IPv6 address 2001:4860:0:2001::68 ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Problem with svn on community buildbot
> live with, but I wonder why is it necessary for python.org to be > registered as both an IPv4 and v6 domain? Google does not do that: Google works in changing that: http://www3.ietf.org/proceedings/08jul/slides/plenaryw-4.pdf Other systems have been doing it for many years now: mar...@mira:~$ host www.freebsd.org www.freebsd.org has address 69.147.83.33 www.freebsd.org has IPv6 address 2001:4f8:fff6::21 Regards, Martin ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] sys.stdout.write encoding failure
There is currently a unit test in the trunk that fails in verbose mode: $ ./python.exe Lib/test/test_doctest.py -v ... UnicodeEncodeError: 'ascii' codec can't encode characters in position 338-339: ordinal not in range(128) Apparently, the problem is that stdout cannot encode non-ascii characters: >>> sys.stdout.write(u'f\xf6\xf6') Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-2: ordinal not in range(128) which is strange because >>> sys.stdout.encoding 'UTF-8' and print has no problem with the same string: >>> print u'f\xf6\xf6' föö Where does 'ascii' codec come from? ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Python 3.0 urllib fails with chunked HTTP responses
This bug is pretty serious, because urllib will insert garbage into the application-visible data for a chunked response. It simply ignores the fact that it's reading a chunked response and includes the chunked header data is payload data. The original bug was reported in September, but no one noticed it. It was reported again recently. http://bugs.python.org/issue3761 http://bugs.python.org/issue4631 I suspect we'd want to get a 3.0.1 out as soon as this is fixed, but that's not my call. Jeremy ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
