[issue47107] Navigation bar in python3103.chm is broken

2022-03-24 Thread stephan


stephan  added the comment:

Good idea with the html files,

thank you

(by the way I still love the chm because its compact and fast)

--

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



[issue47107] Navigation bar in python3103.chm is broken

2022-03-24 Thread stephan


stephan  added the comment:

added screenshot

--
Added file: https://bugs.python.org/file50698/2022-03-24_python3.10.3.png

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



[issue47107] Navigation bar in python3103.chm is broken

2022-03-24 Thread stephan


New submission from stephan :

As you see in 2022-03-24_python3.10.3.png
the navigation bar in python3103.chm is broken.

In 2022-03-24_python3.10.2.png you see the same 
the same for python3102.chm.

I suppose it would make sense:
- to hide this navigation bar when you create a chm
- to have a file download of the html docs as zip file for offline
  working (like in the djangoproject.com)

--
assignee: docs@python
components: Documentation, Windows
files: 2022-03-24_python3.10.3.png
messages: 415930
nosy: docs@python, paul.moore, stephan, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Navigation bar in python3103.chm is broken
versions: Python 3.11
Added file: https://bugs.python.org/file50697/2022-03-24_python3.10.3.png

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



[issue44759] ctype generates misleading error-msg opening lib.so when compiled for wrong arch

2021-07-28 Thread Stephan Bökelmann

Stephan Bökelmann  added the comment:

Fail. Didn't read your reply carefully enough. You wasn't asking for my info.

Thanks anyway

--
stage:  -> resolved
status: open -> closed

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



[issue44759] ctype generates misleading error-msg opening lib.so when compiled for wrong arch

2021-07-28 Thread Stephan Bökelmann

Stephan Bökelmann  added the comment:

my fault!

I am running Ubuntu 18 in WSL

>> uname -a
Linux  4.4.0-22000-Microsoft #1-Microsoft Fri Jun 04 16:28:00 PST 
2021 x86_64 x86_64 x86_64 GNU/Linux

--

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



[issue44759] ctype generates misleading error-msg opening lib.so when compiled for wrong arch

2021-07-28 Thread Stephan Bökelmann

New submission from Stephan Bökelmann :

When trying to open a lib.so that has been compiled for a different 
architecture an error-msg is emitted saying. "no such file or directory" 

this is misleading behavior. changing the error-msg to. "library not compatible 
with architecture" would have saved me an hour of work ;)

--
components: ctypes
messages: 398357
nosy: stephan.boekelmann
priority: normal
severity: normal
status: open
title: ctype generates misleading error-msg opening lib.so when compiled for 
wrong arch
type: enhancement
versions: Python 3.11

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



[issue44065] "configure: error: internal configure error for the platform triplet" on macOS with Clang supporting --print-multiarch:

2021-05-07 Thread Stephan Bergmann


Stephan Bergmann  added the comment:

"from the sources it looks like it would still be an issue with the latest 
cpython main branch", and if I check out current main branch and run 
`CC='/path-to-local-llvm-trunk/bin/clang -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk'
 ./configure` it indeed still fails with that "configure: error: internal 
configure error for the platform triplet, please file a bug report"

--

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



[issue44065] "configure: error: internal configure error for the platform triplet" on macOS with Clang supporting --print-multiarch:

2021-05-07 Thread Stephan Bergmann


New submission from Stephan Bergmann :

I experienced this with Python 3.8 when building it as part of LibreOffice (see 
<https://git.libreoffice.org/core/+/b0a4b49a88aacfbc127965c0c6fe50a065eb3a0f%5E%21>
 "external/python3: Clang 13 trunk implements --print-multiarch now", quoting 
from its commit message below) but from the sources it looks like it would 
still be an issue with the latest cpython main branch:

Clang 13 trunk implements --print-multiarch now since 
<https://github.com/llvm/llvm-project/commit/a921d2d2fb46b898794091e7410426c518a4f0cc>
 "[Driver] Add -print-multiarch", which causes an issue when building with such 
a compiler on macOS:

> checking build system type... x86_64-apple-darwin19.6.0
> checking host system type... x86_64-apple-darwin19.6.0
[...]
> checking for the platform triplet based on compiler characteristics... darwin
configure: error: internal configure error for the platform triplet, please 
file a bug report

as configure.ac computes PLATFORM_TRIPLET as "darwin", and instead of computing 
MULTIARCH as empty (as `$CC --print-multiarch` used to just print

> clang: error: unsupported option '--print-multiarch'
> clang: error: no input files

to stderr), it now computes it as e.g. "x86_64-apple-darwin19.6.0" (or whatever 
-target is explicitly set to in $CC), so the check that they have equal values 
if they are both nonempty fails now when building against Clang 13 trunk.  
(This does not yet appear to be an issue with any Apple Clang version, though.)

--
components: Build
messages: 393167
nosy: sberg
priority: normal
severity: normal
status: open
title: "configure: error: internal configure error for the platform triplet" on 
macOS with Clang supporting --print-multiarch:
type: compile error
versions: Python 3.8

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



[issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly

2020-05-25 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch
pull_requests: +19665
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20403

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



[issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly

2020-05-25 Thread Stephan Hohe


New submission from Stephan Hohe :

The [documentation][1] for asyncio.create_subprocess_shell() contains an 
"important" block about quoting special characters. This block and the 
following deprecation note belong to this specific function, but are not 
correctly indented and shown at module level.

 [1]: 
https://docs.python.org/3.10/library/asyncio-subprocess.html#asyncio.create_subprocess_shell

--
assignee: docs@python
components: Documentation
messages: 369930
nosy: docs@python, sth
priority: normal
severity: normal
status: open
title: "Important" block in documentation of asyncio.create_subprocess_shell() 
not indented correctly
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

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



[issue40377] APPDATA location in Microsoft Store version

2020-04-25 Thread Stephan Troyer

Stephan Troyer  added the comment:

> ... provide a way to output the relevant contents of the file on the console 
> rather than just printing the path ...

Thanks, I didn't think of that option, that is probably the best way to deal 
with it. I'll file a bug to jupyter and vscode-python (which in my case relied 
on that data).
In principle I like the AppData redirection, since that way package specific 
data also automatically gets cleaned up when uninstalling the Python app.

Because returning paths which include ApplicationData.Current.LocalFolder (and 
having 3rd party apps accessing files in there) is also suboptimal, I'm closing 
this issue.

> ... apart from a little bit of startup code, it's exactly the same as the 
> regular install.

I know, I only mentioned it, since I don't take it for granted to offer a 
Microsoft Store package and deal with such specific issues, if there exists 
already another package for Windows 

--
stage:  -> resolved
status: open -> closed

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



[issue40377] APPDATA location in Microsoft Store version

2020-04-24 Thread Stephan Troyer


New submission from Stephan Troyer :

In Microsoft Store apps, access to %APPDATA% and %LOCALAPPDATA% gets 
transparently redirected to an app specific location (such as 
%LOCALAPPDATA%\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\).
 This is perfect for saving settings etc. of Python scripts and packages, 
however that doesn't work, when the unredirected paths are returned by a 
sandboxed Python script and consumed by a 3rd party tool.
One example for the issue created by that is Jupyter, which saves its kernel 
settings to %appdata% and returns that path when using the command `jupyter 
kernelspec list`. However other applications which rely on that output can't 
access the resulting paths (since their file access doesn't get redirected).
Would it make sense to add some API for accessing the UWP APIs 
ApplicationData.Current.LocalFolder and ApplicationData.Current.RoamingFolder, 
which provide a folder path, which doesn't get redirected?

Besides, I want to thank everyone involved in the Microsoft Store version of 
Python!

--
components: IO
messages: 367188
nosy: stephtr
priority: normal
severity: normal
status: open
title: APPDATA location in Microsoft Store version
type: behavior
versions: Python 3.8

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



[issue36285] Integer overflow in array.array.remove()

2019-03-13 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch
pull_requests: +12291
stage:  -> patch review

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



[issue36285] Integer overflow in array.array.remove()

2019-03-13 Thread Stephan Hohe


New submission from Stephan Hohe :

The array module's `array.remove(x)` iterates over the array, searching for 
`x`. If the array contains >=2G elements this can overflow the `int` loop 
variable.

`array__array_reconstructor_impl()` also contains loops with `int` variables 
that likely have the similar problems.

Changing the loop variables to `Py_ssize_t` fixes the problem. For details see 
the PR.

--
components: Extension Modules
messages: 337889
nosy: sth
priority: normal
severity: normal
status: open
title: Integer overflow in array.array.remove()
type: crash
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

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



[issue36251] Invalid format specifiers in MatchObject and StdPrinter repr

2019-03-09 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch
pull_requests: +12240
stage:  -> patch review

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



[issue36251] Invalid format specifiers in MatchObject and StdPrinter repr

2019-03-09 Thread Stephan Hohe


New submission from Stephan Hohe :

match_repr() and stdprinter_repr() contain calls to PyUnicode_FromFormat() with 
format specifiers that don't match the arguments.

See the upcoming pull request for details.

--
components: Interpreter Core, Regular Expressions
messages: 337574
nosy: ezio.melotti, mrabarnett, sth
priority: normal
severity: normal
status: open
title: Invalid format specifiers in MatchObject and StdPrinter repr
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

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



[issue35688] "pip install --user numpy" fails on Python from the Windows Store

2019-01-10 Thread Stephan Troyer


Change by Stephan Troyer :


--
nosy: +stephtr

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



[issue35623] Segfault in test_bigmem.ListTest.test_sort

2018-12-30 Thread Stephan Hohe


Stephan Hohe  added the comment:

Actually the segfault is in Objects/listobject.c:2301 in that test since it 
doesn't use tuples. But the takeaway is the same: `i` overflows to a negative 
number and causes an invalid memory access.

--

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



[issue35623] Segfault in test_bigmem.ListTest.test_sort

2018-12-30 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch, patch, patch
pull_requests: +10727, 10728, 10729
stage:  -> patch review

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



[issue35623] Segfault in test_bigmem.ListTest.test_sort

2018-12-30 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch
pull_requests: +10727
stage:  -> patch review

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



[issue35623] Segfault in test_bigmem.ListTest.test_sort

2018-12-30 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch, patch
pull_requests: +10727, 10728
stage:  -> patch review

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



[issue35623] Segfault in test_bigmem.ListTest.test_sort

2018-12-30 Thread Stephan Hohe


New submission from Stephan Hohe :

When running test_bigmem with -M 30G the interpreter crashes in 
list_sort_impl() in  Objects/listobject.c:2290 due to an integer overflow in 
`i`.

--
components: Interpreter Core
messages: 332780
nosy: sth
priority: normal
severity: normal
status: open
title: Segfault in test_bigmem.ListTest.test_sort
type: crash
versions: Python 3.7, Python 3.8

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



[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2018-12-30 Thread Stephan Hohe


New submission from Stephan Hohe :

`asyncio.create_subprocess_exec()` accepts a `loop` parameter, but doesn't use 
it to watch the child process. Instead uses 
`get_event_loop_policy().get_child_watcher()`, which doesn't doesn't know about 
`loop` but tries to use the current default event loop.

This fails if there is no current event loop or if that loop isn't running:

```
import asyncio

async def action(loop):
proc = await asyncio.create_subprocess_exec('echo', loop=loop)
await proc.wait()

loop = asyncio.new_event_loop()
loop.run_until_complete(action(loop))
loop.close()
```

This crashes because the main event loop never was created:

Traceback (most recent call last):
  File "sample.py", line 8, in 
loop.run_until_complete(action(loop))
  File "/home/sth/devel/cpython.vanilla/Lib/asyncio/base_events.py", line 589, 
in run_until_complete
return future.result()
  File "sample.py", line 4, in action
proc = await asyncio.create_subprocess_exec('echo', loop=loop)
  File "/home/sth/devel/cpython.vanilla/Lib/asyncio/subprocess.py", line 213, 
in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
  File "/home/sth/devel/cpython.vanilla/Lib/asyncio/base_events.py", line 1542, 
in subprocess_exec
transport = await self._make_subprocess_transport(
  File "/home/sth/devel/cpython.vanilla/Lib/asyncio/unix_events.py", line 193, 
in _make_subprocess_transport
watcher.add_child_handler(transp.get_pid(),
  File "/home/sth/devel/cpython.vanilla/Lib/asyncio/unix_events.py", line 924, 
in add_child_handler
raise RuntimeError(
RuntimeError: Cannot add child handler, the child watcher does not have a loop 
attached


If we do have a current event loop, for example by calling 
`asyncio.get_event_loop()` before creating out own loop, then we don't get an 
error, but the program hangs indefinitely since that loop isn't running.

Expected behavior would be that the loop given to create_subprocess_exec() is 
used to watch the child process.

--
components: asyncio
messages: 332771
nosy: asvetlov, sth, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.create_subprocess_exec() only works with main event loop
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

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



[issue34982] re.sub() different behavior in 3.7

2018-11-07 Thread Stephan Bergmann


Stephan Bergmann  added the comment:

So, just to make sure, that also means that

  re.sub('a*$', 'b', 'a')

returning 'bb' instead of 'b' is intended behavior?

--
nosy: +Stephan Bergmann

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



[issue24379] Add operator.subscript as a convenience for creating slices

2018-07-19 Thread Stephan Hoyer


Stephan Hoyer  added the comment:

Raymond, Tal and Guido -- do any of you work routinely with multi-dimensional 
arrays?

In my experience as someone who uses Python everyday for numerical computing 
(and has been doing so for many years), the need for an operator like this 
comes up with some regularity. With multi-dimensional indexing, this allows 
lets you cut down quite a bit on boilerplate, e.g., compare

  subscript[:, 0, ::-1] vs (slice(None), 0, slice(None, None, -1))

It's absolutely true that subscript is an easy four line recipe, and indeed a 
form of this recipe is already included in both NumPy and pandas. But I think 
this is a case where the lack of a common idiom is actively harmful. I do 
multi-dimensional indexing in using at least four different libraries (pandas, 
xarray, numpy and tensorflow), and it feels wrong to use a utility from 
numpy/pandas for other projects. I could write my own version of 
operator.subscript in each project (and yes, I've done so before), but for any 
individual use case it's less hassle to write things out the long way. 

In practice, the preferred way to write such long expressions seems to be to 
redundantly repeat indexing operations, e.g.,

  x[:, 0, ::-1]
  y[:, 0, ::-1]

rather than

  index = subscript[:, 0, ::-1]
  x[index]
  y[index]

This is definitely non-ideal from a readability perspective. It's no longer 
immediately clear that these arrays are being indexed in the same way, and any 
changes would need to be applied twice.

--
nosy: +Stephan Hoyer

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



[issue27300] tempfile.TemporaryFile(): missing errors=... argument

2018-05-02 Thread Stephan Hohe

Change by Stephan Hohe <sth@tejp.de>:


--
pull_requests: +6390
status: pending -> open

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



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Stephan Hohe

Stephan Hohe <sth@tejp.de> added the comment:

> Do you mean the "python" command-line program?

Yes, that's what I used.

>  That uses a different algorithm:

I see, it only works for top-level modules. You're right, that's not a real 
solution.

--

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



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Stephan Hohe

Stephan Hohe <sth@tejp.de> added the comment:

Yes, I tried the Python 3.5 that comes with my system as well as the latest 
checkout from github. Both show source code lines in tracebacks for me.

I used a rather simple test setup, just two directories with .so and .pyx which 
I added to sys.path (any order seems to work). I haven't checked a proper 
install of an extension module via pip/...

--

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



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Stephan Hohe

Stephan Hohe <sth@tejp.de> added the comment:

How does CPython display the source for tracebacks in Cython modules? It seems 
to work there as long as the Cython .pyx files are somewhere in the import path.

--
nosy: +sth

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



[issue30140] Binary arithmetic does not always call subclasses first

2017-10-18 Thread Stephan Hoyer

Stephan Hoyer <sho...@gmail.com> added the comment:

Ping -- it would be great if someone could take a look at my PR. (I suspect it 
needs more documentation, tips on where to put that would be appreciated.)

--

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



[issue31427] Proposed addition to Windows FAQ

2017-09-12 Thread Stephan Houben

New submission from Stephan Houben:

Several people have asked on python-list why they are running into these errors.

Python 3.6.0 can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing. 

The solution is to install KB 2999226 "Update for Universal C Runtime in 
Windows". 
https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows

Propose to add this as a Windows FAQ.

--
assignee: docs@python
components: Documentation
messages: 301952
nosy: Stephan Houben, docs@python
priority: normal
severity: normal
status: open
title: Proposed addition to Windows FAQ
type: enhancement
versions: Python 3.6, Python 3.7

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



[issue30140] Binary arithmetic does not always call subclasses first

2017-09-05 Thread Stephan Hoyer

Stephan Hoyer added the comment:

Serhiy: thanks for the tip. I've updated my PR, which I think is now ready for 
review.

--

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



[issue30676] [Windows] Potential for GIL deadlock on Windows in threadmodule acquire_lock

2017-06-15 Thread Stephan R.A. Deibel

Stephan R.A. Deibel added the comment:

I think I misunderstood the implementation of EnterNonRecursiveMutex -- the 
mutex that could block there is the internal 'cs' mutex, which would only be 
held only briefly while Enter/LeaveNonRecursiveMutex are running, and it looks 
like the 'cs' mutex is released before doing anything that blocks (in the two 
impls of PyCOND_WAIT and PyCOND_TIMEDWAIT).

So my report is invalid and I'm closing it.  Sorry about that!

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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



[issue30676] Potential for GIL deadlock on Windows in threadmodule acquire_lock

2017-06-15 Thread Stephan R.A. Deibel

New submission from Stephan R.A. Deibel:

In acquire_timed in _threadmodule.c (used to implement threading lock 
acquire()) there is an optimization from 
https://github.com/python/cpython/commit/e75ff35af2b6c85d48c68b95f295aeac7396b162
 that says it first tries non-blocking lock w/o releasing the GIL.  However, it 
seems that this call can block on Windows.

The call to PyThread_acquire_lock_timed(lock, 0, 0) (w/o releasing GIL) on 
Windows calls EnterNonRecursiveMutex which in turn, in the _PY_USE_CV_LOCKS 
impl, immediately calls PyMUTEX_LOCK as if it's not going to block.  However, 
various implementations of this seem like they can block.  Specifically, the 
impls of PyMUTEX_LOCK that end up using AcquireSRWLockExclusive and 
EnterCriticalSection both block.  The only case that is correct (does not 
block) is when !_PY_USE_CV_LOCKS where EnterNonRecursiveMutex() instead calls 
WaitForSingleObjectEx() with the zero timeout.

This seems like an incorrect potential for GIL deadlock, because the thread 
blocks without releasing GIL.  Shouldn't it ultimately be using 
TryAcquireSRWLockExclusive and TryEnterCriticalSection in these two cases?

This seems like an issue on Windows only.  The pthreads implementations look 
like they correctly handle timeout of 0 sent to PyThread_acquire_lock_timed().

--
components: Library (Lib), Windows
messages: 296088
nosy: paul.moore, sdeibel, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Potential for GIL deadlock on Windows in threadmodule acquire_lock
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

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



[issue30395] deadlocked child process after forking on pystate.c's head_mutex

2017-05-18 Thread Stephan Gorget

Changes by Stephan Gorget <phan...@gmail.com>:


--
nosy: +phantez

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



[issue30140] Binary arithmetic does not always call subclasses first

2017-04-25 Thread Stephan Hoyer

Stephan Hoyer added the comment:

> The design pattern that has problems here is a bit unorthodox to start with.

I agree. This was meant strictly as a simple example for illustrative purposes. 
Steven D'Aprano's example from python-ideas may be a better one:
https://mail.python.org/pipermail/python-ideas/2017-April/045455.html

class A:
def __add__(self, other):
self.log()
...
__radd__ = __add__

class B(A):
def log(self):
...

Our actual use case for NumPy involved writing a mixin that look more like 
this, that expects a specified method to implement arithmetic, i.e.,

class NDArrayOperatorsMixin:
def __add__(self, other):
return self._calculate(np.add, self, other)
def __radd__(self, other):
return self._calculate(np.add, other, self)
...  # repeat for all special methods

class A(NDArrayOperatorsMixin):
def _calculate(self, op, *args):
if not all(isinstance(arg, A) for arg in args):
return NotImplemented
...  # implement calculation

class B(A):
def _calculate(self, op, *args):
...  # something different

In A() + B(), B never gets the chance to override A's implementation of __add__ 
via _calculate, because it overrode a different method (_calculate) which 
happens to contain the *implementation* for __radd__, but not __radd__ itself.

Anyways, if you have serious concerns about changing this, it is probably best 
respond to Guido on python-ideas:
https://mail.python.org/pipermail/python-ideas/2017-April/045468.html

--

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



[issue30140] Binary arithmetic does not always call subclasses first

2017-04-23 Thread Stephan Hoyer

Stephan Hoyer added the comment:

Posted to python-ideas:
https://mail.python.org/pipermail/python-ideas/2017-April/045451.html

Mark -- just out of curiosity, could you point me to where this logic is 
implemented in CPython's source?

This feels like something that could once been called a bug but that by now may 
have become a feature, by virtue of how long it's lasted out in the world.

--

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



[issue30140] Binary arithmetic does not always call subclasses first

2017-04-22 Thread Stephan Hoyer

New submission from Stephan Hoyer:

We are writing a system for overloading NumPy operations (see PR [1] and design 
doc [2]) that is designed to copy and extend Python's system for overloading 
binary operators.

The reference documentation on binary arithmetic [3] states:

> Note: If the right operand's type is a subclass of the left operand’s type 
> and that subclass provides the reflected method for the operation, this 
> method will be called before the left operand’s non-reflected method. This 
> behavior allows subclasses to override their ancestors’ operations.

However, this isn't actually done if the right operand merely inherits from the 
left operand's type. In practice, CPython requires that the right operand 
defines a different method before it defers to it. Note that the behavior is 
different for comparisons, which defer to subclasses regardless of whether they 
implement a new method [4].

I think this behavior is a mistake and should be corrected. It is just as 
useful to write generic binary arithmetic methods that are well defined on 
subclasses as generic comparison operations. In fact, this is exactly the 
design pattern we propose for objects implementing special operators like NumPy 
arrays (see NDArrayOperatorsMixin in [1] and [2]).

Here is a simple example, of a well-behaved that implements addition by 
wrapping its value and returns NotImplemented when the other operand has the 
wrong type:

class A:
   def __init__(self, value):
   self.value = value
   def __add__(self, other):
   if not isinstance(other, A):
   return NotImplemented
   return type(self)(self.value + other.value)
   __radd__ = __add__
   def __repr__(self):
   return f'{type(self).__name__}({self.value!r})'

class B(A):
pass

class C(A):
   def __add__(self, other):
   if not isinstance(other, A):
   return NotImplemented
   return type(self)(self.value + other.value)
   __radd__ = __add__

A does not defer to B:

>>> A(1) + B(1)
A(2)

But it does defer to C, which defines new methods (literally copied/pasted) for 
__add__/__radd__:

>>> A(1) + C(1)
C(2)

With the current behavior, special operator implementations need to explicitly 
account for the possibility that they are being called from a subclass by 
returning NotImplemented. My guess is that this is rarely done, which means 
that most of these methods are broken when used with subclasses, or subclasses 
needlessly reimplement these methods.

Can we fix this logic for Python 3.7?

[1] https://github.com/numpy/numpy/pull/8247
[2] 
https://github.com/charris/numpy/blob/406bbc652424fff332f49b0d2f2e5aedd8191d33/doc/neps/ufunc-overrides.rst
[3] https://docs.python.org/3/reference/datamodel.html#object.__ror__
[4] http://bugs.python.org/issue22052

--
messages: 292149
nosy: Stephan Hoyer
priority: normal
severity: normal
status: open
title: Binary arithmetic does not always call subclasses first
type: behavior

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



[issue28530] Howto detect if an object is of type os.DirEntry

2016-10-26 Thread stephan

stephan added the comment:

Some questions:
 - if posix.DirEntry is exposed I think nt.DirEntry
   and os.DirEntry (this one is mentioned in the documentation)
   should be exposed
 - will this bw backported to 3.5 lets say 3.5.3?

--

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



[issue28530] Howto detect if an object is of type os.DirEntry

2016-10-25 Thread stephan

New submission from stephan:

I have a small problem with python 3.5.2 64bit on win7 64 bit:

I cannot check if an object is of type DirEntry 
(os.DirEntry or nt.DirEntry).

Did I misunderstand something or what is wrong?

Here is a log of my console:
-
In [63]: sd = os.scandir(".")

In [64]: de = next(sd)

In [65]: type(de)
Out[65]: nt.DirEntry

In [66]: import nt

In [67]: nt.DirEntry
---
AttributeErrorTraceback (most recent call last)
 in ()
> 1 nt.DirEntry

AttributeError: module 'nt' has no attribute 'DirEntry'

In [68]: os.DirEntry
---
AttributeErrorTraceback (most recent call last)
 in ()
> 1 os.DirEntry

AttributeError: module 'os' has no attribute 'DirEntry'

In [69]:

--

--
messages: 279415
nosy: stephan
priority: normal
severity: normal
status: open
title: Howto detect if an object is of type os.DirEntry
versions: Python 3.5

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



[issue28356] Windows: os.rename different in python 2.7.12 and python 3.5.2

2016-10-04 Thread stephan

stephan added the comment:

Hi,

I tryed os.replace() as replacement for os.rename() too,
but as you said it does not work if the files are on different drives.

For now I switched to shutil.move() but I suppose its not
as performant/optimal as an "move" or "rename" directly supported
by the OS.

--

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



[issue28356] os.rename different in python 2.7.12 and python 3.5.2

2016-10-04 Thread stephan

New submission from stephan:

Hi,

I am just migrating my code from python 2.7.12 to 3.5.2
on Windows and stumbled on the following difference:

In python 2.7.12:
  os.rename(filepath1, filepath2) 
  works even if 
  filepath1 and filepath2 are on different drives
  (or one on a local drive, the other on a network share).

In python 3.5.2 I get for the same operation:
 "OSError: [WinError 17] The system cannot move the file to a different disk 
drive"

My question:
 - is this a bug?
 - if not, where is this difference mentioned in the docs?
   I did find nothing, but I think it should be mentioned,
   otherwise I assume it's a bug.

--
messages: 278035
nosy: stephan
priority: normal
severity: normal
status: open
title: os.rename different in python 2.7.12 and python 3.5.2
type: behavior
versions: Python 2.7, Python 3.5

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



[issue28210] argparse with subcommands difference in python 2.7 / 3.5

2016-09-21 Thread stephan

stephan added the comment:

I am not an expert with argparse since I just started using it
(and it has quite a lot of features which are 
not all self-explaining to me).

But if I didn't misunderstand something it should behave like the python 2.7 
version:
 If I do not pass any command I am told that I missed the parameter.

Or: 
 - are there some parameters I missed to make them behave equally?
 - what is the intention to fail silently?

--

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



[issue28210] argparse with subcommands difference in python 2.7 / 3.5

2016-09-20 Thread stephan

New submission from stephan:

In python 2.7.12 I get an error if I do not pass
arguments, while in python 3.5.2 I do not get
the error (it fails silently).
Stumbled on this during my migration of my python 2.7 code to python 3.5 for 
django.

Here is the console output:

D:\util\python\test>py -3 test_argparse.py
3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]
Use subparsers: True
Namespace(command=None)

D:\util\python\test>py -2 test_argparse.py
2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)]
Use subparsers: True
usage: test_argparse.py [-h] command ...
test_argparse.py: error: too few arguments

D:\util\python\test>

--
files: test_argparse.py
messages: 277017
nosy: stephan
priority: normal
severity: normal
status: open
title: argparse with subcommands difference in python 2.7 / 3.5
type: behavior
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file44751/test_argparse.py

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



[issue12806] argparse: Hybrid help text formatter

2016-02-13 Thread Stephan Sokolow

Stephan Sokolow added the comment:

@GraylinKim:

In the interest of people like myself who wander in here via Google, would you 
mind stating, for the record, what license argparse_formatter.py is under?

--
nosy: +ssokolow

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



[issue25883] python 2.7.11 mod_wsgi regression on windows

2015-12-17 Thread stephan

stephan added the comment:

OK, I renamed:

 HKLM\Software\Wow6432Node\Python\PythonCore\2.7\PythonPath
to
 HKLM\Software\Wow6432Node\Python\PythonCore\2.7-32\PythonPath

and now it works again.

So I'll wait for python 2.7.12 :-)

Thanks Steve

--

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



[issue25883] python 2.7.11 mod_wsgi regression on windows

2015-12-16 Thread stephan

stephan added the comment:

No, I didn't report this to the mod_wsgi folks.

--

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



[issue25883] python 2.7.11 mod_wsgi regression on windows

2015-12-16 Thread stephan

New submission from stephan:

Hi,

I use apache 32 bit on windows with mod_wsgi for my trac instance,
and other django instances which are attached by reverse-proxy.

With python (32bit) 2.7.10 it works, but as soon
as I updated to python 2.7.11 apache doesn't work anymore
(it does not respond to requests). 

I find out that the mod_wsgi.so module
causes the problem.
If I deactivate mod_wsgi (and by this my trac instance) the
other stuff works again.

In the apache error log I see the following:


[Wed Dec 16 08:56:57.130160 2015] [mpm_winnt:notice] [pid 4184:tid 664] 
AH00428: Parent: child process 6708 exited with status 1 -- Restarting.
[Wed Dec 16 08:56:57.130160 2015] [core:error] [pid 4184:tid 664] AH00546: no 
record of generation 0 of exiting child 6708
[Wed Dec 16 08:56:57.817228 2015] [ssl:warn] [pid 4184:tid 664] AH01873: Init: 
Session Cache is not configured [hint: SSLSessionCache]
[Wed Dec 16 08:56:57.817228 2015] [mpm_winnt:notice] [pid 4184:tid 664] 
AH00455: Apache/2.4.10 (Win32) mod_authn_ntlm/1.0.0 OpenSSL/1.0.1h 
mod_wsgi/4.4.9 Python/2.7.11 configured -- resuming normal operations
[Wed Dec 16 08:56:57.817228 2015] [mpm_winnt:notice] [pid 4184:tid 664] 
AH00456: Apache Lounge VC9 Server built: Jul 19 2014 13:07:40
[Wed Dec 16 08:56:57.817228 2015] [core:notice] [pid 4184:tid 664] AH00094: 
Command line: 'd:\\Programme\\Apache24\\bin\\httpd.exe -d D:/Programme/Apache24'
[Wed Dec 16 08:56:57.820229 2015] [mpm_winnt:notice] [pid 4184:tid 664] 
AH00418: Parent: Created child process 3656
[Wed Dec 16 08:56:59.035350 2015] [ssl:warn] [pid 3656:tid 676] AH01873: Init: 
Session Cache is not configured [hint: SSLSessionCache]
ImportError: No module named site
[Wed Dec 16 08:56:59.054352 2015] [mpm_winnt:notice] [pid 4184:tid 664] 
AH00428: Parent: child process 3656 exited with status 1 -- Restarting.
[Wed Dec 16 08:56:59.054352 2015] [core:error] [pid 4184:tid 664] AH00546: no 
record of generation 0 of exiting child 3656
[Wed Dec 16 08:56:59.819429 2015] [ssl:warn] [pid 4184:tid 664] AH01873: Init: 
Session Cache is not configured [hint: SSLSessionCache]
[Wed Dec 16 08:56:59.819429 2015] [mpm_winnt:notice] [pid 4184:tid 664] 
AH00455: Apache/2.4.10 (Win32) mod_authn_ntlm/1.0.0 OpenSSL/1.0.1h 
mod_wsgi/4.4.9 Python/2.7.11 configured -- resuming normal operations
[Wed Dec 16 08:56:59.819429 2015] [mpm_winnt:notice] [pid 4184:tid 664] 
AH00456: Apache Lounge VC9 Server built: Jul 19 2014 13:07:40
[Wed Dec 16 08:56:59.819429 2015] [core:notice] [pid 4184:tid 664] AH00094: 
Command line: 'd:\\Programme\\Apache24\\bin\\httpd.exe -d D:/Programme/Apache24'
[Wed Dec 16 08:56:59.821429 2015] [mpm_winnt:notice] [pid 4184:tid 664] 
AH00418: Parent: Created child process 8056
[Wed Dec 16 08:57:01.159563 2015] [ssl:warn] [pid 8056:tid 672] AH01873: Init: 
Session Cache is not configured [hint: SSLSessionCache]
ImportError: No module named site
...
...


and so on ... the error.log grows continuously even 
if do not send any request to apache,
because the process is restarted and restarted.

Now: 
 Or mod_wsgi.so (mod_wsgi-4.4.21.tar.gz) has a bug
 which didn't cause problems all the time,
 or the new python version introduced this bug.

--
components: Windows
messages: 256522
nosy: paul.moore, stephan, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: python 2.7.11 mod_wsgi regression on windows
versions: Python 2.7

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



[issue23262] webbrowser module broken with Firefox 36+

2015-01-18 Thread Stephan Sokolow

Stephan Sokolow added the comment:

Well, then the code which chooses a backend is broken because I have xdg-open 
and, according to WinPdb, it's using the Mozilla backend.

This was my local workaround:

if os.name == 'posix' and not platform.mac_ver()[0]:
with open(os.devnull, 'wb') as nul:
subprocess.Popen(['xdg-open', request_url], stdout=nul, stderr=nul)
else:
webbrowser.open_new_tab(request_url)

(This retrofit branch hasn't yet reached the point where it'll be tested on 
Windows. I may still add another branch which calls `start` directly if it 
proves to have the same priority bug on Windows.)

--

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



[issue23262] webbrowser module broken with Firefox 36+

2015-01-18 Thread Stephan Sokolow

Stephan Sokolow added the comment:

WinPdb = Windowed Pdb, not MS Windows Pdb.

`sudo apt-get install winpdb`

--

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



[issue23262] webbrowser module broken with Firefox 36+

2015-01-18 Thread Stephan Sokolow

Stephan Sokolow added the comment:

Noted. I'm not sure what my schedule will be like, but I'll try.

(I may get back to you with an answer later today or I may not within the week.)

--

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



[issue23262] webbrowser module broken with Firefox 36+

2015-01-18 Thread Stephan Sokolow

Stephan Sokolow added the comment:

The proper solution is to prefer `start` (Windows), `open` (OSX), or `xdg-open` 
(everything else... usually but not always present) when present instead of 
calling the browser directly.

That way, you're using the same delegate to the desktop's associations system 
and let the user's preferences control new window vs. new tab behaviour on all 
OSes where it's reliably possible.

(Yes, it would guarantee that all open* functions are equivalent, but that's 
already the norm in a lot of cases... especially with Firefox where one of the 
guiding design principles is ensuring that the user retains control of their 
browsing experience.)

--

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



[issue6671] webbrowser doesn't respect xfce default browser

2015-01-17 Thread Stephan Sokolow

Changes by Stephan Sokolow bugs_python_org.zen.ssoko...@spamgourmet.com:


--
nosy: +ssokolow

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



[issue23262] webbrowser module broken with Firefox 36+

2015-01-17 Thread Stephan Sokolow

New submission from Stephan Sokolow:

As of Firefox 36 (currently in beta channel), the -remote option has been 
removed.

https://www.mozilla.org/en-US/firefox/36.0a2/auroranotes/
https://www.mozilla.org/en-US/firefox/36.0beta/releasenotes/

As such, attempting to open http://www.example.com/ using webbrowser.open() or 
webbrowser.open_new_tab() results in File not Found tabs pointing to these 
two URLs, respectively:

file:///home/ssokolow/openURL%28http://www.example.com/%29
file:///home/ssokolow/openURL%28http://www.example.com/,new-tab%29

As I happen to have the Dead Snakes PPA set up on Lubuntu 14.04 for use with 
tox, I was able to confirm this as an issue in Python 2.7, 3.1, 3.2, 3.3, and 
3.4.

--
components: Library (Lib)
messages: 234218
nosy: ssokolow
priority: normal
severity: normal
status: open
title: webbrowser module broken with Firefox 36+
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue22740] Cache error

2014-10-27 Thread Stephan Monecke

New submission from Stephan Monecke:

`python2 test.py` results in the following error:

Traceback (most recent call last):
  File test.py, line 1, in module
import seaborn as sns
  File /path/seaborn.py, line 4, in module
sns.set(style=ticks)
AttributeError: 'module' object has no attribute 'set'

seaborn.py is an old plot-file thats already deleted.

--
components: Extension Modules
messages: 230065
nosy: smoneck
priority: normal
severity: normal
status: open
title: Cache error
type: crash
versions: Python 2.7

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



[issue22740] Cache error

2014-10-27 Thread Stephan Monecke

Stephan Monecke added the comment:

Edit: test.py contains just import seaborn as sns

--

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



[issue22740] Cache error

2014-10-27 Thread Stephan Monecke

Stephan Monecke added the comment:

Problem found. Induced by a .pyc file in the folder.

--

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



[issue20609] Always running kill_python breaks building x64 on 32-bit Windows machine

2014-02-12 Thread Stephan R.A. Deibel

New submission from Stephan R.A. Deibel:

The changes made in Issue19788 break the ability to build x64 build target on a 
32-bit Windows machine because PreBuildEvent entries in pythoncore.vcxproj end 
up trying to run the 64-bit kill_python.exe, causing critical build steps to 
fail.  Removing those PreBuildEvents by manually editing pythoncore.vcxproj 
served as a work-around.

--
components: Build
messages: 211093
nosy: sdeibel
priority: normal
severity: normal
status: open
title: Always running kill_python breaks building x64 on 32-bit Windows machine
type: compile error
versions: Python 3.4

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



[issue20609] Always running kill_python breaks building x64 on 32-bit Windows machine

2014-02-12 Thread Stephan R.A. Deibel

Stephan R.A. Deibel added the comment:

There's no patch attached... or am I just confused?

--

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



[issue20609] Always running kill_python breaks building x64 on 32-bit Windows machine

2014-02-12 Thread Stephan R.A. Deibel

Stephan R.A. Deibel added the comment:

Yes, thanks, that patch fixes it so it builds successfully.  Tried w/ Python 
3.4rc1 on Windows 7 w/ VS2010.

Of course maybe it should really be building kill_python.exe for the matching 
architecture and running that, but I'm not sure how to do that and your fix is 
certainly far better than current behavior.

--

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



[issue20609] Always running kill_python breaks building x64 on 32-bit Windows machine

2014-02-12 Thread Stephan R.A. Deibel

Stephan R.A. Deibel added the comment:

OK, sounds reasonable to me.

--

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



[issue17030] strange import visibility

2013-01-25 Thread Stephan

New submission from Stephan:

$ cat a.py
import dbus
import b
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
print Hello, World.
$ cat b.py
import dbus.mainloop.glib
$ python a.py
Hello, World.
$

If I remove the “import b” line, the output is:

$ python a.py
Traceback (most recent call last):
  File a.py, line 3, in module
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
AttributeError: 'module' object has no attribute 'mainloop'
$

In my opinion this is inconsistent. Either both versions should fail with that 
error, because “dbus.mainloop.glib” is imported in “b”, not “a”; or both should 
succeed, because “a” imports dbus.

This is Python 2.7.3 and python-dbus 1.0.0 on Ubuntu 12.4.2

--
components: Interpreter Core
messages: 180574
nosy: geryon
priority: normal
severity: normal
status: open
title: strange import visibility
type: behavior
versions: Python 2.7

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



[issue17030] strange import visibility

2013-01-25 Thread Stephan

Stephan added the comment:

Thanks! I was not aware of this yet.

--

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



[issue13557] exec of list comprehension fails on NameError

2011-12-12 Thread Stephan R.A. Deibel

Stephan R.A. Deibel sdei...@wingware.com added the comment:

Here's a patch to the docs that notes the issue and refers the reader to the 
relevant execution model docs page.  I have also attempted to clarify the 
interaction with dynamic features section of the execution model page.

--
keywords: +patch
versions:  -Python 2.7, Python 3.2
Added file: http://bugs.python.org/file23937/exec-eval-clarification.diff

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



[issue13557] exec of list comprehension fails on NameError

2011-12-09 Thread Stephan R.A. Deibel

Stephan R.A. Deibel sdei...@wingware.com added the comment:

Ah, thanks, there it is... I thought this must be dealt with somewhere but 
couldn't find it.  Maybe should add something to the 'exec' statement docs 
http://docs.python.org/py3k/library/functions.html#exec to reference this (from 
a usability-of-docs standpoint).

BTW, my code already sends the namespaces to exec (from current stack frame; 
it's part of a debugger) and probably would break other cases to alter this.

Well, anyway, sorry for the invalid bug report...

--
status: pending - open

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



[issue13557] exec of list comprehension fails on NameError

2011-12-08 Thread Stephan R.A. Deibel

New submission from Stephan R.A. Deibel sdei...@wingware.com:

Calling exec() on code that includes a list comprehension that references a 
defined local variable x fails incorrectly on NameError: global name 'x' not 
defined.

--
files: execlistcomp.py
messages: 149050
nosy: sdeibel
priority: normal
severity: normal
status: open
title: exec of list comprehension fails on NameError
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file23883/execlistcomp.py

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



[issue13548] Invalid 'line' tracer event on pass within else clause

2011-12-07 Thread Stephan R.A. Deibel

New submission from Stephan R.A. Deibel sdei...@wingware.com:

The tracer set with sys.settrace() is called incorrectly with a 'line' event on 
a 'pass' that is at the end of an 'else' clause on the final line of a function 
even if the else block is not executed by the interpreter.  Whew, talk about an 
end case!  The attached file illustrates this.

--
components: Interpreter Core
files: badlineevent.py
messages: 148974
nosy: sdeibel
priority: normal
severity: normal
status: open
title: Invalid 'line' tracer event on pass within else clause
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file23865/badlineevent.py

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



[issue13548] Invalid 'line' tracer event on pass within else clause

2011-12-07 Thread Stephan R.A. Deibel

Stephan R.A. Deibel sdei...@wingware.com added the comment:

Sorry, the print statement in the file needs a tweak to work with Python 3.2, 
but the bug does occur there also.

--

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



[issue1743] IDLE fails to launch

2010-09-23 Thread Stephan Bellegy

Stephan Bellegy stephan.bell...@gmail.com added the comment:

Reproduced today with Python 2.6.6 and 2.7 on Win7 32 bits.

Deleting .idlerc directory made it.

Doesn't look like fixed guys ! ;-)

--
nosy: +Stephan.Bellegy
versions: +Python 2.6 -Python 2.5, Python 3.1

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



[issue9925] Idle doesn't launch

2010-09-23 Thread Stephan Bellegy

New submission from Stephan Bellegy stephan.bell...@gmail.com:

Environment is Win7, 32bits. User has Admin rights.

I haven't coded in Python at the office for a while and had a little script to 
write. Thus, I decided to upgrade from 2.6 to 2.7 (that is : 2.6 was already 
there and functionnal as far as I remind it and was the first install of Python 
on the new PC)

2.7 installation run without problems nor warnings, as usual.
But then Idle didn't launch. No message. No Python process running in the 
background. So I launched it via a shell and grabbed an error message :
IOError: [Errno 13] Permission denied: 
'C:\\Users\\Foobar\\.idlerc\\recent-files.lst'

Then I googled and found http://bugs.python.org/issue1743

Deleting ~\.idlerc\ did the trick and now Idle runs fine.

So the bug 1743 isn't clearly solved and this is what I suspect :
My Windows is localized in French. From the DOS Shell, the User Dir is 
C:\Users\FOOBAR
but Windows Explorer displays in its address bar : C:\Utilisateurs\FOOBAR
Maybe the problem comes from here ?

--
components: IDLE, Installation
messages: 117184
nosy: Stephan.Bellegy
priority: normal
severity: normal
status: open
title: Idle doesn't launch
versions: Python 2.6, Python 2.7

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



[issue1743] IDLE fails to launch

2010-09-23 Thread Stephan Bellegy

Stephan Bellegy stephan.bell...@gmail.com added the comment:

New bug reported here
http://bugs.python.org/issue9925

--

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



[issue9925] Idle doesn't launch

2010-09-23 Thread Stephan Bellegy

Stephan Bellegy stephan.bell...@gmail.com added the comment:

it is reproductible.
At first, Python 2.6.? was installed.

i tried to install 2.7 and got the problem
uninstalled 2.7
tried 2.6.6 and got the problem

then google, delete dir and got it running

--

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



[issue1608921] PyThread_release_lock with pthreads munges errno

2009-04-01 Thread Stephan R.A. Deibel

Stephan R.A. Deibel sdei...@wingware.com added the comment:

Here is a patch against Python 2.6.1 that restores errno after the
sanity check in lock_PyThread_release_lock in Modules/threadmodule.c.

A potential controversy is whether it should be done here or in
thread_pthread.h but I believe that we should protect errno from
spurious change by _any_ threading model that objects to this internal 
attempt to acquire an already acquired lock.

--
keywords: +patch
Added file: http://bugs.python.org/file13552/errno-fix.diff

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



[issue1608921] PyThread_release_lock with pthreads munges errno

2009-03-31 Thread Stephan R.A. Deibel

Stephan R.A. Deibel sdei...@wingware.com added the comment:

If you are at PyCon 2009 sprints, try to see if you can find John
Ehresman in the Python Core sprint to see it happen at line 115 of
threadops.c in the Wing 3.2 source base.  If you're not there or can't
find him, I'll try to make a small example later.  Feel free to email me
directly also at sdeibel at wingware dot com. Note I saw this w/
pthreads and it may be that it does not occur under other threading
implementations.

--

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



[issue1608805] Py_FileSystemDefaultEncoding can be non-canonical

2009-03-31 Thread Stephan R.A. Deibel

Stephan R.A. Deibel sdei...@wingware.com added the comment:

It appears to be specific to 2.x and does not occur under Python 3.0:

Python 3.0 (r30:67503, Jan 15 2009, 09:27:16)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type help, copyright, credits or license for more information.
 import sys
 sys.getfilesystemencoding()
'utf-8'

Python 2.6.1 (r261:67515, Dec 11 2008, 11:59:39)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type help, copyright, credits or license for more information.
import sys
 sys.getfilesystemencoding()
'UTF-8'

Python 2.5.4 (r254:67916, Mar 16 2009, 09:34:35)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type help, copyright, credits or license for more information.
 import sys
 sys.getfilesystemencoding()
'UTF-8'

(This is on a Ubuntu system where LANG=en_US.UTF-8 is the default)

--

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



[issue1597850] Cross compiling patches for MINGW

2008-11-21 Thread Stephan Raue

Stephan Raue [EMAIL PROTECTED] added the comment:

when i crosscompile Python 2.6 with Patch cross-2.6-0.7.diff which is 
based on cross-2.5.1.patch  i become follow error: 

ld -s -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-
prototypes -I. -IInclude -I./Include build/temp.linux-i686-
2.5/home/stephan/OpenELEC/build.i386.uClibc/Python-
2.6/Modules/_multiprocessing/multiprocessing.o build/temp.linux-i686-
2.5/home/stephan/OpenELEC/build.i386.uClibc/Python-
2.6/Modules/_multiprocessing/socket_connection.o build/temp.linux-i686-
2.5/home/stephan/OpenELEC/build.i386.uClibc/Python-
2.6/Modules/_multiprocessing/semaphore.o -L/usr/lib -lpython2.5 -o 
build/lib.linux-i686-2.5/_multiprocessing.so
ld: unrecognized option '-DNDEBUG'
ld: use the --help option for usage information
creating build/temp.linux-i686-2.5/libffi
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... 
/home/stephan/OpenELEC/build.i386.uClibc/toolchain/bin/i686-geexbox-
linux-uclibc-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C 
compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Failed to configure _ctypes module

what can i do libffi compiles with --host and --build

when i compile libffi standalone and run configure with --with-system-
ffi the error is the same.

--
nosy: +sraue
versions: +Python 2.6 -Python 2.5
Added file: http://bugs.python.org/file12093/cross-2.6-0.7.diff

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



[issue2929] TimedRotatingFileHandler crashes on backup file deletion attempt

2008-05-20 Thread Stephan Blietz

New submission from Stephan Blietz [EMAIL PROTECTED]:

Hello,
when the maximum number of backup files is reached
TimedRotatingFileHandler can't delete the oldest existing file. I got
the following error message:

Traceback (most recent call last):
  File D:\Python25\lib\logging\handlers.py, line 75, in emit
self.doRollover()
  File D:\Python25\lib\logging\handlers.py, line 319, in doRollover
os.remove(s)
WindowsError: [Error 2] The system cannot find the file specified:
'assyst.log.2008-05-20_12-49'

The reason for this error is located in the getFilesToDelete method of
the TimedRotatingFileHandler class. The result sequence of this method
contains filenames but a complete filepath is needed.

After replacing 
result.append(fileName) 
with
result.append(os.path.join(dirName, fileName))
the problem seems to be solved

Regards
Stephan

--
components: Library (Lib)
messages: 67125
nosy: blocki
severity: normal
status: open
title: TimedRotatingFileHandler crashes on backup file deletion attempt
type: crash
versions: Python 2.5

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



[issue2198] code_hash() can be the same for different code objects

2008-02-27 Thread Stephan R.A. Deibel

New submission from Stephan R.A. Deibel:

The algorithm in code_hash() in codeobject.c can return the same hash
value for different code objects.  

Presumably distinct code objects should be very unlikely to have the
same hash value.  This bug affected our debugger before we worked around
it, and it could affect other things like profilers.

Adding the co_filename to the hash would be one way to fix this but I'm
not sure if that was purposely avoided in this code?

--
components: Interpreter Core
files: code_hash_bug.tgz
messages: 63083
nosy: sdeibel
severity: normal
status: open
title: code_hash() can be the same for different code objects
type: behavior
versions: Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, 
Python 2.2.3, Python 2.3, Python 2.4, Python 2.5
Added file: http://bugs.python.org/file9565/code_hash_bug.tgz

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



[issue2198] code_hash() can be the same for different code objects

2008-02-27 Thread Stephan R.A. Deibel

Stephan R.A. Deibel added the comment:

I should have noted that adding co_firstlineno as well to the hash would
be necessary to distinguish like code objects within the same file.  The
example has them on the same lines in different files but changing the
first line of the defs doesn't matter.

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



[issue1772] popen fails when there are two or more pathnames/parameters with spaces

2008-01-14 Thread Stephan Hoermann

Stephan Hoermann added the comment:

I have attached some code that demonstrates the bug. You need to run it 
on Windows and you need to place some bat file (it doesn't need to do 
anything just exist) at C:\Program Files\test.bat (or change the 
reference in the code, but it does need to include spacing). The first 
popen call works the second popen call will fail, because there are 2 
pathnames in the code with spaces. I am using the popen4 module in os 
but I also tested popen2 and popen3 and they do the same thing.

Added file: http://bugs.python.org/file9164/popen_bug.py

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



[issue1772] popen fails when there are two or more pathnames/parameters with spaces

2008-01-08 Thread Stephan Hoermann

New submission from Stephan Hoermann:

If commands similar to this (including all quotation 
marks) 'C:\\Program Files\\test.bat blah C:\\Data Files\\test2.txt' 
are executed using popen, then the following is returned from 
stderr 'C:\\Program' is not recognized as an internal or external 
command,\noperable program or batch file.\n. No use of quotation has 
been able to fix this. As soon as there is more than one pair of 
quotations inside the command string popen will not handle the command 
correctly.

--
components: Library (Lib), Windows
messages: 59580
nosy: shoermann
severity: major
status: open
title: popen fails when there are two or more pathnames/parameters with spaces
type: behavior
versions: Python 2.4, Python 2.5

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