[issue3848] select.epoll calling register with the same fd fails

2008-09-12 Thread Maries Ionel Cristian

New submission from Maries Ionel Cristian <[EMAIL PROTECTED]>:

The docs on epoll object's register method say: "Registering a file
descriptor that’s already registered is not an error, and has the same
effect as registering the descriptor exactly once."

However when calling register twice with the same fd it will fail with a
bogus "IOError: [Errno 17] File exists" error.

--
assignee: georg.brandl
components: Documentation, Extension Modules
messages: 73096
nosy: georg.brandl, ionel.mc
severity: normal
status: open
title: select.epoll calling register with the same fd fails
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

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



[issue3848] select.epoll calling register with the same fd fails

2008-09-12 Thread Maries Ionel Cristian

Maries Ionel Cristian <[EMAIL PROTECTED]> added the comment:

Why don't just fix the docs ?
I think it's consistent with the epoll api the way it is now.

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



[issue3852] kqueue.control requires 2 params while docs say max_events (the second) defaults to 0

2008-09-12 Thread Maries Ionel Cristian

New submission from Maries Ionel Cristian <[EMAIL PROTECTED]>:

http://docs.python.org/dev/library/select.html#id1

Docs say: "select.control(changelist, max_events=0[, timeout=None])"
However, control requires 2 params ("TypeError: control() takes at least
2 arguments (1 given)").

Also, it should be "kqueue" not "select" (There are 2 more like this
"epoll.fromfd(fd)" in the kqueue section, "select.kqueue(ident,
filter=KQ_FILTER_READ, flags=KQ_ADD, fflags=0, data=0, udata=0)" instead
of "select.kevent( ... ")

--
assignee: georg.brandl
components: Documentation, Extension Modules
messages: 73144
nosy: georg.brandl, ionel.mc
severity: normal
status: open
title: kqueue.control requires 2 params while docs say max_events (the second) 
defaults to 0
type: behavior
versions: Python 2.6, Python 3.0

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



[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2013-08-15 Thread Maries Ionel Cristian

New submission from Maries Ionel Cristian:

Running the file couple of times will make the interpreter fail with: 
libgcc_s.so.1 must be installed for pthread_cancel to work

>From what I've seen it is triggered from PyThread_delete_key (tries to load 
>libgcc_s.so at that time).

How does it happen?

The main thread will close fd 4 (because fh object is getting dereferenced to 
0) exactly at the same time libpthread will try to open and read libgcc_s.so 
with the same descriptor (4)

It's fairly obvious that the file handling in bug.py is a bug, but the 
interpreter should not crash like that !

This doesn't happen on python2.7. Also, python2.7 appears to be linked with 
libgcc_s.so.1 directly while the 3.x does not (I've tried 3.2 from ubuntu 
repos, and built 3.3 and 3.4 myself on ubuntu 12.04.2) - at least that's what 
ldd indicates.

--
components: Build, Extension Modules
files: bug.py
messages: 195253
nosy: ionel.mc
priority: normal
severity: normal
status: open
title: libgcc_s.so.1 must be installed for pthread_cancel to work
type: crash
versions: Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31301/bug.py

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



[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2013-08-17 Thread Maries Ionel Cristian

Maries Ionel Cristian added the comment:

> What is the version of your libc library? Try something like "dpkg -l
> libc6".
>

 2.15-0ubuntu10.4

I don't think it's that obscure ... uwsgi has this issue
https://www.google.com/search?q=libgcc_s.so.1+must+be+installed+for+pthread_cancel+to+work+uwsgi+site:lists.unbit.it-
they cause it probably different but the point is that it's not
obscure.

--

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



[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2013-08-17 Thread Maries Ionel Cristian

Maries Ionel Cristian added the comment:

Correct link 
https://www.google.com/search?q=libgcc_s.so.1+must+be+installed+for+pthread_cancel+to+work+uwsgi+site:lists.unbit.it

--

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



[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2013-08-17 Thread Maries Ionel Cristian

Maries Ionel Cristian added the comment:

Well anyway, is there any way to preload libgcc ? Because in python2.x it 
wasn't loaded at runtime.

--

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



[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2013-08-17 Thread Maries Ionel Cristian

Maries Ionel Cristian added the comment:

Alright ... would it be a very big hack to preload libgcc in the thread module 
(at import time) ? There is platform specific code there anyway, it wouldn't be 
such a big deal would it?

--

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



[issue21808] 65001 code page not supported

2014-06-19 Thread Maries Ionel Cristian

New submission from Maries Ionel Cristian:

cp65001 is purported to be an alias for utf8.

I get these results:

C:\Python27>chcp 65001
Active code page: 65001

C:\Python27>python
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale

LookupError: unknown encoding: cp65001
>>>

LookupError: unknown encoding: cp65001
>>> locale.getpreferredencoding()

LookupError: unknown encoding: cp65001
>>>




And on Python 3.4 chcp doesn't seem to have any effect:

C:\Python34>chcp 65001
Active code page: 65001

C:\Python34>python
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getpreferredencoding()
'cp1252'
>>> locale.getlocale()
(None, None)
>>> locale.getlocale(locale.LC_ALL)
(None, None)

--
components: Interpreter Core, Unicode, Windows
messages: 220964
nosy: ezio.melotti, haypo, ionel.mc
priority: normal
severity: normal
status: open
title: 65001 code page not supported
versions: Python 2.7, Python 3.4

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



[issue22507] PyType_IsSubtype doesn't call __subclasscheck__

2014-09-27 Thread Maries Ionel Cristian

New submission from Maries Ionel Cristian:

It appears it just does a reference check: 
https://hg.python.org/cpython/file/3.4/Objects/typeobject.c#l1300

It appears it's the same in 2.7: 
https://hg.python.org/cpython/file/2.7/Objects/typeobject.c#l1161

But this is not the intended behaviour right?

--
components: Interpreter Core
messages: 227706
nosy: ionel.mc
priority: normal
severity: normal
status: open
title: PyType_IsSubtype doesn't call __subclasscheck__
versions: Python 2.7, Python 3.4, Python 3.5

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



[issue20036] Running same doctests not possible on both py3 and py2

2013-12-20 Thread Maries Ionel Cristian

New submission from Maries Ionel Cristian:

One of these doesn't work depending on how you write the exception name.


 python3 -mdoctest src/tete.rst  
 python -mdoctest src/tete.rst   

One cannot put an ellipsis in the exception name so you see how this is a 
problem.

--
components: Demos and Tools, Library (Lib)
files: tete.py
messages: 206698
nosy: ionel.mc
priority: normal
severity: normal
status: open
title: Running same doctests not possible on both py3 and py2
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file33236/tete.py

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



[issue20036] Running same doctests not possible on both py3 and py2

2013-12-20 Thread Maries Ionel Cristian

Changes by Maries Ionel Cristian :


Added file: http://bugs.python.org/file33237/tete.rst

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



[issue20036] Running same doctests not possible on both py3 and py2

2013-12-20 Thread Maries Ionel Cristian

Maries Ionel Cristian added the comment:

Oooops, sorry.

--

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



[issue22697] Deadlock with writing to stderr from forked process

2014-10-22 Thread Maries Ionel Cristian

New submission from Maries Ionel Cristian:

Example code:

import os
import sys
import threading


def run():
sys.stderr.write("in parent thread\n")

threading.Thread(target=run).start()
pid = os.fork()
if pid:
os.waitpid(pid, 0)
else:
sys.stderr.write("in child\n")


To run:  while python3 deadlock.py; do; done

Note: does not reproduce if ran with `python -u` (unbuffered)

--
components: IO, Interpreter Core
messages: 229825
nosy: ionel.mc
priority: normal
severity: normal
status: open
title: Deadlock with writing to stderr from forked process
versions: Python 3.3, Python 3.4

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



[issue22697] Deadlock with writing to stderr from forked process

2014-11-02 Thread Maries Ionel Cristian

Maries Ionel Cristian added the comment:

Serhiy, I don't think this is a duplicate. Odd that you closed this without any 
explanation.

This happens in a internal lock in cpython's runtime, while the other bug is 
about locks used in the logging module (which are very different).

--
resolution: duplicate -> 
status: closed -> open

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



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

2014-11-02 Thread Maries Ionel Cristian

Changes by Maries Ionel Cristian :


--
nosy: +ionel.mc

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



[issue23312] google thinks the docs are mobile unfriendly

2015-01-25 Thread Maries Ionel Cristian

Maries Ionel Cristian added the comment:

You can see that theme in action at 
http://python-aspectlib.readthedocs.org/en/latest/

--
nosy: +ionel.mc

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



[issue23312] google thinks the docs are mobile unfriendly

2015-01-25 Thread Maries Ionel Cristian

Maries Ionel Cristian added the comment:

Sure, take anything you want.

--

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



[issue17799] settrace docs are wrong about "c_call" events

2015-03-18 Thread Maries Ionel Cristian

Changes by Maries Ionel Cristian :


--
nosy: +ionel.mc

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



[issue23990] Callable builtin doesn't respect descriptors

2015-04-17 Thread Maries Ionel Cristian

New submission from Maries Ionel Cristian:

It appears that callable doesn't really care for the descriptor protocol, so it 
return True even if __call__ is actually an descriptor that raise 
AttributeError (clearly not callable at all).

Eg:

Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> callable

>>> class A:
...  @property
...  def __call__(self):
...   raise AttributeError('go away')
...
>>> a = A()
>>> a
<__main__.A object at 0x0365B5C0>
>>> a.__call__
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 4, in __call__
AttributeError: go away
>>> callable(a)
True
>>> # it should be False :(

--
components: Interpreter Core
messages: 241352
nosy: ionel.mc
priority: normal
severity: normal
status: open
title: Callable builtin doesn't respect descriptors
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue23990] Callable builtin doesn't respect descriptors

2015-04-17 Thread Maries Ionel Cristian

Maries Ionel Cristian added the comment:

For context this respects the descriptor protocol:

>>> a()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 4, in __call__
AttributeError: go away

Mind you, this is legal use:

>>> class B:
...  @property
...  def __call__(self):
...   return lambda: 1
...
>>> b = B()
>>> b()
1

--

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