[issue39959] Bug on multiprocessing.shared_memory

2020-05-13 Thread Floris


Floris  added the comment:

I confirm the same issue as Diogo. The provided workaround of unregistering the 
sharedmemory segment in the 'consuming' process, as suggested by Jeff, solves 
the issue where exiting the consuming process causes the tracker to incorrectly 
free the shared memory. Diogo's fix to shared_memory.py#L116 does just that 
(actually it avoids registering it in the first place) and therefor seems ok to 
me.

--
nosy: +fvdnabee

___
Python tracker 
<https://bugs.python.org/issue39959>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13338] Not all enumerations used in _Py_ANNOTATE_MEMORY_ORDER

2011-11-03 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

Hi,

When compiling using gcc and -Werror=switch-enum the compilation fails, e.g. 
while compiling an extension module:

In file included from /usr/include/python3.2mu/Python.h:52:0,
 from src/util.c:27:
/usr/include/python3.2mu/pyatomic.h: In function ‘_Py_ANNOTATE_MEMORY_ORDER’:
/usr/include/python3.2mu/pyatomic.h:61:5: error: enumeration value 
‘_Py_memory_order_relaxed’ not handled in switch [-Werror=switch-enum]
/usr/include/python3.2mu/pyatomic.h:61:5: error: enumeration value 
‘_Py_memory_order_acquire’ not handled in switch [-Werror=switch-enum]
/usr/include/python3.2mu/pyatomic.h:70:5: error: enumeration value 
‘_Py_memory_order_relaxed’ not handled in switch [-Werror=switch-enum]
/usr/include/python3.2mu/pyatomic.h:70:5: error: enumeration value 
‘_Py_memory_order_release’ not handled in switch [-Werror=switch-enum]

This could be easily resolved without any drawbacks by simply listing the 
missing enumeration items together with the default.  And that would enable 
extensions to be built using -Werror=switch-enum again.

Regards,
Floris

--
components: Interpreter Core
messages: 146993
nosy: flub
priority: normal
severity: normal
status: open
title: Not all enumerations used in _Py_ANNOTATE_MEMORY_ORDER
type: compile error
versions: Python 3.2, Python 3.3

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



[issue13338] Not all enumerations used in _Py_ANNOTATE_MEMORY_ORDER

2011-11-06 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

Apologies for not attaching a patch, I thought it was pretty trivial.  Attached 
it now.

--
keywords: +patch
Added file: http://bugs.python.org/file23616/pyatomic.diff

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



[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked

2012-01-11 Thread Floris Bruynooghe

Changes by Floris Bruynooghe :


--
nosy: +flub

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



[issue12419] Add ident parameter to SysLogHandler

2011-06-27 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

It would be nice if the SysLogHandler also accepted an "ident" parameter in 
line with the syslog.openlog() function.  This simply prepends the string 
passed in as "ident" to each log message which currently needs to be 
implemented with a log filter which modifies the record.

--
components: Library (Lib)
messages: 139260
nosy: flub
priority: normal
severity: normal
status: open
title: Add ident parameter to SysLogHandler
type: feature request
versions: Python 3.3

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



[issue12419] Add ident parameter to SysLogHandler

2011-06-27 Thread Floris Bruynooghe

Changes by Floris Bruynooghe :


--
nosy: +vinay.sajip

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



[issue12419] Add ident parameter to SysLogHandler

2011-06-27 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

That was quick, thanks!

--

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



[issue9608] Re-phrase best way of using exceptions in doanddont.rst

2010-08-15 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

The description of how to best use exceptions is slightly confusing and led me 
to believe there was an issue when using open() as a context manager.  The main 
issue is that the wording seems to suggest the example above it is the best and 
not the very last.

Attached is a patch which uses a slightly different wording which IMHO makes it 
clearer that the with-statement is the preferred method and does not introduce 
subtle bugs.

--
assignee: d...@python
components: Documentation
files: doandont.diff
keywords: patch
messages: 113949
nosy: d...@python, flub
priority: normal
severity: normal
status: open
title: Re-phrase best way of using exceptions in doanddont.rst
type: feature request
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file18538/doandont.diff

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



[issue9912] Fail when vsvarsall.bat produces stderr

2010-09-21 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

It would have saved me a lot of time if msvc9compiler would fail if executing 
the vsvarsall.bat file produced any output.  The attached patch does this and 
fails when I try to compile from within a cygwin environment.  I've also tested 
this from the normal windows command prompt and there buiding does succeed with 
this patch applied.

--
assignee: tarek
components: Distutils
files: msvc9.diff
keywords: patch
messages: 117067
nosy: eric.araujo, flub, tarek
priority: normal
severity: normal
status: open
title: Fail when vsvarsall.bat produces stderr
type: feature request
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file18950/msvc9.diff

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



[issue9912] Fail when vsvarsall.bat produces stderr

2010-09-21 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

I'm aware of that but my limited testing showed that in this case that doesn't 
happen.

However if this is considered too brittle to just plain fail as soon as there's 
stderr, how about using distutils' log facility to log the stderr at a 
reasonable level (warning?)?  That way at least you'll be able to see something 
useful when you get a failure at a strange looking and far less meaningful 
traceback a few lines lower.

--

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



[issue9912] Fail when vsvarsall.bat produces stderr

2010-09-21 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

msvc9_log.diff does log stderr at warning level when it occurs.

--
Added file: http://bugs.python.org/file18961/msvc9_log.diff

___
Python tracker 
<http://bugs.python.org/issue9912>
___
___
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

2010-10-18 Thread Floris Bruynooghe

Changes by Floris Bruynooghe :


--
nosy: +flub

___
Python tracker 
<http://bugs.python.org/issue3526>
___
___
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-04-26 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

> > So by using dlmalloc on SunOS and AIX you would get the same level
> > of performance for memory operations that you already probably can
> > appreciate on Linux systems.
>
> Yes, but with the above "trick", you can do that without patching
> python nor your app.
> I mean, if you start embedding malloc in python, why stop there, and
> not embed the whole glibc ;-)
> Note that I realize this won't solve the problem for other AIX users
> (if there are any left :-), but since this patch doesn't seem to be
> gaining adhesion, I'm just proposing an alternative that I find
> cleaner, simpler and easier to maintain.

This trick is hard to find however and I don't think it serves Solaris
and AIX users very much (and sadly IBM keeps pushing AIX so yes it's
used more then I like :-( ).

So how about a --with-dlmalloc=path/to/dlmalloc.c?  This way the
dlmalloc code does not live inside Python and doesn't need to be
maintained by python.  But python still supports the code and will
easily be built using it.  Add a note in the README for AIX and
Solaris and I think this would be a lot friendlier to users.  This is
similar in how python uses e.g. openssl to provide optional extra
functionality/performance.

--

___
Python tracker 
<http://bugs.python.org/issue3526>
___
___
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-04-29 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

On 29 April 2011 17:16, Antoine Pitrou  wrote:
>
> Antoine Pitrou  added the comment:
>
>> Yes, I was probably not clear:
>> When --with-dlmalloc is activated, PyMem_MALLOC/PyMem_Malloc will call
>> dlmalloc, PyMem_REALLOC/PyMem_Realloc will call dlrealloc and
>> PyMem_FREE/PyMem_Free will call dlfree.
>>
>> While calls to malloc/free/realloc will use the platform implementation.
>
> I'm not sure why you would want that. If dlmalloc is clearly superior,
> why not use it for all allocations inside the application (not only
> Python ones)?

For the same reason that extension modules can choose between
PyMem_Malloc and plain malloc (or whatever else).  Python has never
forced it's malloc on extension modules why should it now?

--

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



[issue5672] Implement a way to change the python process name

2010-12-29 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

There are actually a few implementations on pypi, just search for
prctl.  At least one of them is pretty decent IIRC but I can't
remember which one I looked at in detail before.  Anyway, they would
certainly be a reasonable starting point for python inclusion.

--

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



[issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual()

2010-04-08 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

This patch adds the ability to suppress large diffs in the failure message of 
TestCase.assertSequenceEqual().  The maximum size of the diff is customisable 
as an new keyword parameter with hopefully a sensible default.

--
components: Library (Lib)
files: case_seq.diff
keywords: patch
messages: 102653
nosy: flub
severity: normal
status: open
title: Suppress large diffs in unitttest.TestCase.assertSequenceEqual()
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file16831/case_seq.diff

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



[issue2125] [patch] Read support for Records in msilib

2008-02-15 Thread Floris Bruynooghe

New submission from Floris Bruynooghe:

The msilib documentation mentions that read support of MSI files is
supported, however the actual methods on the Record class for it are
missing.  This patch wraps two more functions from the MSI API to the
record class, enabling to read integers and strings.  The only one left
then (AFAIK) is "Stream" but I didn't need that so couldn't test it.

--
components: Extension Modules, Library (Lib), Windows
files: msilib.diff
messages: 62432
nosy: flub
severity: normal
status: open
title: [patch] Read support for Records in msilib
versions: Python 2.5, Python 2.6
Added file: http://bugs.python.org/file9437/msilib.diff

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2125>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4483] Error to build _dbm module during make

2008-12-06 Thread Floris Bruynooghe

Floris Bruynooghe <[EMAIL PROTECTED]> added the comment:

Hi, I'd like to confirm that Skip's last patch fixes the issue.  Hope it
gets included soon!

Thanks

--
nosy: +flub

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



[issue4950] Redundant declaration in pyerrors.h

2009-01-14 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

When compiling with -Wredundant-decls gcc spots a redundant declaration:

f...@laurie:sandbox$ cat test.c 
#include 
#include 

int main(void)
{
printf("hello\n");
return 0;
}
f...@laurie:sandbox$ gcc -I /usr/local/include/python3.0/
-Wredundant-decls test.c 
In file included from /usr/local/include/python3.0/Python.h:102,
 from test.c:1:
/usr/local/include/python3.0/pyerrors.h:155: warning: redundant
redeclaration of ‘PyExc_BufferError’
/usr/local/include/python3.0/pyerrors.h:147: warning: previous
declaration of ‘PyExc_BufferError’ was here
f...@laurie:sandbox$

This is annoying since when developing extension modules I usually use
-Werror on top of -Wredundant-decls (among others).

Regards
Floris

--
components: Extension Modules
messages: 79870
nosy: flub
severity: normal
status: open
title: Redundant declaration in pyerrors.h
type: compile error
versions: Python 3.0, Python 3.1

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



[issue4908] adding a get_metadata in distutils

2009-01-30 Thread Floris Bruynooghe

Changes by Floris Bruynooghe :


--
nosy: +flub

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



[issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build

2009-02-10 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

When specifying an RPATH with -rpath or -R you can use the special
tokens `$LIB' and `$ORIGIN' which the runtime linker interprets as
"normal search path" and "relative to current sofile" respectively.  To
get these correctly to the gcc command line you need to specify this in
LDFLAGS as `\$$LIB' to work around escapes of both the makefile and
shell, so in the Python Makefile this will appear somewhere as (this is
on one line):

CONFIG_ARGS= '--prefix=/opt/example.com/python25'
'LDFLAGS=-Wl,-rpath=\$$LIB:/opt/example.com/lib,--enable-new-dtags'

This works for compiling the main python binary.  But when the extension
modules get compiled distutils chokes on this. 
distutils.sysconfig.parse_makefile() does think that any value of a
variable that contains `$' in it refers to an other variable in the
makefile.  It will fail to find the value and CONFIG_ARGS will not be
defined.  This then fails in setup.py for the _ctypes extension:

if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
return

Where `None' is returned instead of a list by .get_config_var().

It seems that distutils.sysconfig.parse_makefile() needs to understand
more of the makefile synatax to deal with this.

--
assignee: tarek
components: Distutils
messages: 81538
nosy: flub, tarek
severity: normal
status: open
title: Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the 
build
type: compile error
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0

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



[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-12 Thread Floris Lambrechts


Floris Lambrechts  added the comment:

I've written an "Absolute paths" section based on the knowledge I found in the 
various threads.

Any review is appreciated.

https://github.com/florisla/cpython/tree/pathlib-chapter-absolute-paths

With some related documentation changes:

https://github.com/florisla/cpython/tree/absolute-path-related-improvements

--
nosy: +florisla

___
Python tracker 
<https://bugs.python.org/issue39090>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-12 Thread Floris Lambrechts


Floris Lambrechts  added the comment:

This is the new chapter:

https://github.com/florisla/cpython/commit/c146ad3d086fe9e401284c12fc670ea4f9398f3b

--

___
Python tracker 
<https://bugs.python.org/issue39090>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-24 Thread Floris Lambrechts


Floris Lambrechts  added the comment:

@ChrisBarker,

Could you review the proposed addition to the documentation?

https://github.com/florisla/cpython/commit/c146ad3d086fe9e401284c12fc670ea4f9398f3b

--

___
Python tracker 
<https://bugs.python.org/issue39090>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-24 Thread Floris Lambrechts


Floris Lambrechts  added the comment:

(sorry, didn't see the GitHub comments before... I'll process those first.)

--

___
Python tracker 
<https://bugs.python.org/issue39090>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-24 Thread Floris Lambrechts


Floris Lambrechts  added the comment:

Based on the feedback received in GitHub here:
https://github.com/florisla/cpython/commit/c146ad3d086fe9e401284c12fc670ea4f9398f3b

I made a new revision of the 'Absolute paths' chapter here:
https://github.com/florisla/cpython/blob/pathlib-chapter-absolute-paths-2/Doc/library/pathlib.rst#absolute-paths

Further feedback is welcome.

Changes:

* Be more 'in your face' about Path.resolve() being the recommended
  approach.
* Add separate section on Windows considerations
* Explain difference between Path.resolve() and os.path.isabs() w.r.t.
  checking for drive.
* Refer to 'mapped share' instead of 'mapped network share'.
* Explain replacement of substitute drive with final path.
* Mention os.path.abspath's upcasing of drive letter in case of
  a path missing a root.
* Mention different handling of junctions versus symlinks w.r.t.
  relative parts.

For brevity, I've kept the wording on substitute drive and handling of
junctions very short.

For the same reason I did not not include eryksun's (interesting!) info
on why mapped and substitute drives are non-canonical.

Not mentioning Path.resolve()'s behavior w.r.t. non-existing files since
that's documented in resolve() itself.

--

___
Python tracker 
<https://bugs.python.org/issue39090>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8881] socket.getaddrinfo() should return named tuples

2012-01-13 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

I think the part which could possibly a problem is addressed in 
http://hg.python.org/cpython/rev/384f73a104e9/.  Bearing in mind that direct 
usage for string interpolation is a pretty strange use for the result of 
getaddrinfo.

--
nosy: +flub

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



[issue8881] socket.getaddrinfo() should return named tuples

2012-07-07 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

Attached in a patch for this, I've also changed the version to 3.4 since this 
is a feature and therefore probably too late to go in 3.3.  Please let me know 
if anything is inadequate.

--
keywords: +patch
versions: +Python 3.4 -Python 3.3
Added file: http://bugs.python.org/file26287/getaddrinfo.patch

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



[issue14290] Importing script as module causes ImportError with pickle.load

2012-07-07 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

Hi, I think this is a usage error and if not you should try to provide a test 
case with both files for this.

Pickle needs to be able to import the module which contains the classes by the 
same name as the original module.  That means pickling an instance of a class 
defined in a script will not work unless it is the same script which did the 
pickling.  The object is probably pickled under the name __main__.YourClass and 
when you import it in another script it will be objectScript.YourClass, hence 
pickle is unable to find the class for the object you are trying to unpickle.

--
nosy: +flub

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



[issue15589] Bus error on Debian sparc

2012-08-08 Thread Floris Bruynooghe

Floris Bruynooghe added the comment:

Running on Solaris 10 (T1000, OpenCSW toolchain, gcc 4.6.3) I also get a bus 
error, with added coredump:

$ ./python Lib/test/regrtest.py 
== CPython 3.3.0b1 (default:67a994d5657d, Aug 8 2012, 21:43:48) [GCC 4.6.3]
==   Solaris-2.10-sun4v-sparc-32bit big-endian
==   /export/home/flub/python/cpython/build/test_python_7320
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1)
[  1/369] test_grammar
[  2/369] test_opcodes
[  3/369] test_dict
[  4/369] test_builtin
[  5/369] test_exceptions
test test_exceptions failed -- Traceback (most recent call last):
  File "/export/home/flub/python/cpython/Lib/test/test_exceptions.py", line 
432, in testChainingDescriptors
self.assertTrue(e.__suppress_context__)
AssertionError: False is not true

[  6/369/1] test_types
[  7/369/1] test_unittest
[  8/369/1] test_doctest
[  9/369/1] test_doctest2
[ 10/369/1] test_support
[ 11/369/1] test___all__
[ 12/369/1] test___future__
[ 13/369/1] test__locale
[ 14/369/1] test__osx_support
[ 15/369/1] test_abc
[ 16/369/1] test_abstract_numbers
[ 17/369/1] test_aifc
[ 18/369/1] test_argparse
[ 19/369/1] test_array
[ 20/369/1] test_ast
[ 21/369/1] test_asynchat
[ 22/369/1] test_asyncore
[ 23/369/1] test_atexit
[ 24/369/1] test_audioop
[ 25/369/1] test_augassign
[ 26/369/1] test_base64
[ 27/369/1] test_bigaddrspace
[ 28/369/1] test_bigmem
[ 29/369/1] test_binascii
[ 30/369/1] test_binhex
[ 31/369/1] test_binop
[ 32/369/1] test_bisect
[ 33/369/1] test_bool
[ 34/369/1] test_buffer
[ 35/369/1] test_bufio
[ 36/369/1] test_bytes
[ 37/369/1] test_bz2
[ 38/369/1] test_calendar
[ 39/369/1] test_call
[ 40/369/1] test_capi
Fatal Python error: Bus error

Current thread 0x0001:
  File "/export/home/flub/python/cpython/Lib/test/test_capi.py", line 264 in 
test_skipitem
  File "/export/home/flub/python/cpython/Lib/unittest/case.py", line 385 in 
_executeTestPart
  File "/export/home/flub/python/cpython/Lib/unittest/case.py", line 440 in run
  File "/export/home/flub/python/cpython/Lib/unittest/case.py", line 492 in 
__call__
  File "/export/home/flub/python/cpython/Lib/unittest/suite.py", line 105 in run
  File "/export/home/flub/python/cpython/Lib/unittest/suite.py", line 67 in 
__call__
  File "/export/home/flub/python/cpython/Lib/unittest/suite.py", line 105 in run
  File "/export/home/flub/python/cpython/Lib/unittest/suite.py", line 67 in 
__call__
  File "/export/home/flub/python/cpython/Lib/test/support.py", line 1312 in run
  File "/export/home/flub/python/cpython/Lib/test/support.py", line 1413 in 
_run_suite
  File "/export/home/flub/python/cpython/Lib/test/support.py", line 1447 in 
run_unittest
  File "/export/home/flub/python/cpython/Lib/test/test_capi.py", line 290 in 
test_main
  File "Lib/test/regrtest.py", line 1219 in runtest_inner
  File "Lib/test/regrtest.py", line 941 in runtest
  File "Lib/test/regrtest.py", line 714 in main
  File "Lib/test/regrtest.py", line 1810 in 
Bus Error (core dumped)


Not sure if this should be tracked in the same issue or not?

--
nosy: +flub

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



[issue15589] Bus error on Debian sparc

2012-08-08 Thread Floris Bruynooghe

Floris Bruynooghe added the comment:

I compiled with a simple "./configure" which I think is what you mean (it 
defaults to -O3).  But when executing your test it doesn't give a bus error.

--

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



[issue15589] Bus error on Debian sparc

2012-08-08 Thread Floris Bruynooghe

Floris Bruynooghe added the comment:

I think I can confirm this fixes the BusError.  The test suite got past 
test_capi on my machine as well.  Unfortunately I killed the ssh session by 
accident before the testsuite completed so I had to restart it.

--

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



[issue15589] Bus error on Debian sparc

2012-08-08 Thread Floris Bruynooghe

Floris Bruynooghe added the comment:

I can now confirm the whole testsuite runs, so the BusError part seems fixed on 
my host:

329 tests OK.
7 tests failed:
test_cmd_line test_exceptions test_ipaddress test_os test_raise
test_socket test_traceback
1 test altered the execution environment:
test_site
32 tests skipped:
test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
test_codecmaps_kr test_codecmaps_tw test_curses test_dbm_gnu
test_epoll test_gdb test_kqueue test_lzma test_msilib
test_ossaudiodev test_pep277 test_readline test_smtpnet
test_socketserver test_sqlite test_ssl test_startfile test_tcl
test_timeout test_tk test_ttk_guionly test_ttk_textonly
test_unicode_file test_urllib2net test_urllibnet test_winreg
test_winsound test_xmlrpc_net test_zipfile64
8 skips unexpected on sunos5:
test_lzma test_readline test_smtpnet test_ssl test_tcl test_tk
test_ttk_guionly test_ttk_textonly

--

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



[issue15617] FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer)

2012-08-10 Thread Floris Bruynooghe

New submission from Floris Bruynooghe:

The SPARC Solaris 10 OpenCSW 3.x builder fails with

==
FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer)
--
Traceback (most recent call last):
  File 
"/export/home/buildbot/buildarea/3.x.bruynooghe-solaris-csw/build/Lib/test/test_socket.py",
 line 4101, in test_create_connection
self.assertEqual(cm.exception.errno, errno.ECONNREFUSED)
AssertionError: 128 != 146

Here 128 is ENETUNREACH

I think the issue here is that socket.create_connection iterates over the 
result of socket.getaddrinfo('localhost', port, 0, SOCK_STREAM) which returns 
[(2, 2, 0, '', ('127.0.0.1', 0)), (26, 2, 0, '', ('::1', 0, 0, 0))] on this 
host.

The first result is tried and returns ECONNREFUSED but then the second address 
is tried and this returns ENETUNREACH because this host has not IPv6 network 
configured.  And create_connection() raises the last exception it received.

If getaddrinfo() is called with the AI_ADDRCONFIG flag then it will only return 
the IPv4 version of localhost.

--
components: Tests
messages: 167867
nosy: flub
priority: normal
severity: normal
status: open
title: FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer)
type: behavior
versions: Python 3.3

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



[issue15617] FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer)

2012-08-10 Thread Floris Bruynooghe

Floris Bruynooghe added the comment:

It was my understanding that this is what the AI_ADDRCONFIG flag is
for, if you don't use it you have no such guarantee.

--

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



[issue15617] FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer)

2012-08-10 Thread Floris Bruynooghe

Floris Bruynooghe added the comment:

I think this is influenced by what  you have in /etc/hosts.  On my
laptop I also have IPv6 loopback as well as an IPv6 link-local on
eth0.  But I have both 127.0.0.1 and ::1 in /etc/hosts as locahost.
With that configuration I get the same getaddrinfo results as on the
solaris host (which btw, has the same /etc/hosts configuration for
localhost, i.e. both IPv4 & IPv6).  Basically I don't think loopback
and link-local addresses count as "configured address" for
getaddrinfo.

Btw, removing the "::1 localhost" line from /etc/hosts on the solaris
host does fix the issue and gives the same results you show.  But I
don't think this is correct.  My linux laptop behaves exactly the same
as the solaris host here.

--

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



[issue15617] FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer)

2012-08-12 Thread Floris Bruynooghe

Floris Bruynooghe added the comment:

I have no issue with changing the buildhost's zone configuration if that's
the right thing to do. Just one more option. Is widening the expected errno
in the test a valid thing to do?

--

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



[issue15643] Support OpenCSW in setup.py

2012-08-13 Thread Floris Bruynooghe

New submission from Floris Bruynooghe:

This patch proposes to add out of the box support for building against OpenCSW 
libraries on Solaris.  It makes building all the extension modules a lot 
simpler since the CSW repositories provide almost all required libaries.

The order of preference is /usr/local, then /opt/csw which should prefer 
libaries manually installed by the admin.

--
components: Build
files: csw_setup.py.diff
keywords: patch
messages: 168156
nosy: flub
priority: normal
severity: normal
status: open
title: Support OpenCSW in setup.py
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file26789/csw_setup.py.diff

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



[issue15617] FAIL: test_create_connection (test.test_socket.NetworkConnectionNoServer)

2014-07-17 Thread Floris Bruynooghe

Floris Bruynooghe added the comment:

Oops, I've kicked the bruynooghe-solaris-csw buildslave and it should now be 
building again.  A bit disappointed that buildbot/twisted doesn't reconnect 
automatically though.

--

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



[issue20671] test_create_at_shutdown_with_encoding() of test_io hangs on "SPARC Solaris 10 OpenCSW 3.x"

2014-02-21 Thread Floris Bruynooghe

Floris Bruynooghe added the comment:

Turns out that the timeout is configured in the buildmaster's master.cfg which 
Antoine Pitrou has kindly done.  It should also run tests a bit more parallel 
now which will hopefully reduce the 10h runtime a bit, but it remains a slow 
box.

--
nosy: +flub

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



[issue5672] Implement a way to change the python process name

2009-07-14 Thread Floris Bruynooghe

Changes by Floris Bruynooghe :


--
nosy: +flub

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



[issue7407] Minor Queue doc improvement

2009-11-29 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

The documentation of the queue module (Queue in 2.x) does not mention
that the constructors have a default argument of 0 for "maxsize".  The
trivial patch adds this (patch against py3k trunk).

--
assignee: georg.brandl
components: Documentation
files: queue.diff
keywords: patch
messages: 95806
nosy: flub, georg.brandl
severity: normal
status: open
title: Minor Queue doc improvement
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file15413/queue.diff

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



[issue1785] "inspect" gets broken by some descriptors

2009-02-18 Thread Floris Bruynooghe

Changes by Floris Bruynooghe :


--
nosy: +flub

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



[issue5726] ld_so_aix does exit successfully even in case of failure

2009-04-09 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

ld_so_aix is used to invoke the linker correctly on AIX.  However when
the linking fails the script happily returns 0 and a Makefile using it
will assume all went well.

See the trivial patch attached.

--
components: Build
files: ld_so_aix.diff
keywords: patch
messages: 85807
nosy: flub
severity: normal
status: open
title: ld_so_aix does exit successfully even in case of failure
type: compile error
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file13661/ld_so_aix.diff

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



[issue5854] logging module's __all__ attribute not in sync with documentation

2009-04-27 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

The logging module in Python 2.6 has started to use the __all__ method.
 However it does not list all the symbols that are described in the
documentation.  Most notably the getLogger function is not in the
__all__ list, but there are others like addLevelName, getLoggerClass,
setLoggerClass, ...

This does break code that does "from logging import *" which suddenly
can't use getLogger etc anymore.

--
components: Library (Lib)
messages: 86653
nosy: flub
severity: normal
status: open
title: logging module's __all__ attribute not in sync with documentation
type: behavior
versions: Python 2.6

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



[issue5900] Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used

2009-05-01 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

The build_ext command does accept a handy --rpath option to encode an
RPATH in the built extension modules.  However RPATH is superseded by
RUNPATH since the former can not be overwritten by the LD_LIBRARY_PATH
environment varialbe, while the later can.  While most linkers will add
a RUNPATH automatically when you ask for an RPATH, GNU ld does not do
this.  Therefore this patch does detect if GNU ld is used and if so will
use the --enable-new-dtags option which will add the RUNPATH.

--
assignee: tarek
components: Distutils
files: runpath.diff
keywords: patch
messages: 86924
nosy: flub, tarek
severity: normal
status: open
title: Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file13833/runpath.diff

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



[issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build

2009-05-02 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

The attached patch does fix this issue.

Concerning the specific example of LDFLAGS used here there is still and
issue with LDFLAGS being ignored by the buid for the shared modules, but
that is an other issue.

--
keywords: +patch
Added file: http://bugs.python.org/file13845/makevars.diff

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



[issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build

2009-05-02 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

Hmm, the patch isn't quite right yet.  When a $$ is present in the
makefile .parse_makefile() needs to return a single $.  I'm not sure yet
what needs to happen with the \ for the shell escape.

--

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



[issue5900] Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used

2009-05-04 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

I'm not convinced that would help much.  The GNULD variable in the
makefile is for when the default linker is used.  If you change that by
using LDSHARED then you're probably not going to be using --rpath but
LDFLAGS to configure it the way you want.

If anything maybe using configure/Makefile to detect if GNU ld is used
is wrong just for the case they use LDSHARED (I didn't think of this
before), since then they can use LDSHARED and --rpath and get misterious
failures.  But it seems a lot more complicated to do, LDSHARED can be
set to something like "cc -shared" (the default) in which case we can't
use -V and assume it's a non-GNU ld if we don't get "GNU" back.  So we'd
have to try and detect if LDSHARED is set to a compiler or a linker,
then try to find which linker gets invoked etc.  A lot more complicated
and way more possibilities then I can test.

I'd argue that when someone uses LDSHARED they should be using LDFLAGS
intead of --rpath, they obviously know what they are doing.  --rpath is
there if you want to use the environment Python was compiled in to build
an extension module with a RPATH/RUNPATH in.

--

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



[issue5941] customize_compiler broken

2009-05-06 Thread Floris Bruynooghe

Changes by Floris Bruynooghe :


--
nosy: +flub

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



[issue5991] Add non-command help topics to help completion of cmd.Cmd

2009-05-10 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

The cmd.Cmd module has a default complete_help() method which will
complete all existing commands (methods starting with "do_").  It would
be useful to complete all exising help topics too by default, i.e. all
methods starting with "help_".

The attached patch does this.

--
components: Library (Lib)
files: cmd.diff
keywords: patch
messages: 87557
nosy: flub
severity: normal
status: open
title: Add non-command help topics to help completion of cmd.Cmd
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file13954/cmd.diff

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



[issue5998] Add __bool__ to threading.Event and multiprocessing.Event

2009-05-11 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

I think it would allow for more pythonic code if the threading.Event and
multiprocessing.Event classes had the __bool__ special attribute.  This
would allow doing "if e: ..." instead of "if e.is_set(): ...".

This could be backported to 2.x really easily by just replacing __bool__
to __nonzero__.

See also the thread starting here:
http://mail.python.org/pipermail/python-ideas/2009-May/004617.html

--
components: Library (Lib)
files: event.diff
keywords: patch
messages: 87587
nosy: flub
severity: normal
status: open
title: Add __bool__ to threading.Event and multiprocessing.Event
type: feature request
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file13959/event.diff

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



[issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build

2009-05-11 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

The updated patch inserts the single $ when needed.  I've checked this
on compiling python, stdlib extension modules and custom extension
modules and this gives the correct results in all cases.

--
Added file: http://bugs.python.org/file13962/makevars2.diff

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



[issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build

2009-05-12 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

Oh, sorry about the super() that is why the ar test failed then.  Sorry,
I got a little confused by the conflicting update on that file while
working on this patch and must have merged it badly.

--

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



[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2009-06-03 Thread Floris Bruynooghe

Changes by Floris Bruynooghe :


--
nosy: +flub

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



[issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build

2009-06-10 Thread Floris Bruynooghe

Floris Bruynooghe  added the comment:

Hi

What's the status of this?  I haven't seen a commit message regarding this.

Cheers

--

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



[issue6336] nb_divide missing in docs

2009-06-24 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

http://docs.python.org/c-api/typeobj.html#number-object-structures is
missing the entry for nb_divide, this is confusing.

--
assignee: georg.brandl
components: Documentation
messages: 89664
nosy: flub, georg.brandl
severity: normal
status: open
title: nb_divide missing in docs
type: behavior
versions: Python 2.6, Python 2.7

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



[issue6405] Redundant redeclarations in descrobject.h

2009-07-03 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

There are redundant redeclarations for PyGetSetDescr_Type and
PyMemberDescr_Type in descrobject.h.  This is an issue when compiling an
extension module with the -Wredundant-decls flag:

In file included from /usr/local/include/python3.1/Python.h:98,
 from src/util.c:27:
/usr/local/include/python3.1/descrobject.h:76: error: redundant
redeclaration of ‘PyGetSetDescr_Type’
/usr/local/include/python3.1/descrobject.h:71: error: previous
declaration of ‘PyGetSetDescr_Type’ was here
/usr/local/include/python3.1/descrobject.h:77: error: redundant
redeclaration of ‘PyMemberDescr_Type’
/usr/local/include/python3.1/descrobject.h:72: error: previous
declaration of ‘PyMemberDescr_Type’ was here
error: command 'gcc' failed with exit status 1

The patch is trivial.

--
components: Extension Modules
files: descrobject.diff
keywords: patch
messages: 90047
nosy: flub
severity: normal
status: open
title: Redundant redeclarations in descrobject.h
type: compile error
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14435/descrobject.diff

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



[issue8906] Document TestCase attributes in class docstring

2010-06-05 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

The unittest.TestCase class has some public attributes: failureException, 
longMessage and maxDiff.  They each have a description in a comment, but I 
think it would be good if that description got moved into the class docstring 
so that it would be found using help().

--
components: Library (Lib)
messages: 107132
nosy: ezio.melotti, flub
priority: normal
severity: normal
status: open
title: Document TestCase attributes in class docstring
type: feature request
versions: Python 2.7, Python 3.2

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



[issue8002] on OSX the file creation date not available in os.stat

2010-03-07 Thread Floris van Manen

Floris van Manen  added the comment:

On Mar 7, 2010, at 13:08, Ronald Oussoren wrote:

> IMO it adding this support is not worth the effort or the additional code 
> complexity.

I do agree.
We have to look forwards ...

F

--

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



[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Floris van Manen


New submission from Floris van Manen :

when using numpy defined values i get nan results.
when using math defined values, no nan errors occur.

check2 bb [5.0, 2.285379077161093, nan, nan, 2.285379077161092]

check2 cc [5.0, 2.285379077161093, 4.341186402706317, 4.341186402706317, 
2.285379077161092]

how to get identical results?

--
files: nan-test.py
messages: 325139
nosy: klankschap
priority: normal
severity: normal
status: open
title: math and numpy yield different results  (nan)
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47799/nan-test.py

___
Python tracker 
<https://bugs.python.org/issue34645>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Floris van Manen


Floris van Manen  added the comment:

Well, the thing is that i pass two (apparent) identical values into the same 
function, and get two different results.
Apparent as in one value generated via np.linspace() and one directly retrieved 
from a list.

> On 12 Sep 2018, at 18:12, Steven D'Aprano  wrote:
> 
> 
> Steven D'Aprano  added the comment:
> 
> Oops, sorry, I mistyped. I said:
> 
>So there's a problem. You're trying to raise a negative number
>to a positive value
> 
> 
> I meant to say a *fractional* value. Sorry for the confusion.
> 
> --
> 
> ___
> Python tracker 
> <https://bugs.python.org/issue34645>
> ___

--

___
Python tracker 
<https://bugs.python.org/issue34645>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Floris van Manen


Floris van Manen  added the comment:

Well, the thing is that i pass two (apparent) identical values into the same 
function, and get two different results.
Apparent as in one value generated via np.linspace() and one directly retrieved 
from a list.
If i pass the np variable into to function, it will generate an NAN error.
If i pass the non np variable into the function, it will work.

.F

> On 12 Sep 2018, at 18:10, Steven D'Aprano  wrote:
> 
> 
> Steven D'Aprano  added the comment:
> 
> Your code gives runtime warnings of invalid values. You should fix that. If 
> your values are invalid, there's probably a bug in your code.
> 
> RuntimeWarning: invalid value encountered in double_scalars
> 
> Your code is also very complex. You ought to simplify the example so that it 
> is easier to understand, all the business with linspace and duplicated code 
> just adds complexity and makes it hard to understand.
> 
> I simplified your code to this:
> 
> import numpy as np
> n=2.758
> n2 = 2.0 / n
> ct = np.cos(2 * np.pi * 2.0 / 5)
> print("numpy", ct, abs(ct ** n2) * 5.0)
> 
> 
> which gives this output:
> 
> __main__:1: RuntimeWarning: invalid value encountered in double_scalars
> ('numpy', -0.80901699437494734, nan)
> 
> So there's a problem. You're trying to raise a negative number to a positive 
> value, and numpy doesn't like it and returns a NAN.
> 
> But using the standard math library, raising a negative number to a positive 
> value gives you a complex number:
> 
> ct = math.cos(2 * math.pi * 2.0 / 5)
> print(ct**n2)
> print("math", ct, abs(ct ** n2) * 5.0)
> 
> 
> which gives this output:
> 
> (-0.5572617094280153+0.6517928032447587j)
> math -0.8090169943749473 4.287698890886272
> 
> So the behaviour is correct and this is not a bug in either math nor numpy. 
> They're just doing different things.
> 
> --
> nosy: +steven.daprano
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
> 
> ___
> Python tracker 
> <https://bugs.python.org/issue34645>
> ___

--

___
Python tracker 
<https://bugs.python.org/issue34645>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Floris van Manen

Floris van Manen  added the comment:

I know it has nothing todo with linspace.
But there seems to be a link to using numpy generated variables and not using 
them.
>From a naive point of view i’d expect the same results.
But it does not.
There is two functions, and two variables.
And from the four combinations, only one gives a non NAN error.

> On 12 Sep 2018, at 20:19, Steven D'Aprano  wrote:
> 
> 
> Steven D'Aprano  added the comment:
> 
>> Well, the thing is that i pass two (apparent) identical values into the same 
>> function,
> 
> Even if they have the same *numeric* value, they aren't the same kind of
> value, and they aren't the same function.
> 
> One is  and the other is . When you
> call ** (exponentiation), that calls two different methods. One raises
> a warning and returns NAN, the other converts to complex.
> 
> This has nothing to do with linspace. See my simplifed example code
> which doesn't use it.
> 
> --
> 
> ___
> Python tracker 
> <https://bugs.python.org/issue34645>
> ___

--

___
Python tracker 
<https://bugs.python.org/issue34645>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17020] random.random() generating values >= 1.0

2013-01-23 Thread Floris van Manen

New submission from Floris van Manen:

I recently noticed that the standard random() function generates values >= 1.0

As processes are called from an event scheduler, each process has its own 
Random() instance.

self.random = random.Random(seed)
self.randomState = self.random.getstate()



keeping track of multiple objects:

self.random.setstate(self.randomState)
self.random.jumpahead(1)
self.randomState = self.random.getstate()


Also gammavariate() generates errors as it too makes use of the _random() call

A workaround is to check each response of random() for values >= 1.0

--
assignee: ronaldoussoren
components: Macintosh
messages: 180480
nosy: klankschap, ronaldoussoren
priority: normal
severity: normal
status: open
title: random.random() generating values >= 1.0
type: compile error
versions: Python 2.7

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



[issue17020] random.random() generating values >= 1.0

2013-01-23 Thread Floris van Manen

Floris van Manen added the comment:

On 23 Jan 2013, at 19:18, R. David Murray wrote:

> 
> R. David Murray added the comment:
> 
> That indeed looks likely.  Fortunately there will be a new release of 2.7 
> including that fix soon.
> 
> Floris, do you have any way to test against 2.7 tip?

using 2.7.3 as well as pypy (based on 2.7.3) via macport.
pypy version suffers from the same issue.

i'm not (yet) familiar how to get the tip from 2.7.3
hint?

.F

--

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



[issue17020] random.random() generating values >= 1.0

2013-01-23 Thread Floris van Manen

Floris van Manen added the comment:

indeed, looks like the same.
.F

On 23 Jan 2013, at 19:09, Peter Otten wrote:

> 
> Peter Otten added the comment:
> 
> This could be a duplicate of issue14591.
> 
> --
> nosy: +peter.otten
> 
> ___
> Python tracker 
> <http://bugs.python.org/issue17020>
> ___

--

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



[issue17020] random.random() generating values >= 1.0

2013-01-24 Thread Floris van Manen

Floris van Manen added the comment:

It is in the combination with jumpahead(), getstate(), setstate() that you'll 
experience random() to produce values >= 1.0

.F

On 25 Jan 2013, at 06:24, Raymond Hettinger wrote:

> 
> Raymond Hettinger added the comment:
> 
> Can you show how you determined that you got a value >= 1.0 or provide a seed 
> that reproduces the problem?
> 
> I'm not seeing an issue on the 2.7.3 64-bit Mac build:
> 
>>>> from itertools import starmap, repeat
>>>> from random import random, seed
>>>> seed(56019413053459019451450201)
>>>> for i in range(20):
>   print max(starmap(random, repeat((), 1000)))
> 
>   
> 0.99787916
> 0.99859769
> 0.99809486
> 0.9968575
> 0.99886565
> 0.1274
> 0.99886922
> 0.99874948
> 0.99987989
> 0.99751067
> 0.9353
> 0.99935037
> 0.99919091
> 0.99664265
> 0.99951016
> 0.8665
> 0.99919618
> 0.99786864
> 0.99874042
> 0.99967453
> 
> --
> nosy: +rhettinger
> 
> ___
> Python tracker 
> <http://bugs.python.org/issue17020>
> ___

--

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



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 11:07, Stefan Krah wrote:

> 
> Stefan Krah added the comment:
> 
>> It is in the combination with jumpahead(), getstate(), setstate() that 
>> you'll experience random() to produce values >= 1.0
> 
> Let me reiterate what David said: Can you post a self-contained program
> that exhibits the issue?

My program is sort of complex in the meaning of multiple processes interleaving 
and interacting via a priorityqueue.
Each individual steps through multiple classes which all should stay 
independent.
No simple short snippet.
>From what i understand is that issue14591 was able to reproduce the same 
>feature as it seems related to the jumpahead()  malfunctioning.

.F

--

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



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 19:35, Stefan Krah wrote:

> 
> Stefan Krah added the comment:
> 
> Floris van Manen  wrote:
>> From what i understand is that issue14591 was able to reproduce the same 
>> feature as it seems related to the jumpahead()  malfunctioning.
> 
> I'm also quite sure that it's the same issue. It would be nice to have
> confirmation though. If you have the opportunity to compile the tip of
> the 2.7 branch (where #14591 is fixed), get one of these:
> 
> http://hg.python.org/cpython/archive/864b9836dae6.tar.gz
> http://hg.python.org/cpython/archive/864b9836dae6.zip
> 

Did compile that version and it launches.
To test with my code i do not want to have it interfere with my current version.
I remember it is possible to setup n isolated environment with pip en 
virtualenv.
But i never did this so far.
Any hints / links to (simple) script explanation that could do the job?
Or is there an even simpler way?

.F

--

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



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 22:27, Stefan Krah wrote:

> Then always call python with the full path. If your app is a simple
> script, then:
> 
> /tmp/usr/bin/python app.py

ok.
and how do i add extra packages to that new python version ?
e.g. i need to install
pyyam and openpyxll

(sorry for the inconvenience)
.F

--

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



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 22:27, Stefan Krah wrote:

> Then always call python with the full path. If your app is a simple
> script, t

ok, managed to install the extra packages and run the app.
Seems to work correctly now, no more random() >= 1.0

(thanks!)
.F

--

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