[issue23710] C API doc for PyObject_HEAD is outdated

2015-03-19 Thread Tomi Pieviläinen

New submission from Tomi Pieviläinen:

https://docs.python.org/3/c-api/structures.html#c.PyObject_HEAD says that the 
macro should be used for creating new types and that it has ob_type. 
Unfortunately at some point (@61466 perhaps) that definition in object.h was 
changed. This affects other pages too (at least 
https://docs.python.org/3/extending/newtypes.html).

I encountered this while checking if a C extension (imposm.parser) could be 
trivially ported for Python 3. Unfortunately not. I suppose

  self-ob_type

should be replaced with

  Py_TYPE(self)

but that isn't really clear from the docs.

--
assignee: docs@python
components: Documentation
messages: 238530
nosy: docs@python, tpievila
priority: normal
severity: normal
status: open
title: C API doc for PyObject_HEAD is outdated

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



[issue18837] multiprocessing.reduction is undocumented

2013-08-26 Thread Tomi Pieviläinen

New submission from Tomi Pieviläinen:

In older versions (2.x, 3.2, 3.3) multiprocessing.reduction was only mentioned 
in a one example, with a one comment after it. In the 3.4dev documentation even 
this was dropped.

--
assignee: docs@python
components: Documentation
messages: 196184
nosy: docs@python, tpievila
priority: normal
severity: normal
status: open
title: multiprocessing.reduction is undocumented
versions: Python 3.4

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



[issue15890] lib2to3 pickles created with wrong permissions

2012-09-10 Thread Tomi Pieviläinen

Tomi Pieviläinen added the comment:

 Tomi, do you find a different behavior in 3.2?

No, the behaviour is the same in 2.6-3.2: no compiled files have permissions 
for other than root, and all non-compiled files do (because install is run with 
-m 644). What made me report this bug was that 3.3rc1 does not have this 
behaviour: while the pickles had a bad timestamp, the permissions were just 
fine, so I assumed that someone had changed the this intentionally.

Also this hasn't been a problem in Python2.x. I can install 2.6.8 and 2.7.3 
from source without fixing any permissions, and still have a working Python 
installation. 3.2.3 requires chmoding the lib2to3 pickles, but no other 
compiled files need to be touched (it seems that they aren't really needed).

--

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



[issue15890] lib2to3 pickles created with wrong permissions

2012-09-09 Thread Tomi Pieviläinen

New submission from Tomi Pieviläinen:

The fix of #15822 caused another break. After installing 3.3rc2 from source, ls 
-ltc --full-time /usr/local/lib/python3.3/lib2to3/ shows:

-rw---. 1 root root  1455 2012-09-09 20:55:36.475519602 +0300 
PatternGrammar3.3.0.candidate.2.pickle
-rw---. 1 root root 20862 2012-09-09 20:55:36.425520211 +0300 
Grammar3.3.0.candidate.2.pickle
drwx--. 2 root root  4096 2012-09-09 20:55:33.681520171 +0300 __pycache__/
drwxr-xr-x. 4 root root  4096 2012-09-09 20:55:30.087520195 +0300 tests/
drwxr-xr-x. 3 root root  4096 2012-09-09 20:55:30.063457702 +0300 pgen2/
drwxr-xr-x. 3 root root  4096 2012-09-09 20:55:30.028520614 +0300 fixes/
-rw-r--r--. 1 root root 28046 2012-09-09 20:55:09.319519773 +0300 refactor.py
-rw-r--r--. 1 root root 28386 2012-09-09 20:55:09.279456945 +0300 pytree.py
-rw-r--r--. 1 root root  1114 2012-09-09 20:55:09.242458183 +0300 pygram.py
-rw-r--r--. 1 root root   793 2012-09-09 20:55:09.205457004 +0300 
PatternGrammar.txt
-rw-r--r--. 1 root root  7075 2012-09-09 20:55:09.168457078 +0300 patcomp.py
-rw-r--r--. 1 root root 11624 2012-09-09 20:55:09.131457019 +0300 main.py
-rw-r--r--. 1 root root67 2012-09-09 20:55:09.091644598 +0300 __main__.py
-rw-r--r--. 1 root root 7 2012-09-09 20:55:09.052457036 +0300 __init__.py
-rw-r--r--. 1 root root  6589 2012-09-09 20:55:09.014519602 +0300 Grammar.txt
-rw-r--r--. 1 root root 14533 2012-09-09 20:55:08.977519642 +0300 fixer_util.py
-rw-r--r--. 1 root root  6706 2012-09-09 20:55:08.940519615 +0300 fixer_base.py
-rw-r--r--. 1 root root 10011 2012-09-09 20:55:08.903519608 +0300 btm_utils.py
-rw-r--r--. 1 root root  6833 2012-09-09 20:55:08.865457147 +0300 btm_matcher.py


The pickles are now correctly newer than the Grammar texts, but are readable 
only by root. Quick chmod fixes this, but has to be done manually on systems 
with strict UMASK for root.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 170124
nosy: tpievila
priority: normal
severity: normal
status: open
title: lib2to3 pickles created with wrong permissions
versions: Python 3.3

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



[issue15822] Python 3.3 creates lib2to3 grammar in wrong order

2012-08-31 Thread Tomi Pieviläinen

Tomi Pieviläinen added the comment:

Platform: RHEL 6.3 x86_64.

0. (remove old python 3 install, though this doesn't change anything)
1. Unpack 3.3rc1 source, cd Python-3.3.0rc1/
2. ./configure; make
3. sudo make install
4. ls -ltc --full-time /usr/local/lib/python3.3/lib2to3/

This shows that Grammar.txt is just a tiny bit newer than the pickle.

To produce the SandboxViolation:

1. curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py
2. python3.3 virtualenv.py my_new_env

or alternatively use distribute to install anything with the easy_install 
command.

--

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



[issue15822] Python 3.3 creates lib2to3 grammar in wrong order

2012-08-31 Thread Tomi Pieviläinen

Tomi Pieviläinen added the comment:

Ah, sorry, forgot to add that info. I also am running ext4.

--

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



[issue15822] Python 3.3 creates lib2to3 grammar in wrong order

2012-08-30 Thread Tomi Pieviläinen

New submission from Tomi Pieviläinen:

Python 3.3rc1 source install modifies/installs lib2to3/Grammar.txt after 
modifying Grammar3.3.0.candidate.1.pickle:

-rw-r--r--. 1 root root  6589 2012-08-27 13:25:33.190414570 +0300 Grammar.txt
-rw-r--r--. 1 root root 20622 2012-08-27 13:25:33.150477192 +0300 
Grammar3.3.0.candidate.1.pickle

This causes lib2to3/pgen2/driver:load_grammar to try to recreate the pickle 
(the _newer call on line 119 returns false), which triggers SandboxViolation in 
when using easy_install/distribute 
(https://bitbucket.org/tarek/distribute/issue/317/easy_install-fails-with-sandboxviolation)
 see .

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 169445
nosy: tpievila
priority: normal
severity: normal
status: open
title: Python 3.3 creates lib2to3 grammar in wrong order
type: behavior
versions: Python 3.3

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



[issue15317] Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

2012-07-16 Thread Tomi Pieviläinen

Tomi Pieviläinen tomi.pievilainen+launch...@iki.fi added the comment:

On Sat, Jul 14, 2012 at 12:44:46PM +, Éric Araujo wrote:
 
 Éric Araujo mer...@netwok.org added the comment:
 
 How did you configure and build?  If you ran make as root it may explain this.

Indeed I did do it as root for all steps. The umask for root was 022,
however.

--

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



[issue15317] Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

2012-07-10 Thread Tomi Pieviläinen

New submission from Tomi Pieviläinen tomi.pievilainen+launch...@iki.fi:

/usr/local/lib/python3.2/lib2to3/Grammar3.2.3.final.0.pickle is readable only 
by root after installing with make install from the source package. This makes 
at least installing distribute fail, and thus makes virtualenv, tox etc. 
unusable.

--
components: Installation
messages: 165171
nosy: tpievila
priority: normal
severity: normal
status: open
title: Source installation sets incorrect permissions for 
Grammar3.2.3.final.0.pickle
type: behavior
versions: Python 3.2

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



[issue15317] Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

2012-07-10 Thread Tomi Pieviläinen

Tomi Pieviläinen tomi.pievilainen+launch...@iki.fi added the comment:

Also PatternGrammar3.2.3.final.0.pickle is missing the read permissions.

--

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