Campbell Barton added the comment:
Note, this bug is something we ran into in Blender, see:
https://developer.blender.org/T84752
--
___
Python tracker
<https://bugs.python.org/issue35
Campbell Barton added the comment:
Could this fix be applied to Python 3.7x?
Currently the visual effects platform for 2021 is using Python 3.7.x, see:
https://vfxplatform.com
Which means anyone using the VFX platform can run into this bug.
--
nosy: +ideasman42
Campbell Barton added the comment:
This patch is still relevant, mentioning this since the patch is from a while
ago.
--
___
Python tracker
<https://bugs.python.org/issue9
Campbell Barton added the comment:
Edit:
When calling 'PyDict_DelItem' on a key that isn't in the dictionary, a
'KeyError' is raised. This is not documented.
>From reading the current documentation, it only seems as if an error is raised
New submission from Campbell Barton :
When calling 'PyDict_DelItem' on a key that isn't in the hash a KeyError is
raised. This is not documented.
--
components: C API
messages: 377053
nosy: ideasman42
priority: normal
severity: normal
status: open
title: Missing do
Campbell Barton added the comment:
Thanks for the info, in that case will there be a way to do this from the
CPython API which can work with raw strings? (utf8, wchat_t or similar types),
that doesn't require the GIL and alloc/free of PyOb
New submission from Campbell Barton :
Py_UNICODE_TOLOWER / Py_UNICODE_TOUPPER are marked as deprecated in the docs.
https://docs.python.org/3/c-api/unicode.html?highlight=py_unicode_tolower#c.Py_UNICODE_TOLOWER
Someone submitted a patch to our project which uses these.
What is unclear, is if
Campbell Barton added the comment:
@serhiy.storchaka, while a properly working function that uses getrandbits
isn't so complex, its not trivial either.
It needs to create smaller chunks and join them (also check zero size case
which raises an error if passed).
eg:
```
Campbell Barton added the comment:
@r.david.murray, yes, this avoids list creation, but is still quite slow.
To create 1mb of data, you can compare the following:
python -m timeit -s 'from os import urandom' 'print(len(urandom(100)))'
python -m timeit -s
Campbell Barton added the comment:
Correction, meant to write: random.randbytes(n).
--
___
Python tracker
<http://bugs.python.org/issue27096>
___
___
Python-bug
New submission from Campbell Barton:
Currently, getting random bits can be done with os.urandom,
However recently I was faced with having to make a test (with reproducible
behavior), so I needed to replace os.urandom with a random generator that took
a seed value.
It turns out there are 3
Campbell Barton added the comment:
@rhettinger, agree that very large ints in this case aren't going to give very
usable results.
On the other hand, this limit isn't imposed elsewhere (you can power-of
operator to create bigger numbers).
Nevertheless this isn't going to g
Campbell Barton added the comment:
> This probably isn't an issue on non-Windows or 64-bit systems.
In fact it is, the limitation applies to 64bit Linux too. (tested in CPython
3.5.1)
--
nosy: +ideasman42
___
Python tracker
<http://bugs
Campbell Barton added the comment:
A related question, (realize this isn't a support forum), but what is the
equivalent API calls in Python3.5 so we can update scripts.
Should we be doing: os.walk(os.fsdecode(path)) ?
>From Python's documentation, os.fsdecode is using 'str
Campbell Barton added the comment:
@haypo, I checked available info online and couldn't find any reference to byte
file-paths were deprecated since Python3.2.
On the contrary, the 3.2 release notes [0] state:
"countless fixes regarding bytes/string issues; among them full sup
Campbell Barton added the comment:
Updated the patch for '93049:d9a3d23cf8f0'
Note, the link for the original bug report has changed: See
https://developer.blender.org/T31856
--
status: closed -> open
Added file: http://bugs.python.org/file36913/fix_un
Changes by Campbell Barton :
--
resolution: out of date -> remind
___
Python tracker
<http://bugs.python.org/issue15859>
___
___
Python-bugs-list mai
Campbell Barton added the comment:
@Roger, I should have mentioned I had to add "-n" to the argv so subprocess
would be disabled.
--
___
Python tracker
<http://bugs.python.o
Campbell Barton added the comment:
Hi, I just found a use for this feature, with `use_subprocess` being optional
its possible to load idle into a running python session.
--
import idlelib
import idlelib.PyShell
idlelib.PyShell.main()
--
This allows you to load idle inside an
Campbell Barton added the comment:
patch attached, simply wraps putenv()
--
keywords: +patch
Added file: http://bugs.python.org/file28144/pyos_putenv.diff
___
Python tracker
<http://bugs.python.org/issue16
Campbell Barton added the comment:
Agree PyOS_PutEnv would be good since its not restricted to string encoding and
resolves the problem of not being able to control env vars for an embedded
interpreter in general.
Having ways to change encoding is good too but a bit outside the scope of this
New submission from Campbell Barton:
note, I was asked to report this issue, posted on the py dev mailing list: see
- http://code.activestate.com/lists/python-dev/118015/
---
We've run into an issue recently with blender3d on ms-windows where we
want to enforce the encoding is UTF-8 wit
New submission from Campbell Barton:
There is an inconsistency in PyUnicode_EncodeFSDefault(), on Linux its argument
is checked to be unicode, and NULL is returned when its not. On windows
however, this throws an assertion.
The problem with this is, in some CAPI code you may pass an argument
Changes by Campbell Barton :
--
components: +Unicode, Windows
nosy: +ezio.melotti
versions: +Python 3.2, Python 3.3
___
Python tracker
<http://bugs.python.org/issue15
Campbell Barton added the comment:
Shouldn't it be documented that it changes still? - since people are using
pytjon3.2 and its a stable release, _any_ breaking change should be documented
IMHO
--
___
Python tracker
<http://bugs.py
Campbell Barton added the comment:
checked for docs here:
http://docs.python.org/dev/whatsnew/3.3.html
--
___
Python tracker
<http://bugs.python.org/issue12
New submission from Campbell Barton :
In python 3.2 this works and prints ,
in cpython hg: 71296:ab162f925761 it fails with:
NameError: global name '__class__' is not defined
Since this change is not documented I assume its a bug.
--- snip ---
class Test:
def __init__(self): print
New submission from Campbell Barton :
python3.2mu -c "import xml.dom.minidom ;
xml.dom.minidom.parse('gnome-cpu-frequency-applet.svg')"
--- gives the following traceback
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.2
New submission from Campbell Barton :
On Linux - tested on: Arch linux @ Debian Squeeze, this fails
python -c "__import__('webbrowser').open('http://python.org')"
The exception thats raised is:
Traceback (most recent call last):
File "", line 1, in
New submission from Campbell Barton :
Hi, Im buildiong blender3d with -Werror and python 3.2 gives an error which
doesnt happen in 3.1.
Tested with SVN r88378. on linux.
---
cc1: warnings being treated as errors
In file included from /opt/py32/include/python3.2d/Python.h:52:0
Campbell Barton added the comment:
This is fixed in 3.2a4.
--
___
Python tracker
<http://bugs.python.org/issue10603>
___
___
Python-bugs-list mailing list
Unsub
New submission from Campbell Barton :
# create this path.
# it could be made by any application but including this line
# so encoding is not confused.
# c:\äöü
__import__("os").mkdir(b'c:\\\xe4\xf6\xfc')
# Now create a new script and save in the newly created dir
c:\äöü\
Campbell Barton added the comment:
This bug is with blender3d, were the paths are stored internally in C as simple
char arrays - bytes.
We could expose all path names as bytes too through our C/python API, this
would at least be a 1:1 mapping, however Id prefer using strings if possible
Campbell Barton added the comment:
note, this bug was reported to me by a user running windows 7, 64bits.
--
___
Python tracker
<http://bugs.python.org/issue10
New submission from Campbell Barton :
Attached is a script which works in linux but not windows XP 32bit with Python
3.1.3.
The problem is that the path can be written to when specified as bytes but when
escaped it fails.
--
components: IO
files: utf8_surrogateescape.py
messages
New submission from Campbell Barton :
On linux I have a path which python reads as...
/data/test/num\udce9ro_bad/untitled.blend
os.listdir("/data/test/") returns this ['num\udce9ro_bad']
But the same path cant be given to the C api's Py_CompileString
Where fn is
New submission from Campbell Barton :
Some parts of the python api expect __main__ module dictionary to be the
namespace when executing a script, this is true when running a python script
from the python binary but NOT true when running a compiled script from the
C/API which can lead to bugs
New submission from Campbell Barton :
Py_SetPythonHome holds a pointer to the variable passed, this is not
documented so passing a variable on the stack will not work as expected
unless its static or allocated.
--
components: None
messages: 92642
nosy: ideasman42
severity: normal
status
New submission from Campbell Barton :
Py_SetPythonHome takes a *wchar_t not a *char, this is obvious from
looking at the header,
However I tried using this function and couldn't get it working until I
made the home variable a static string.
when looking at the source this is obvious
Campbell Barton added the comment:
Hi Raymond, in general I agree with your comments that adding 2 ways to
do things is not great. The reason I still think this is an advantage is
that I know the API well enough (with manipulating dicts/lists etc) and
I still want this function for the sake of
New submission from Campbell Barton :
This patch was made on python r74276
Often when writing in C/Python I want to append to a list within a C
loop of an unknown length.
When this is done for newly created PyObject (which is quite common) -
you need to assign each item to a variable and then
Changes by Campbell Barton :
--
type: -> compile error
___
Python tracker
<http://bugs.python.org/issue6439>
___
___
Python-bugs-list mailing list
Unsubscri
New submission from Campbell Barton :
in python 3.2 (current rev 73893)
Demo/embed/demo.c passes a 'char **' to PySys_SetArgv rather then a
'wsize_t **'
Im also confused as to how this conversion should be made in a portable
way, without copying some farily large static fun
Campbell Barton added the comment:
Updated with an PyErr_DisplayEx function that accepts a file argument.
--
Added file: http://bugs.python.org/file14308/PyErr_AsUnicode_r73443.diff
___
Python tracker
<http://bugs.python.org/issue6
Campbell Barton added the comment:
Thanks for the feedback, I wasnt aware of PyErr_Display, its not
documented as far as I know.
http://docs.python.org/dev/py3k/genindex-all.html
For blender, its development id still in progress so we don't yet have
an internal console replacement.
ho
Changes by Campbell Barton :
Added file: http://bugs.python.org/file14301/PyErr_AsUnicode_r73429.diff
___
Python tracker
<http://bugs.python.org/issue6284>
___
___
Pytho
Changes by Campbell Barton :
Removed file: http://bugs.python.org/file14300/PyErr_AsUnicode_r73429.diff
___
Python tracker
<http://bugs.python.org/issue6284>
___
___
Pytho
Changes by Campbell Barton :
Removed file: http://bugs.python.org/file14299/PyErr_AsUnicode_r73429.diff
___
Python tracker
<http://bugs.python.org/issue6284>
___
___
Pytho
Campbell Barton added the comment:
last patch was bad heres a new one.
--
Added file: http://bugs.python.org/file14300/PyErr_AsUnicode_r73429.diff
___
Python tracker
<http://bugs.python.org/issue6
New submission from Campbell Barton :
This function returns the output of PyErr_Print as a unicode string.
We needed this in Blender3D because it has its own error logging system
which does not use the console.
The patch is made against python3k r73429.
--
components: None
files
Campbell Barton added the comment:
added to setslice too, fixed spelling error.
--
Added file: http://bugs.python.org/file13938/slice.diff
___
Python tracker
<http://bugs.python.org/issue5
Changes by Campbell Barton :
Removed file: http://bugs.python.org/file13922/slice.diff
___
Python tracker
<http://bugs.python.org/issue5967>
___
___
Python-bugs-list m
New submission from Campbell Barton :
simple patch, docs say that PyList_GetSlice() works like list[high:low],
but does not say that negative indices's dont work as with python slicing.
--
assignee: georg.brandl
components: Documentation
files: slice.diff
keywords: patch
messages:
53 matches
Mail list logo