[issue12581] Increased test coverage of test_urlparse

2011-07-19 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Hi Petter, writing tests are ofcourse a good way to start. As long as the tests 
increase the coverage, those are most welcome. Thanks!

--
assignee:  -> orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12372] semaphore errors on AIX 7.1

2011-07-19 Thread Sébastien Sablé

Sébastien Sablé  added the comment:

Hi,

sorry for the late reply.

 > STINNER Victor added the comment:
 >
> At least, I would like to know if Sébastien Sablé (the author of the original 
> patch) changed his opinion about this issue since 2007 ;-)

I haven't changed my mind concerning this patch and we still use it for 
the Python that we deploy on AIX 5.3 and AIX 6.1 systems (I don't use 
AIX 7 yet).

Not using this patch will result in performance degradation and 
"sem_post: Permission denied" error messages from the system popping on 
the console.

 > Charles-François Natali added the comment:
 >
 > Well, it looks like a libc or kernel bug, and we probably can't do
 > much about it. Just falling back to mutex + condition variable instead
 > of POSIX semaphores does the trick, so I'll say just avoid POSIX
 > semaphores altogether on AIX and we should be fine. People could
 > report this to their AIX vendor, but they should definitely consider
 > dropping this terminally broken platform and switch to, let's says,
 > Linux or BSD...

I agree with Charles-François that it is an AIX bug that should be 
reported to IBM so that they could fix it in a future release.
I already submitted some "tickets" to IBM concerning other problems and 
it is not exactly an "agile" company so you have to be very patient.

I also agree that people should consider dropping this broken platform, 
but unfortunately IBM is aggressively and successfully (AFAIK) pushing 
this platform to many customers (in the finance industry in particular) 
so I don't expect it to die soon.

regards

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12546] builtin __format__ methods cannot fill with \x00 char

2011-07-19 Thread Eric V. Smith

Eric V. Smith  added the comment:

I finally got around to reviewing the patch. A couple of comments:

1. There should be some tests for str.__format__, not just str.format. This is 
really a bug with str.__format__, after all. I can add those.

2. The bigger issue is that the other built in formatters have this same 
problem.

>>> format(3, '\x00<6')
'3 '
>>> format(3., '\x00<6')
'3.0   '
>>> format('3', '\x00<6')
'3\x00\x00\x00\x00\x00'
>>> format(3+1j, '\x00<6')
'(3+1j)'
[38654 refs]
>>> format(3+1j, '\x00<10')
'(3+1j)'

I think the fix is basically the same as str.__format__ (but in 
format_int_or_long_internal, format_float_internal, and 
format_complex_internal). I tried that and it worked, but I haven't had time to 
write tests for them. If you (Davide) can do that, great. Otherwise I'll try 
and grab some time this week.

Changing the subject to match the wider scope of the problem.

--
stage: commit review -> patch review
title: str.format cannot fill with \x00 char -> builtin __format__ methods 
cannot fill with \x00 char

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10881] test_site and macframework builds fails

2011-07-19 Thread Vinay Sajip

Vinay Sajip  added the comment:

I'd like to reopen this, as it doesn't seem to be a duplicate of #8084. 
Specifically, test_getsitepackages in test_sitepackages appears to be wrong, 
since it has a correct test for platform builds later in the method, but the 
failure occurs earlier because the path "os.sep == '/'" is taken on OS X. The 
test should be restructured as e.g.

if sys.platform in ('os2emx', 'riscos'):
# stuff for OS/2, RISCOS
elif (sys.platform == "darwin" and
sysconfig.get_config_var("PYTHONFRAMEWORK")):
# OS X platform builds
elif os.sep == '/':
# OS X non-platform builds, Linux, FreeBSD etc.
else:
# other platforms

That the test itself is broken is not the thrust of #8084.

--
nosy: +vinay.sajip
resolution: duplicate -> 
status: closed -> open
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12543] `issubclass(collections.deque, collections.Sequence) == False`

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

> The sequence ABCs do not require slicing support.
Understood, but is it said in the docs?  David said that he couldn’t find that 
bit of info, which is why I suggested a doc bug.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11877] Change os.fsync() to support physical backing store syncs

2011-07-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Here is something unsorted and loose:

- @neologix:
  One could argue that something had happened before the fsync(2),
  so that code which blindly did so is too dumb to do any right
  decision anyway.  Even PEP 3151 won't help.

- I favour haypos fullsync() approach, because that could probably
  make it into it.  Yet Python doesn't offer any possibility to
  access NetBSD DISKSYNC stuff sofar.

- Currently the programmer must be aware of any platform specific
  problems.  I, for example, am not aware of Windows.  How can
  i give any guarantee to users which (will) use my S-Postman on
  Windows?  I need to put trust in turn into the Framework i am
  using - Python.  And that makes me feel pretty breathless.

- Fortunately Python is dynamic, so that one simply can replace
  os.fsync().  Works once only though (think signal handlers :=).

  + That is indeed the solution i'm using for my S-Postman,
because *only* like this i can actually make Python's
mailbox.py module reliable on Mac OS X!  I can't give any
guarantee for NetBSD, though i document it!

  + Aaarrg!  I'm a liar!!  I lie about - data integrity!!!

--Steffen
Ciao, sdaoden(*)(gmail.com)
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6721] Locks in python standard library should be sanitized on fork

2011-07-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

If Nir's analysis is right, and Antoines comment pushes me into
this direction, (i personally have not looked at that code),
then multiprocessing is completely brain-damaged and has been
implemented by a moron.
And yes, I know this is a bug tracker, and even that of Python.

Nir should merge his last two messages into a single mail to
python-dev, and those guys should give Nir or Thomas or a group of
persons who have time and mental power a hg(1) repo clone and
committer access to that and multiprocessing should be rewritten,
maybe even from scratch, but i dunno.

For the extremely unlikely case that all that doesn't happen maybe
the patch of neologix should make it?

--Steffen
Ciao, sdaoden(*)(gmail.com)
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3232] Wrong str->bytes conversion in Lib/encodings/idna.py

2011-07-19 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6721] Locks in python standard library should be sanitized on fork

2011-07-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Um, and just to add: i'm not watching out for anything, and it won't
and it can't be me:

?0%0[steffen@sherwood sys]$ grep -F smp CHANGELOG.svn -B3 | grep -E 
'^r[[:digit:]]+' | tail -n 1
r162 | steffen | 2006-01-18 18:29:58 +0100 (Wed, 18 Jan 2006) | 35 lines

--Steffen
Ciao, sdaoden(*)(gmail.com)
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-19 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1602133] non-framework python fails to define os.environ properly

2011-07-19 Thread Éric Araujo

Changes by Éric Araujo :


--
stage:  -> commit review
title: non-framework built python fails to define environ properly -> 
non-framework python fails to define os.environ properly
versions: +Python 3.3 -Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12524] change httplib docs POST example

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

1. 3xx codes are as fine as 200, IIRC.

2. Agreed, Roundup as very strange form parameters and URIs in general, but 
that’s not something we can change.

3. Maybe the empty string would work?  (It’s a URI reference which means “same 
URI as the resource where the form was found” IOW same page).


Alternate idea: use example.org.  People won’t be able to actually run the 
example, but is it really important?

--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12583] More detailed ImportError messages

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

Just a side note: please don’t use “folder” for cross-platform code or 
documentation, it’s a Windows-specific term (like “wizard” for example).

--
nosy: +eric.araujo
title: More detailed `ImportError` messages -> More detailed ImportError 
messages

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8084] pep-0370 on osx duplicates existing functionality

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

It would be nice to have feedback from the Mac experts on this.

--
assignee: christian.heimes -> 
keywords:  -buildbot, needs review, patch
nosy: +ned.deily
resolution: fixed -> 
stage: committed/rejected -> 
versions: +Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10881] test_site and macframework builds fails

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

How can we detect framework builds from Python code?  Maybe there is a variable 
in sysconfig?

--
nosy: +eric.araujo
superseder: pep-0370 on osx duplicates existing functionality -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10881] test_site and macframework builds fails

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

Hem, I should have re-read Vinay’s message before posting :)  Marking as easy.

--
keywords: +easy
stage:  -> needs patch
versions: +Python 2.7, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2011-07-19 Thread Éric Araujo

Changes by Éric Araujo :


--
versions: +Python 3.3 -Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12535] Chained tracebacks are confusing because the first traceback is minimal

2011-07-19 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12527] assertRaisesRegex doc'd with 'msg' arg, but it's not implemented?

2011-07-19 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

2011-07-19 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Waiting for a new version of boost probably won't help: this is an 
incompatibility between a redefinition of ctypes macros in pyport.h and 
definitions in the C++ header .

I barely use C++ at this time and don't know how to tweak the headers to avoid 
this problem. It would probably have been better to not redefine the ctype.h 
definitions, we should have introduced Py_isascii etc. That requires some 
invasive changes to the Python codebase though, and I'm not sure if that is 
worth the trouble.

Could someone attach a sample project that suffers from this issue (with 
instructions on how to build it)? That would make it easier to debug the 
problem.

(Removing python 2.6 because that version receives only security patches at 
this time, adding 3.2 and 3.3 because those use the same code in pyport.h and 
hence should also be affected by this issue)

--
versions: +Python 3.2, Python 3.3 -Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10731] UnicodeDecodeError in OS X tkinter when binding to

2011-07-19 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

This is almost certainly a bug in Tk.  What OSX version are you using, and 
which python installer did you use?

One thing you could try is installing a matching copy of ActiveState's Tk (8.4 
for the 32-bit build, 8.5 for intel-only builds of python 2.7 and 3.2)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12546] builtin __format__ methods cannot fill with \x00 char

2011-07-19 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10881] test_site and macframework builds fails

2011-07-19 Thread Vinay Sajip

Vinay Sajip  added the comment:

This is now fixed in pythonv, see

https://bitbucket.org/vinay.sajip/pythonv/changeset/a59a3868d185/raw/pythonv-a59a3868d185.diff

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6721] Locks in python standard library should be sanitized on fork

2011-07-19 Thread Nir Aides

Nir Aides  added the comment:

> then multiprocessing is completely brain-damaged and has been
> implemented by a moron.

Please do not use this kind of language. 
Being disrespectful to other people hurts the discussion.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12585] distutils dereferences symlinks for zip but not for bztar/gztar target

2011-07-19 Thread Florian Berger

New submission from Florian Berger :

When creating a source distribution, formats=zip will dereference symbolic 
links while formats=bztar,gztar will not.

Example:

$ ls -l
drwxr-xr-x 3 4096 19. Jul 15:44 dist
-rw-r--r-- 1   53 19. Jul 15:15 foo.py
-rw-r--r-- 1   42 19. Jul 15:39 MANIFEST
-rw-r--r-- 1   42 19. Jul 15:39 MANIFEST.in
-rw-r--r-- 1  167 19. Jul 15:29 setup.py
-rw-r--r-- 15 19. Jul 15:16 test.dat
lrwxrwxrwx 18 19. Jul 15:16 test.symlink.dat -> test.dat

$ cat setup.py 
from distutils.core import setup
setup(name = 'foo',
  version = '0.1.0',
  py_modules = ['foo'],
  data_files = [("", ["test.dat", "test.symlink.dat"])])

$ python setup.py sdist --formats=gztar,zip

dist/foo-0.1.0.tar.gz does preserve the symbolic link test.symlink.dat -> 
test.dat, while dist/foo-0.1.0.zip does not.

This can lead to unexpected behaviour when a symlink points to a file outside 
the source tree. In the .zip file everything will be fine, while the .tar.* 
file will contain a broken link.

Actual behaviour: storing of symbolic links depends on the target format.

Expected behaviour: storing of symbolic links should not depend on the target 
format, i.e. format switches should be transparent. Since the zipfile module 
apparently does not support symbolic links, symlinks should be dereferenced for 
formats=gztar,bztar using the dereference=True parameter of tarfile.TarFile() 
in archive_util.py.

--
assignee: tarek
components: Distutils
messages: 140669
nosy: eric.araujo, fberger, tarek
priority: normal
severity: normal
status: open
title: distutils dereferences symlinks for zip but not for bztar/gztar target
type: behavior
versions: Python 2.6, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12585] distutils dereferences symlinks for zip but not for bztar/gztar target

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for such a good report.  Symlinks handling in distutils is 
under-specified; this question showed up a few months ago on the distutils-sig 
mailing list, with no good answer.

distutils is a special part of the standard library: as it spent a long time 
without dedicated maintainer, people used to rely on undocumented behavior and 
bugs, so when Tarek took over maintenance and started to improve and fix 
things, a lot of third-party code was broken.  That’s why it was decided to put 
distutils under a feature freeze, fixing only clear bugs, and moving efforts 
for new development and cleanups into the distutils2 fork (also called 
packaging in the Python 3.3 standard library).

Because of the fragility of distutils, we have to be careful when dealing with 
bug reports.  Our process is that a bug is a behavior that contradicts the 
documentation, otherwise it’s classified as a new feature.  For this report, 
I’ve found only two mentions of symlinks in the distutils docs, the first one 
in a support function (Doc/distutils/apiref.rst) and the second one in the docs 
about the MANIFEST file (Doc/distutils/sourcedist.rst).  So the only promise 
that the docs make is that MANIFEST entries that are symlinks are supported, 
but nothing is said about what will end up in the sdist.

I hope that this explanation will let you see why I’m reluctant to change 
distutils: we don’t know what code we will break if we improve symlink 
handling.  So, do you think adding a warning about symlink handling issues in 
the docs would be enough?

For distutils2 however, compatibility concerns do not apply yet, so we’re free 
to fix and document symlink handling.  If you would like to work on a patch, 
here are some guidelines: . 
 If you can’t, then thanks again for your report, which will be a good starting 
point.

--
assignee: tarek -> eric.araujo
components: +Distutils2
nosy: +alexis
versions: +Python 2.7, Python 3.3 -Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12585] distutils dereferences symlinks for zip but not for bztar/gztar target

2011-07-19 Thread Florian Berger

Florian Berger  added the comment:

Hi,

thanks for the reply. I see your point with the legacy distutils.

> I hope that this explanation will let you see why I’m reluctant to
> change distutils: we don’t know what code we will break if we improve
> symlink handling.  So, do you think adding a warning about symlink
> handling issues in the docs would be enough?

Given the constraints, yes, it would be good to have that warning in the docs. 
Even better would be a runtime hint like

Notice: gztar target will preserve symbolic links.

or

Notice: zip target will dereference symbolic links.

> For distutils2 however, compatibility concerns do not apply yet,
> so we’re free to fix and document symlink handling.

That would be very welcome. I am afraid I will not be able to contribute code 
anytime soon, but it would be great if the regular developers could keep an eye 
on this inconsistency.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11175] allow argparse FileType to accept encoding and errors arguments

2011-07-19 Thread Éric Araujo

Changes by Éric Araujo :


--
keywords: +easy
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10967] move regrtest over to using more unittest infrastructure

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

For one thing, I think resources could be implemented in terms of skips, or 
even included into stock unittest.

--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12455] urllib2 forces title() on header names, breaking some requests

2011-07-19 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file22537/unnamed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12455] urllib2 forces title() on header names, breaking some requests

2011-07-19 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9968] Let cgi.FieldStorage have named uploaded file

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

> Well, this is actually somewhat more complicated than what my first
> tests showed due to the way multipart/form-data is dealt with in
> FieldStorage.read_multi().
>
> The solution I proposed last time only works if the uploaded file is
> passed as the first form field.

Can you copy here the tests you did and the error output you got?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11595] Miscellaneous bugs in cfg_to_args() utility function

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

> The reason being that I'm using this in my own packages so that I can
> distutils2-like setup.cfgs, but still install with normal distutils
> and/or Distribute without depending on distutils2 in its entirety.
>
> I'm wondering if there might be a better way to proceed, or if this
> sort of compatibility support is even useful to anyone else.

I think that now I understand what you meant here.  You should not have to 
duplicate distutils2 code in legacy setup.py scripts: “pysetup generate-setup” 
will create a setup script that can find information in the setup.cfg file (so 
that you only have to update one file), without depending on distutils2 code 
(it uses inspect.getsource to copy the cfg_to_args function into setup.py).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12572] HP/UX compiler workarounds

2011-07-19 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file22671/getpath.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12572] HP/UX compiler workarounds

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

Here’s a unified diff.

--
Added file: http://bugs.python.org/file22696/hp-ux-compiler-workarounds.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12572] HP/UX compiler workarounds

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

Arg, I thought I removed a duplicate patch but it was actually an updated 
version.  Sorry about that; the link in the history at the bottom of this page 
still links to the file.  Updated unified diff attached.

--
Added file: http://bugs.python.org/file22697/hp-ux-compiler-workarounds.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12572] HP/UX compiler workarounds

2011-07-19 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file22696/hp-ux-compiler-workarounds.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12572] HP/UX compiler workarounds

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

Jim: Sorry if we reacted first with process remarks instead of thanking you for 
the patches and reviewing them.  We value contributions, and we try to be 
welcoming, but sometimes we forget what it’s like to enter this community.  
Some things have become basic for us, like working with one unified diff 
instead of many context diffs, so we try to guide contributors so that their 
files can be easily read and fed to tools (such as code review or version 
control) and we can all move faster in the discussion leading to the commit.  
This is not about project administration, merely common formats to make work 
easier for all parties involved (for example, for users generating one diff for 
a whole checkout is easier than generating and uploading one diff per file).

So, I hope that the diff I generated from yours will let people review it 
quickly, with no hurt feelings.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3526] Customized malloc implementation on SunOS and AIX

2011-07-19 Thread Sébastien Sablé

Sébastien Sablé  added the comment:

Sorry for the very late reply; I have been quite busy recently with the 
birth of my second daughter, a new job, a new home town and soon a new home.

...
> But with your patch, such code wouldn't be thread-safe anymore. This
> patch implies that a thread can't call malloc directly or indirectly
> (printf, opendir, and many others) while it doesn't hold the GIL. This
> is going to break a lot of existing code.

I didn't have this problem since the threads in my application are 
handled by Python and so hold the GIL. But you are right it is a concern.

Fortunately, it is easy to solve by defining the following in dlmalloc:
#define HAVE_MORECORE 0

That way, all the memory allocations handled by Python will go in a 
dedicated mmaped memory segment controlled by dlmalloc, while all the 
calls to the system malloc will work as before (probably going into a 
segment handled by sbrk).

> It will also be slower, and consume more memory.

It should be noted that sbrk is deprecated on some platforms where mmap 
is suggested as a better replacement (Mac OS X, FreeBSD...).
sbrk is generally considered quite archaic.

I attach a new patch that can be applied to Python 2.7.1. It includes 
the dlmalloc modification and uses only mmap in this case (no sbrk).

We have delivered it in production with the new version of our software 
that works on AIX 6.1 and it works fine.

I also did some benchmarks and did not notice any slow down compared to 
a pristine Python 2.7.1 (actually it was slightly faster YMMV).
It also consumes a lot less memory, but that is the reason for this 
patch in the first place.

Since I am changing of job, I won't be working on AIX anymore (yeah!); I 
also don't expect this patch to be integrated spontaneously without 
someone interested in AIX pushing for it. So I leave this patch more as 
a reference for someone who would be impacted by this problem and would 
like to integrate it in his own Python. I hope it helps.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3526] Customized malloc implementation on SunOS and AIX

2011-07-19 Thread Sébastien Sablé

Changes by Sébastien Sablé :


Added file: http://bugs.python.org/file22698/patch_dlmalloc_Python_2_7_1.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11176] give more meaningful argument names in argparse documentation

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

Hi Westley!  Do you still have time to work on this?

--
keywords: +easy
nosy: +eric.araujo
versions: +Python 2.7, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6818] remove/delete method for zipfile/tarfile objects

2011-07-19 Thread Éric Araujo

Éric Araujo  added the comment:

Martin did a review of the newer patch; maybe you didn’t get the mail (there’s 
a Rietveld bug when a user name without email is given to the Cc field).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3526] Customized malloc implementation on SunOS and AIX

2011-07-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Since I am changing of job, I won't be working on AIX anymore (yeah!);

You seem happy about that :)
Does it mean the project to have an AIX buildbot is abandoned?

> I also don't expect this patch to be integrated spontaneously without 
> someone interested in AIX pushing for it. So I leave this patch more as 
> a reference for someone who would be impacted by this problem and would 
> like to integrate it in his own Python. I hope it helps.

Indeed, thanks for your contributions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3526] Customized malloc implementation on SunOS and AIX

2011-07-19 Thread Sébastien Sablé

Sébastien Sablé  added the comment:

> Does it mean the project to have an AIX buildbot is abandoned?

We have a buildbot running internally on AIX. I could not get the necessary 
modifications integrated upstream in the official Python buildbot so that we 
could plug directly on it.

cf this thread:
http://mail.python.org/pipermail/python-dev/2010-October/thread.html#104714

I will try to get someone at my company to keep this buildbot running and 
report any outstanding bug, but I can't guarantee anything. 

> Indeed, thanks for your contributions.

Thanks! And thank you for your help in most of the issues related to AIX.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12372] semaphore errors on AIX 7.1

2011-07-19 Thread Charles-François Natali

Changes by Charles-François Natali :


--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12576] urlib.request fails to open some sites

2011-07-19 Thread Robert Xiao

Robert Xiao  added the comment:

Seconded. #12133 inadvertently closes the response object if the server fails 
to indicate "Connection: close". In my case, Amazon S3 (s3.amazonaws.com) 
causes this problem:

(Python 3.2)
>>> conn = 
>>> urllib.request.urlopen('http://s3.amazonaws.com/SurveyMonkeyFiles/VPAT_SurveyMonkey.pdf')
>>> len(conn.read())
27692

(Python 3.2.1)
>>> conn = 
>>> urllib.request.urlopen('http://s3.amazonaws.com/SurveyMonkeyFiles/VPAT_SurveyMonkey.pdf')
>>> len(conn.read())
0

The problem is that S3 doesn't send back a "Connection: close" header, so when 
h.close() is called from request.py, the request object is also closed; 
consequently, conn.fp is None and so conn.read() returns an empty bytes object.

This is a clear regression due to the patch in #12133.

--
nosy: +nneonneo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-07-19 Thread Charles-François Natali

Charles-François Natali  added the comment:

> I'm still in favor of keeping sys.platform == 'linux3', and you?
>

So do I.

> For plat-linux3, should we regenerate this directory (I cannot do that, I
> don't have Linux 3.0 yet) or can we just use a symbolic link? I read that
> Linux 3.0 doesn't break the API, so I suppose that constants are the same.
> Or can we try by copying plat-linux2 to plat-linux3?
>

I've just had a quick look, but it seems that plat-
contains header definitions, so it's more function of the libc than
the kernel version. It probably makes sense on operating systems which
have a real notion of release (i.e. a consistent kernel/user-space,
like AIX or *BSD), but not so much on Linux. Copying plat-linux2 to
plat-linux3 should be just fine.

Your patch looks fine to me, except for this:
-if (platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
-'freebsd7', 'freebsd8')
-or platform.startswith("gnukfreebsd")):
+if os.uname()[0] in ('Linux', 'FreeBSD'):

Why not use platform.system(), to be consistent?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11176] give more meaningful argument names in argparse documentation

2011-07-19 Thread Westley Martínez

Westley Martínez  added the comment:

I worked on this some time ago; the problem was the size of the documentation, 
i.e. it was difficult to stay consistent.  Do I have time for this?  Yes, but I 
wouldn't get it done anytime soon, and the results could be anywhere from good 
to bad.  As it stands, the documentation is fairly good, so I don't think it's 
imperative to fix it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12583] More detailed ImportError messages

2011-07-19 Thread Brett Cannon

Brett Cannon  added the comment:

Doing a stack walk to try to determine if an import failure was from a circular 
import would be costly, a little complicated (since you cannot simply look at 
import statements but also various kinds of functions that can do an equivalent 
job of importing) and probably not worth it.

As for ImportWarning, it's at least mentioned in the exception hierarchy and 
the warnings docs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12586] Enhanced email API: header objects

2011-07-19 Thread R. David Murray

New submission from R. David Murray :

The work I've been doing on email6 has reached a stage where I'm confident 
about the overall plan of the new code, and am ready for people to review it 
and make suggestions.  The patch represents a working state of the code, but 
with several omissions that I will continue to work on while the rest of the 
code is reviewed.  The major omissions are that address headers don't yet 
handle encoded words in their 'value' and related attributes, and that 
structured headers do not properly support unicode characters when the message 
is flattened.  (The traditional email5 methods for handling unicode in 
structured headers still work fine, though).  There are also edge-cases where 
the address parser does not do as well as email.utils.parseaddr (and other 
cases where it does better).

A goal of email6 is to be 100% backward compatible with the existing email5.1 
API.  If you find any deviations please let me know.

A new policy, email6_defaults, allows you to run the code with what are 
intended to be the defaults in Python 3.4.  (Not specifying either 
email6_defaults or email5_defaults when creating a message will result in 
warning messages in cases where it would make a difference which policy was in 
force).  The only difference between the two right now is that email6_defaults 
sets 'use_decoded' true, which means that the string value of header objects is 
the fully unicode version, not the ASCII-only version that comes from the 
source as is true with email5_defaults.

I've also released this version of the code as email-6.0.0a1 on pypi, so that 
it can be tested using 3.2 (you import it as 'email6').

I will separately attach here the README from the pypi package, which details 
the header features that are finished and the ones that still need work.

After review, I'd like to go ahead and check this in to default and continue 
the work from there.  From this point until I start work on the message_factory 
all changes will be incremental.  When we originally planned out email6 we 
thought we'd be making a "compatibility break" with backward compatibility 
shims.  As things have turned out the work is more a matter of incremental 
improvement of the API while maintaining the old API, and thus it seems 
reasonable to me to work on it directly in default rather than continue to work 
on it in a separate feature branch.

If, that is, the approach here is accepted :)  The email-sig seems to like it.

Oh, yeah, and there's room for plenty of bike-shedding about certain attribute 
names &c.

--
assignee: r.david.murray
components: Library (Lib)
hgrepos: 44
messages: 140687
nosy: barry, r.david.murray
priority: normal
severity: normal
stage: patch review
status: open
title: Enhanced email API: header objects
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12586] Enhanced email API: header objects

2011-07-19 Thread R. David Murray

Changes by R. David Murray :


--
keywords: +patch
Added file: http://bugs.python.org/file22699/b22698463737.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12586] Enhanced email API: header objects

2011-07-19 Thread R. David Murray

Changes by R. David Murray :


Added file: http://bugs.python.org/file22700/README.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12583] More detailed ImportError messages

2011-07-19 Thread Eric Snow

Changes by Eric Snow :


--
nosy: +ericsnow

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10309] dlmalloc.c needs _GNU_SOURCE for mremap()

2011-07-19 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

I'm running into this while trying to backport Python 2.7.2 to Ubuntu 10.04.  
Our build machines are throwing an error because they catch the implicit cast 
so as to prevent problems on ia64 and amd64.

http://wiki.debian.org/IMplicitPointerConversions

I haven't quite gotten the patch to work yet, but when I do, I'll look at 
applying this patch upstream as well.

--
nosy: +barry
versions: +Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10309] dlmalloc.c needs _GNU_SOURCE for mremap()

2011-07-19 Thread Brian Curtin

Changes by Brian Curtin :


--
assignee: theller -> 
nosy:  -theller

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6721] Locks in python standard library should be sanitized on fork

2011-07-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

P.S.:
I have to apologize, it's Tomaž, not Thomas.
(And unless i'm mistaken this is pronounced "TomAsch" rather than
the english "Tommes", so i was just plain wrong.)

--Steffen
Ciao, sdaoden(*)(gmail.com)
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10309] dlmalloc.c needs _GNU_SOURCE for mremap()

2011-07-19 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
assignee:  -> barry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6721] Locks in python standard library should be sanitized on fork

2011-07-19 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

> > then multiprocessing is completely brain-damaged and has been
> > implemented by a moron.
> 
> Please do not use this kind of language. 
> Being disrespectful to other people hurts the discussion.

So i apologize once again.
'Still i think this should go to python-dev in the mentioned case.

(BTW: there are religions without "god", so whom shall e.g. i praise
for the GIL?)

--Steffen
Ciao, sdaoden(*)(gmail.com)
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6721] Locks in python standard library should be sanitized on fork

2011-07-19 Thread Nir Aides

Nir Aides  added the comment:

> (BTW: there are religions without "god", so whom shall e.g. i praise for the 
> GIL?)

Guido? ;)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12583] More detailed ImportError messages

2011-07-19 Thread Ram Rachum

Ram Rachum  added the comment:

Brett: Why does it matter that it will be costly? It's a post-mortem activity 
anyway, usually done when something critical failed and the entire system isn't 
working.

Why would functions need to be looked at? I mean, isn't a circular import when 
you try to import a module `foo` while in a lower stack level you haven't 
finished importing `foo` yet? Does it get trickier than that?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12583] More detailed ImportError messages

2011-07-19 Thread Ram Rachum

Ram Rachum  added the comment:

Brett, I checked out the two pieces of documentation you referred to, they have 
very little information about ImportWarning other than "Base class for warnings 
about probable mistakes in module imports."

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Robert Xiao

New submission from Robert Xiao :

>From a fresh Python3.2.1 tarball:

nneonneo@nneonneo-mbp:~/devel/Python-3.2.1/Lib/test$ for i in tokenize_tests-*; 
do echo $i; xxd $i | head -n 1; done
tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt
000: efbb bf23 202d 2a2d 2063 6f64 696e 673a  ...# -*- coding:
tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt
000: efbb bf23 2049 4d50 4f52 5441 4e54 3a20  ...# IMPORTANT: 
tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt
000: efbb bf23 202d 2a2d 2063 6f64 696e 673a  ...# -*- coding:
tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt
000: efbb bf23 202d 2a2d 2063 6f64 696e 673a  ...# -*- coding:

>From this, it appears that the file called 
>"tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt" actually has a 
>UTF-8 BOM signature, which means either the comment is lying or the BOM was 
>accidentally added to the test file at some point.

--
messages: 140694
nosy: nneonneo
priority: normal
severity: normal
status: open
title: tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM 
signature
type: behavior
versions: Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10309] dlmalloc.c needs _GNU_SOURCE for mremap()

2011-07-19 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Python 3.1 is in security only mode, so this patch cannot be applied to that 
version.

--
versions: +Python 3.3 -Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12588] test_capi.test_subinterps() failed on OpenBSD (powerpc)

2011-07-19 Thread rpointel

New submission from rpointel :

Hello,
the test test_subinterps failed on OpenBSD on powerpc architecture.
It works fine on amd64 and sparc64.
(The test_pendingcalls_threaded has been skipped because it blocks on OpenBSD).

Don't hesitate if you need more informations.
Details:

Re-running test 'test_capi' in verbose mode
test_instancemethod (test.test_capi.CAPITest) ... ok
test_memoryview_from_NULL_pointer (test.test_capi.CAPITest) ... ok
test_no_FatalError_infinite_loop (test.test_capi.CAPITest) ... ok
test_pendingcalls_non_threaded (test.test_capi.TestPendingCalls) ... ok
test_pendingcalls_threaded (test.test_capi.TestPendingCalls) ... skipped 
'blocking on OpenBSD'
test (test.test_capi.Test6012) ... ok
test_subinterps (test.test_capi.EmbeddingTest) ... test test_capi failed
FAIL

==
FAIL: test_subinterps (test.test_capi.EmbeddingTest)
--
Traceback (most recent call last):
  File "/usr/obj/ports/Python-3.2.1/Python-3.2.1/Lib/test/test_capi.py", line 
170, in test_subinterps
(p.returncode, err))
AssertionError: -11 != 0 : bad returncode -11, stderr is b''

--
Ran 7 tests in 3.797s

FAILED (failures=1, skipped=1)

--
components: Tests
messages: 140696
nosy: rpointel
priority: normal
severity: normal
status: open
title: test_capi.test_subinterps() failed on OpenBSD (powerpc)
versions: Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12589] test_long.test_nan_inf() failed on OpenBSD (powerpc)

2011-07-19 Thread rpointel

New submission from rpointel :

Hello,
the test test_nan_inf failed on OpenBSD on powerpc architecture.
It works fine on amd64 and sparc64.

Don't hesitate if you need more informations.
Details:

Re-running test 'test_long' in verbose mode
test__format__ (test.test_long.LongTest) ... ok
test_bit_length (test.test_long.LongTest) ... ok
test_bitop_identities (test.test_long.LongTest) ... ok
test_conversion (test.test_long.LongTest) ... ok
test_correctly_rounded_true_division (test.test_long.LongTest) ... ok
test_division (test.test_long.LongTest) ... ok
test_float_conversion (test.test_long.LongTest) ... ok
test_float_overflow (test.test_long.LongTest) ... ok
test_format (test.test_long.LongTest) ... ok
test_from_bytes (test.test_long.LongTest) ... ok
test_karatsuba (test.test_long.LongTest) ... ok
test_logs (test.test_long.LongTest) ... ok
test_long (test.test_long.LongTest) ... ok
test_mixed_compares (test.test_long.LongTest) ... ok
test_nan_inf (test.test_long.LongTest) ... FAIL
test_round (test.test_long.LongTest) ... ok
test_small_ints (test.test_long.LongTest) ... ok
test_to_bytes (test.test_long.LongTest) ... ok
test_true_division (test.test_long.LongTest) ... 
/usr/obj/ports/Python-3.2.1/Python-3.2.1/Lib/test/regrtest.py:1053: 
ResourceWarning: unclosed 
  gc.collect()
/usr/obj/ports/Python-3.2.1/Python-3.2.1/Lib/test/regrtest.py:1053: 
ResourceWarning: unclosed 
  gc.collect()
/usr/obj/ports/Python-3.2.1/Python-3.2.1/Lib/test/regrtest.py:1053: 
ResourceWarning: unclosed 
  gc.collect()
test test_long failed
ok

==
FAIL: test_nan_inf (test.test_long.LongTest)
--
Traceback (most recent call last):
  File "/usr/obj/ports/Python-3.2.1/Python-3.2.1/Lib/test/test_long.py", line 
633, in test_nan_inf
self.assertRaises(OverflowError, int, float('inf'))
AssertionError: OverflowError not raised by int

--
Ran 19 tests in 25.020s

FAILED (failures=1)

--
components: Tests
messages: 140697
nosy: rpointel
priority: normal
severity: normal
status: open
title: test_long.test_nan_inf() failed on OpenBSD (powerpc)
versions: Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12589] test_long.test_nan_inf() failed on OpenBSD (powerpc)

2011-07-19 Thread STINNER Victor

STINNER Victor  added the comment:

What is the result of int(float('inf')) ?

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Ned Deily

Ned Deily  added the comment:

It looks like a BOM has been present in that file for a *long* time: it is 
there in the Python 3.0 source tarball, and, according to the converted 
svn-to-hg history, it was there in its original check-in and is still there in 
the current development tip.

--
nosy: +ned.deily, trent
stage:  -> needs patch
versions: +Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12571] Python built on Linux 3.0 doesn't include DLFCN

2011-07-19 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 69dd70e70cc8 by Antoine Pitrou in branch '2.7':
Issue #12571: Add a plat-linux3 directory mirroring the plat-linux2 directory,
http://hg.python.org/cpython/rev/69dd70e70cc8

New changeset 9e3b28a7898f by Antoine Pitrou in branch '3.2':
Issue #12571: Add a plat-linux3 directory mirroring the plat-linux2 directory,
http://hg.python.org/cpython/rev/9e3b28a7898f

New changeset 0c52098a13c6 by Antoine Pitrou in branch 'default':
Issue #12571: Add a plat-linux3 directory mirroring the plat-linux2 directory,
http://hg.python.org/cpython/rev/0c52098a13c6

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12571] Python built on Linux 3.0 doesn't include DLFCN

2011-07-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Should be fixed now.

--
nosy: +pitrou
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior
versions: +Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Robert Xiao

Robert Xiao  added the comment:

Yes, it seems that way. Then the question is: why does the comment claim that 
it doesn't have a BOM?

Also, test_tokenize.py is wrong around line 651:

def test_utf8_coding_cookie_and_no_utf8_bom(self):
f = 'tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt'
self.assertTrue(self._testFile(f))

It reads the wrong file in this case, judging by the testcase name. (This makes 
it a duplicate of the test_utf8_coding_cookie_and_utf8_bom case)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-07-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Copying plat-linux2 to plat-linux3 should be just fine.

Done in issue12571.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Robert Xiao

Robert Xiao  added the comment:

Attached is a patch which fixes this. Python 3.2.1 still passes the test after 
applying the patch, as expected.

--
keywords: +patch
Added file: http://bugs.python.org/file22701/issue12587.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12588] test_capi.test_subinterps() failed on OpenBSD (powerpc)

2011-07-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

test_subinterps merely runs ./Modules/_testembed, so perhaps you could launch 
it manually and see what it does?
(chances are it crashes, then can you please post the backtrace using a 
debugger?)

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12372] semaphore errors on AIX 7.1

2011-07-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The patch looks fine to me.

> in the finance industry in particular

Ha, I've seen that. There are even proprietary desktop applications for AIX!

--
stage: patch review -> commit review
type:  -> behavior
versions: +Python 3.2, Python 3.3 -Python 2.6, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0c254698e0ed by Ned Deily in branch '3.2':
Issue #12587: Correct faulty test file and reference in test_tokenize.
http://hg.python.org/cpython/rev/0c254698e0ed

New changeset c1d2b6b337c5 by Ned Deily in branch 'default':
Issue #12587: Correct faulty test file and reference in test_tokenize.
http://hg.python.org/cpython/rev/c1d2b6b337c5

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-07-19 Thread STINNER Victor

STINNER Victor  added the comment:

> Your patch looks fine to me, except for this:
> -if (platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
> -'freebsd7', 'freebsd8')
> -or platform.startswith("gnukfreebsd")):
> +if os.uname()[0] in ('Linux', 'FreeBSD'):
> 
> Why not use platform.system(), to be consistent?

I'm not sure that thp platform module can be used in setup.py 
(bootstrap issue?). It should be tested.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12587] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt has a UTF8 BOM signature

2011-07-19 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the report and the patch!  Applied to 3.2 (for 3.2.2) and default 
(for 3.3).

--
assignee:  -> ned.deily
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-07-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le mardi 19 juillet 2011 à 23:20 +, STINNER Victor a écrit :
> STINNER Victor  added the comment:
> 
> > Your patch looks fine to me, except for this:
> > -if (platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
> > -'freebsd7', 'freebsd8')
> > -or platform.startswith("gnukfreebsd")):
> > +if os.uname()[0] in ('Linux', 'FreeBSD'):
> > 
> > Why not use platform.system(), to be consistent?
> 
> I'm not sure that thp platform module can be used in setup.py 
> (bootstrap issue?). It should be tested.

Why don't you just use platform.startswith? It would avoid introducing
bugs due to subtle differences between uname, platform or
platform.system.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10309] dlmalloc.c needs _GNU_SOURCE for mremap()

2011-07-19 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 8f3cc8ffc3ff by Barry Warsaw in branch '2.7':
- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
http://hg.python.org/cpython/rev/8f3cc8ffc3ff

New changeset cc00e09404e6 by Barry Warsaw in branch '3.2':
- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
http://hg.python.org/cpython/rev/cc00e09404e6

New changeset 9986fff720a2 by Barry Warsaw in branch 'default':
- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
http://hg.python.org/cpython/rev/9986fff720a2

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10309] dlmalloc.c needs _GNU_SOURCE for mremap()

2011-07-19 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: [issue12524] change httplib docs POST example

2011-07-19 Thread Senthil Kumaran
Hello Eric,

On Tue, Jul 19, 2011 at 01:05:59PM +, Éric Araujo wrote:

> Alternate idea: use example.org.  People won’t be able to actually
> run the example, but is it really important?

The whole idea is present a usable example. Please don't suggest
unusable example. example.org does not support POST.

___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10141] SocketCan support

2011-07-19 Thread Miguel Luis

Changes by Miguel Luis :


--
nosy: +mluis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10141] SocketCan support

2011-07-19 Thread Tiago Gonçalves

Tiago Gonçalves  added the comment:

This patch should be easy to verify and includes documentation and the test 
cases.

ogait87@mypc:~/cpython$ hg sum
parent: 71435:6f9d917df541 tip
 Fix test_multiprocessing failure under Windows.
branch: default
commit: 7 modified
update: (current)

--
keywords: +patch
Added file: http://bugs.python.org/file22702/socketcan.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12583] More detailed ImportError messages

2011-07-19 Thread R. David Murray

R. David Murray  added the comment:

Yes, there are ways other than an import statement that a module can get 
imported (the __import__ function, for example, and the imp module for another, 
as well as importlib).

If you want to try your hand at writing a patch to do the post mortem you will 
discover that import in Python is...complicated.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2011-07-19 Thread Kuberan Naganathan

Kuberan Naganathan  added the comment:

Hi.  I can submit a patch for the first part.  Should I submit on this issue 
tracker item?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12590] First line and cursor not visible when opening files

2011-07-19 Thread Simon Forman

New submission from Simon Forman :

In IDLE if you open a file that is longer than the editor window the first 
line, with the cursor, is scrolled off the top of the window making it appear 
as though the file begins at the second line.

This can be fixed by adding 'text.see("insert")' to the end of the EditorWindow 
__init__() method, but see Bruce Sherwood's comment on 
http://bugs.python.org/issue10079#msg118618

--
components: IDLE
messages: 140716
nosy: sforman
priority: normal
severity: normal
status: open
title: First line and cursor not visible when opening files
type: behavior
versions: Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12590] First line and cursor not visible when opening files

2011-07-19 Thread Ned Deily

Changes by Ned Deily :


--
assignee:  -> ned.deily
nosy: +ned.deily
versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12531] documentation index entries for * and **

2011-07-19 Thread Eli Bendersky

Eli Bendersky  added the comment:

Peter, would you like to submit a corrected patch?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

2011-07-19 Thread Nasos Dousis

Nasos Dousis  added the comment:

Ronald, thanks again.  I stripped out as much as I could from the
original code and generated the attached project.  In doing so, I
narrowed the problem down to boost/weak_ptr.hpp.

The sample project consists of:

test-boost-python/Makefile
test-boost-python/src
test-boost-python/src/Jamroot
test-boost-python/src/test
test-boost-python/src/test/Jamfile
test-boost-python/src/test/TestBoostPython.cc
test-boost-python/src/test/TestBoostPython.hh
test-boost-python/tools/Makefile

Before building the project (just type "make" in test-boost-python),
you'll need to download Boost and save it to
test-boost-python/tools/boost/boost.tar.bz2; also, the tools/Makefile
automatically downloads Python 2.7.2, but you can try Python 3.2+ in
its place.

Thanks and kind regards,
Nasos

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

2011-07-19 Thread Nasos Dousis

Nasos Dousis  added the comment:

With attachment--

--
Added file: http://bugs.python.org/file22703/test-boost-python.tar.gz

___
Python tracker 

___

test-boost-python.tar.gz
Description: GNU Zip compressed data
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12591] configparser can't read_file the output of subprocess.Popen

2011-07-19 Thread Matt Joiner

New submission from Matt Joiner :

>>> a = subprocess.Popen(['cat', '/path/to/text.ini'], stdout=subprocess.PIPE, 
>>> universal_newlines=True)
>>> b = configparser.ConfigParser()
>>> b.read_file(a.stdout)
Traceback (most recent call last):
  File "", line 1, in 
  File "/hostname/sig/local/lib/python3.2/configparser.py", line 708, in 
read_file
self._read(f, source)
  File "/hostname/sig/local/lib/python3.2/configparser.py", line 994, in _read
for lineno, line in enumerate(fp, start=1):
AttributeError: '_io.FileIO' object has no attribute 'read1'

Also this fails without universal_readlines, which is not so bad except that 
the name 'read_file' doesn't exactly indicate this.

I found one mildly related bug: http://bugs.python.org/issue11670

--
components: IO, Interpreter Core, Library (Lib)
messages: 140720
nosy: anacrolix
priority: normal
severity: normal
status: open
title: configparser can't read_file the output of subprocess.Popen
versions: Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12545] Incorrect handling of return codes in the posix_lseek function in posixmodule.c

2011-07-19 Thread Charles-François Natali

Charles-François Natali  added the comment:

> Hi.  I can submit a patch for the first part.  Should I submit on this issue 
> tracker item?
>

Sure.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com