[issue3139] bytearrays are not thread safe

2008-07-04 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

Probably, but this affects all PyArg_ParseTuple(s#) calls that release
the GIL afterwards. How many of them are there?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3139
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3008] Let bin/oct/hex show floats

2008-07-04 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

I'm working on it.  I expect to have something ready by the end of this 
weekend.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3008
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3280] %c format does not accept large numbers on ucs-2 builds

2008-07-04 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc [EMAIL PROTECTED]:

Since python3.0, chr(0x2f81a) works even on narrow Unicode builds, but 
 %c % 0x2f81a
OverflowError: %c arg not in range(0x1) (narrow Python build)

Likewise, Py_BuildValue(C) should accept codes outside the BMP.

--
components: Unicode
messages: 69247
nosy: amaury.forgeotdarc
severity: normal
status: open
title: %c format does not accept large numbers on ucs-2 builds
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3280
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3275] Control flow not optimized

2008-07-04 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

What real-life use case do you have for a condition that is a boolean
operation on two constant values anyway? Things like

while 1:
   ...

are properly optimized since they serve a useful purpose.

--
nosy: +georg.brandl

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3275
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3281] support r\

2008-07-04 Thread LI Daobing

New submission from LI Daobing [EMAIL PROTECTED]:

currently r\ or r'\' is not a valid string literal and it is already
documented.

but this exception is not simple enough, it make users confused when
they found that r'C:\Program\Python\' does not work as expected.

please consider support this, thanks.

--
components: None
messages: 69249
nosy: lidaobing
severity: normal
status: open
title: support r\
type: feature request
versions: Python 2.6

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3281
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-04 Thread Chris Withers

Chris Withers [EMAIL PROTECTED] added the comment:

Amaury,

Yes, I agree with you, and that sucks too. I'd suggest opening another
bug for that ;-)

For an allegedly nice, shiny, new and perfect module, datetime sure
seems to have an awful lot lacking...

Chris

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3249
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3278] socket's SO_OOBINLINE option does not work on FreeBSD

2008-07-04 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' [EMAIL PROTECTED]:


--
title: socket's SO_REUSEADDR option does not work on FreeBSD - socket's 
SO_OOBINLINE option does not work on FreeBSD

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3278
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3250] datetime.time does not support arithmetic

2008-07-04 Thread Chris Withers

Chris Withers [EMAIL PROTECTED] added the comment:

Hi George,

I haven't looked at your patch but that fact that there are no unit
tests and you talk about copying and pasting code, I'd suggest this
might not be a good patch.

Refactor so code is only in one place rather than copying and pasting,
and make sure you write extensive unit tests, especially for things like
date/time...

cheers,

Chris

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3250
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3279] import of site.py fails on startup

2008-07-04 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

This happens if the site-packages directory contains a .pth file.

This was unnoticed because the usual message
   'import site' failed; use -v for traceback
is never printed: sys.stderr is empty before the call to initstdio().

--
nosy: +amaury.forgeotdarc

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3279
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3281] support r\

2008-07-04 Thread Facundo Batista

Facundo Batista [EMAIL PROTECTED] added the comment:

The r prefix changes how the escape sequences are interpreted after
the string literal has been parsed, it doesn't change how the literal
itself is actually parsed.

Fixing this will imply too much low level work, and it's easily solved
in other ways, so it's not foreseeable to change.

If you really want to push this, you should propose the change and how
to do it in python-ideas or python-dev.

Thank you!

--
nosy: +facundobatista
resolution:  - wont fix
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3281
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3282] Undefined unicode characters should be non-printable

2008-07-04 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc [EMAIL PROTECTED]:

str.isprintable() returns True for undefined unicode code points:

 c = \ufffe
 unicodedata.category(c)
'Cn' # (Other, Not Assigned)
 c.isprintable()
True

Same for \u0242, \ufb12...

The cause is probably in unicodectype.c: _PyUnicode_IsPrintable():
return (ctype-flags  NONPRINTABLE_MASK) == 0;
but ctype-flags is 0 for undefined chars.

--
components: Unicode
messages: 69254
nosy: amaury.forgeotdarc
severity: normal
status: open
title: Undefined unicode characters should be non-printable
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3282
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3283] multiprocessing.connection doesn't import AuthenticationError, while using it

2008-07-04 Thread Andrii V. Mishkovskyi

New submission from Andrii V. Mishkovskyi [EMAIL PROTECTED]:

Lib/multiprocessing/connection.py contains two uses of
AuthenticationError, while it's not imported from multiprocessing
package. This exception is used in deliver_challenge() and
answer_challenge() functions. I've attached a small patch that fixes
possible NameError while calling any of these two functions.

--
components: Library (Lib)
files: multiprocessing.connection.py.diff
keywords: patch
messages: 69255
nosy: jnoller, mishok13, roudkerk
severity: normal
status: open
title: multiprocessing.connection doesn't import AuthenticationError, while 
using it
versions: Python 3.0
Added file: http://bugs.python.org/file10809/multiprocessing.connection.py.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3283
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3008] Let bin/oct/hex show floats

2008-07-04 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

BTW couldn't you use the %a feature built into C99 to implement this?
(Both input and output?)

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3008
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3008] Let bin/oct/hex show floats

2008-07-04 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

Microsoft compilers implement %a since VS8.0. 
VS7.1 does not have it.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3008
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3250] datetime.time does not support arithmetic

2008-07-04 Thread George Boutsioukis

George Boutsioukis [EMAIL PROTECTED] added the comment:

Hi Chris,
 
 I know copy-pasted sounds horrible--perhaps I should have said 'modeled
afterwards'(better marketing;). The thing is, the datetime  time
classes share a lot of common functionality; it is inevitable that some
code looks like it's repeated, because the same process is followed(take
a look at the datetime  date functions already there). 
 I can't see much room for refactoring the arithmetic functions across
classes(seems too messy). Besides, the existing timezone, normalization
and delta functions are used, so no significant logic is repeated.The
patch indeed requires some cleanup, but overall it's good code(and not a
lot of it). 
 I submitted it without tests/doc because I think there should be a
chance for this functionality to be discussed. Also, the datetime module
looks like for some reason these functions were left out(some discussion
I'm missing?).

So before investing any more time on this some feedback would be
appreciated.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3250
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3282] Undefined unicode characters should be non-printable

2008-07-04 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Should be fixed in r64701...

--
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3282
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3279] import of site.py fails on startup

2008-07-04 Thread Brett Cannon

Changes by Brett Cannon [EMAIL PROTECTED]:


--
nosy: +brett.cannon

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3279
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3277] socket's OOB data management is broken on FreeBSD

2008-07-04 Thread Andrew Azarov

Andrew Azarov [EMAIL PROTECTED] added the comment:

tested:

Python 2.5.2 (r252:60911, Jun 24 2008, 16:40:26) 
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd7

FreeBSD tomcat 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52
UTC 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386

expt - o
read - fo
Exception in thread Thread-1:
Traceback (most recent call last):
  File /usr/local/lib/python2.5/threading.py, line 486, in
__bootstrap_inner
self.run()
  File /usr/local/lib/python2.5/threading.py, line 446, in run
self.__target(*self.__args, **self.__kwargs)
  File test.py, line 13, in server
data = conn.recv(1024, socket.MSG_OOB)
error: (22, 'Invalid argument')

and:
Python 2.5 (r25:51908, Jun 25 2007, 16:00:15) 
[GCC 3.4.2 [FreeBSD] 20040728] on freebsd5

FreeBSD timcat 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sat Sep  9 03:32:05
MSD 2006 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/SMP  i386

expt - o
read - fo
Exception in thread Thread-1:
Traceback (most recent call last):
  File /usr/local/lib/python2.5/threading.py, line 460, in __bootstrap
self.run()
  File /usr/local/lib/python2.5/threading.py, line 440, in run
self.__target(*self.__args, **self.__kwargs)
  File test.py2, line 13, in server
data = conn.recv(1024, socket.MSG_OOB)
error: (22, 'Invalid argument')

and:

Python 2.4.3 (#1, Jun 23 2006, 10:54:52) 
[GCC 2.95.4 20020320 [FreeBSD]] on freebsd4

FreeBSD comanchee-girl 4.9-RELEASE-CMN-1.1 FreeBSD 4.9-RELEASE-CMN-1.1
#4: Mon Apr 26 02:11:27 MSD 2004
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/CMN  i386

expt - o
read - fo
Exception in thread Thread-1:
Traceback (most recent call last):
  File /usr/local/lib/python2.4/threading.py, line 442, in __bootstrap
self.run()
  File /usr/local/lib/python2.4/threading.py, line 422, in run
self.__target(*self.__args, **self.__kwargs)
  File test.py, line 13, in server
data = conn.recv(1024, socket.MSG_OOB)
error: (22, 'Invalid argument')


All versions are stable and working in production. Except 7th version
the servers are loaded (la 0.2 to 3) with http/mysql/mail daemons.
Seems like a bug in python socket usage of freebsd for long time.

--
nosy: +Ikinoki

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3277
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3284] Delete obsolete 'Unicode' in Py3 str docstrings; related fixes

2008-07-04 Thread Terry J. Reedy

New submission from Terry J. Reedy [EMAIL PROTECTED]:

In 3.0b1, several str methods have 'Unicode' in their docstrings
leftover from 2.x when str *was* unicode.

For
  center
  count
  ljust
  rjust
  translate
'Unicode' should be deleted before 'string'.
For 'translate', I presume 'Unicode ordinal' should be left as is as was
done for 'maketrans'.

For
  lstrip
  rstrip
  strip
If chars is a str, it will be converted to unicode before stripping
should be deleted.  Bytes (which replace old str) and bytearrays are not
automatically converted.

Other fixes

For
  maketrans
the word 'then' should be removed from 'will then be' in the fourth line
since it only confuses.  The conversion is the first and only thing done
in the one-argument case.

For
  lstrip
  rstrip
  strip
remove ', Unicode' from
TypeError: xstrip arg must be None, unicode or str

For
  ljust
  rjust
TypeError: The fill character cannot be converted to Unicode
should be changed to
TypeError: The fill character cannot be implicitly converted to str
or even, copying from several other method error messages
TypeError: Can't convert 'bytes' object to str implicitly
or perhaps best would be
TypeError: For the fill char, can't convert 'bytes' object to str
implicitly

The other methods taking str args seem to have been updated already.

--
assignee: georg.brandl
components: Documentation
keywords: easy
messages: 69263
nosy: georg.brandl, tjreedy
severity: normal
status: open
title: Delete obsolete 'Unicode' in Py3 str docstrings; related fixes
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3284
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3285] Fraction.from_any()

2008-07-04 Thread Raymond Hettinger

New submission from Raymond Hettinger [EMAIL PROTECTED]:

After exercising the fractions module, I've found it problematic that 
there isn't a unified constructor to handle mixed data input types.  

For example, when updating the accurate summation recipe at 
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/393090 to show 
how it could be done with rational arithmetic.  Handling mixed-type 
inputs required writing a factory function:

def makefrac(x):
if isinstance(x, Decimal):
return Fraction.from_decimal(x)
if isinstance(x, float):
return Fraction.from_float(x)
return Fraction(x)

That function supported a clean version of the recipe:

def frsum(iterable):
return float(sum(map(makefrac, iterable)))

It would have been much better if that functionality were built into 
the class definition.  See attached patch.

--
components: Library (Lib)
files: from_any.diff
keywords: patch
messages: 69264
nosy: rhettinger
severity: normal
status: open
title: Fraction.from_any()
type: feature request
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file10810/from_any.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3285
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3286] IDLE opens window too low on Windows

2008-07-04 Thread Terry J. Reedy

New submission from Terry J. Reedy [EMAIL PROTECTED]:

On my Windows XP system, IDLE opens windows too low, even the first, so
that the bottom is behind the task bar.  When I move the window up,
close, and reopen, it occasionally remembers the position but usually
forgets.  Always remembering would be nicer.

It also seems to me that the default should at least be centered, but
preferably even higher since new windows are cascaded down.

Or Configure/General could have an initial position for first window
entry just below or above the initial size.

--
components: IDLE
messages: 69265
nosy: tjreedy
severity: normal
status: open
title: IDLE opens window too low on Windows
type: behavior
versions: Python 2.6, Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3286
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3284] Delete obsolete 'Unicode' in Py3 str docstrings; related fixes

2008-07-04 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Thanks! Done in r64716.

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3284
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3168] cmath test fails on Solaris 10

2008-07-04 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

Below is the reply from SUN.  It was indeed a bug which has been fixed already.

I have not yet applied the patches to my SUN compilers and tried again.

/Jean

Begin forwarded message:

From: Sun Microsystems [EMAIL PROTECTED]
Date: July 1, 2008 3:51:17 PM PDT

Subject: Re: (Incident Review ID: 1284413) Sun C 5.8 optimization bug for 
64-bit Opteron

--- Note: you can send us updates about your Incident ---
--- by replying to this mail.  Place new information  ---
--- above these lines.  Do not include attachments.   ---
--- Our system ignores attachments and anything below ---
--- these lines.  ---

Hi Jean Brouwers,

We appreciate your feedback.  Using your sample I was able to get the correct 
results using Sun 
Studio 12.  This may indicate that the issue was also fixed in a backported 
patch to Studio 11 (Sun 
C 5.8).  Check to be sure that the latest patches have been applied to your 
installation.  See:

http://developers.sun.com/sunstudio/downloads/patches/ss11_patches.html

Regards,
Brad Mayer


NOTICE: This message, including any attachments, is for the intended
recipient(s) only.  If you are not the intended recipient(s), please
reply to the sender, delete this message, and refrain from disclosing,
copying, or distributing this message.


--- Previous Messages 


- Report -

  category : c
   subcategory : compiler
   release : other
  type : bug
  synopsis : Sun C 5.8 optimization bug for 64-bit Opteron
 customer name : Jean Brouwers
sdn id : 
  language : en
  hardware : x86
os : sol2.5.1
bug id : 0
  date created : Sun Jun 29 11:49:10 MST 2008
date evaluated : Tue Jul 01 15:41:10 MST 2008
   description : 

FULL PRODUCT VERSION :
which cc
/opt/SUNWspro/bin/cc
cc -V
cc: Sun C 5.8 2005/10/13

ADDITIONAL OS VERSION INFORMATION :
uname -a
SunOS unknown 5.10 Generic_118855-14 i86pc i386 i86pc


EXTRA RELEVANT SYSTEM CONFIGURATION :
Solaris 10 on an Ultra20 Opteron machine.


A DESCRIPTION OF THE PROBLEM :
At higher optimization levels, the Sun C compiler does not handle certain 
function call patterns 
correctly.  Specifically, the values of complex_t  variables q and r in the 
code snippet below are 
different.

typedef struct {
double real;
double imag;
} complex_t;

complex_t c_comp(double real);
complex_t c_quot(complex_t a, complex_t b);
...
complex_t_t x, y, q, r;

x = c_comp(4.6051701859880918);
y = c_comp(0.69314718055994529);

q = c_quot(x, y);

r = c_quot(x, c_comp(0.6931471805599452));
...

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See the attached test case.  Instructions are included inside.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -

rm a.out ; cc -xtarget=native64 -xO0 c_main.c c_quot.c -lm ; ./a.out
c_main.c:
c_quot.c:
6.643856 + j 0.00
6.643856 + j 0.00

ACTUAL -

rm a.out ; cc -xtarget=native64 -xO3 c_main.c c_quot.c -lm ; ./a.out
c_main.c:
c_quot.c:
6.643856 + j 0.00
Inf + j 0.00


REPRODUCIBILITY :
This bug can be reproduced always.

-- BEGIN SOURCE --

/* Split this file in 3 separate file, c_main.c, c_quot.h and
   c_quot.c.  Compile with and without optimization using Sun
   C 5.8 compiler on Solaris 10 (Opteron) and run as follows.

rm a.out ; cc -xtarget=native64 -xO0 c_main.c c_quot.c -lm ; ./a.out
c_main.c:
c_quot.c:
6.643856 + j 0.00
6.643856 + j 0.00

rm a.out ; cc -xtarget=native64 -xO1 c_main.c c_quot.c -lm ; ./a.out
c_main.c:
c_quot.c:
6.643856 + j 0.00
6.643856 + j 0.00

rm a.out ; cc -xtarget=native64 -xO2 c_main.c c_quot.c -lm ; ./a.out
c_main.c:
c_quot.c:
6.643856 + j 0.00
6.643856 + j 0.00

rm a.out ; cc -xtarget=native64 -xO3 c_main.c c_quot.c -lm ; ./a.out
c_main.c:
c_quot.c:
6.643856 + j 0.00
Inf + j 0.00

rm a.out ; cc -xtarget=native64 -xO4 c_main.c c_quot.c -lm ; ./a.out
c_main.c:
c_quot.c:
6.643856 + j 0.00
Inf + j 0.00

rm a.out ; cc -xtarget=native64 -xO5 c_main.c c_quot.c -lm ; ./a.out
c_main.c:
c_quot.c:
6.643856 + j 0.00
Inf + j 0.00

*/


-- save as c_main.c -
#include stdio.h
#include c_quot.h

int main(int argc, char* argv[])
{
complex_t x, y, q, r;

x = c_comp(4.6051701859880918);
y = c_comp(0.69314718055994529);
q = c_quot(x, y);
/* expect: 6.643856 + j 0.00 */
printf(%f + j %f\n, q.real, q.imag);

x = c_comp(4.6051701859880918);
y = c_comp(0.69314718055994529);
r = c_quot(x, c_comp(0.6931471805599452));
/* expect: 6.643856 + j 0.00, but ... */
printf(%f + j %f\n, r.real, r.imag);
}


-- save as c_quot.h 

[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-07-04 Thread Nick Coghlan

Nick Coghlan [EMAIL PROTECTED] added the comment:

Hmm, setting an invalid value for __package__ will definitely break
relative imports (see PEP 361), but it probably shouldn't be breaking
absolute imports.

--
nosy: +ncoghlan

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3221
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-07-04 Thread Nick Coghlan

Nick Coghlan [EMAIL PROTECTED] added the comment:

One idea would be to change the import code to only produce a warning
for a missing __package__ entry instead of a SystemError (reserving the
SystemError for cases where the package name is derived from __name__
rather than being retrieved from the __package__ attribute).

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3221
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1754483] linecache package handling

2008-07-04 Thread Kevin Goodsell

Kevin Goodsell [EMAIL PROTECTED] added the comment:

Hans is right, that patch isn't very good. Here's a second pass. This
one avoids joining the file basename to sys.path components, which I'd
say is wrong since it strips (presumably relevant) leading path components.

A second part of this skips out early on absolute file names, which
prevents joining them with sys.path components also. As far as I can
tell this would cause no harm, but it's not useful either.

Added file: http://bugs.python.org/file10812/linecache.py_2008_07_04.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1754483
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com