New submission from Enji Cooper :
As noted in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262487, cpython
relies on the definition of NSIG when building signal handlers to determine
what signals are and aren't invalid.
Unfortunately on FreeBSD, NSIG doesn't include [SIGRTMI
New submission from Enji Cooper :
Something I noticed when trying to repro another issue:
% python
Python 3.8.13 (default, Mar 16 2022, 17:28:59)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more
Enji Cooper added the comment:
Yup! Looks like it! Just needs a back port.
--
___
Python tracker
<https://bugs.python.org/issue47158>
___
___
Python-bugs-list m
Enji Cooper added the comment:
Grégory: good question.
I would personally advocate for doing it out of selfish interests.
I'm working with middleware based on 3.8 (moving to 3.9+ is non-trivial), and
we have a common fault scenario where the system breaks if
logging.handlers.SysLogHa
Enji Cooper added the comment:
Grégory: that will fix this issue, but what I really need is some of the other
changes, like moving the getaddrinfo logic into a separate route (connect).
--
___
Python tracker
<https://bugs.python.org/issue47
New submission from Enji Cooper :
The change made for bug 30378 caused a regression in our code by making
lookups for SysLogHandler addresses at init time, instead of making them more
lazy. Example:
>>> import logging.handlers
>>> LOGGER = logging.getLogger("logger&
Change by Enji Cooper :
--
title: Fix for bug 30378 regressed SysLogHandler -> Fix for bug 30378 regressed
SysLogHandler by making it resolve addresses at initialization instead of in
`.emit()`
___
Python tracker
<https://bugs.pyth
Enji Cooper added the comment:
Capturing more context here, based on internal discussion: other handlers are
doing address resolution in `emit()` (HTTPHandler, SMTPHandler), which is
expensive. In order for SysLogHandler to not regress behavior and not become
expensive, performance-wise, it
Enji Cooper added the comment:
This particular issue has been resolved in python 3.x.
--
nosy: +ngie
___
Python tracker
<https://bugs.python.org/issue18
New submission from Enji Cooper :
The code in Modules/signalmodule.c makes a number of assumptions of what
signals are considered valid, as well as what handlers need to be setup as part
of the core interpreter.
For example: much of the initialization of signal handlers, etc, is actually
Change by Enji Cooper :
--
title: Modules/signalmodule.c only works with `NSIG` signals; requires fudging
to support realtime signals, etc -> Modules/signalmodule.c creates handlers for
signals bound by `NSIG`; requires fudging to support realtime signals,
Change by Enji Cooper :
--
title: Modules/signalmodule.c creates handlers for signals bound by `NSIG`;
requires fudging to support realtime signals, etc -> Modules/signalmodule.c
creates handlers for signals bounded by `NSIG`; requires fudging to support
realtime signals,
New submission from Enji Cooper :
getdtablesize({2,3}) is a wonderful library call/system call to have access to
because it allows one to determine the descriptor limits at runtime in an
easier manner than having to do the equivalent with os.sysconf(..):
>>> os.sysconf(os.sysc
Change by Enji Cooper :
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue39742>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Enji Cooper :
While trying to port python 2 C extension code forward to python 3, I noticed
that the python 2.6 PyInt -> PyLong unification lacks a forward-compatible API
for PyLong_AS_LONG.
I'm not sure if this was intentional, but it is a slightly annoying w
Enji Cooper added the comment:
For the record, some projects (like Cython, pywin32) worked around this by
adding a preprocessor alias, PyLong_AS_LONG -> PyInt_AS_LONG with python 2.x.
--
___
Python tracker
<https://bugs.python.org/issu
Enji Cooper added the comment:
For the record, this seems like it might be the only discrepancy, per the py3c
project's exported PyInt APIs:
$ for api in `awk '$2 ~ /^PyInt/ { print $3 }' include/py3c/compat.h`; do grep
-q $api /usr/include/python2.7/longobject.h ||
Enji Cooper added the comment:
Workaround PR posted here: https://github.com/encukou/py3c/pull/28
--
___
Python tracker
<https://bugs.python.org/issue39
Enji Cooper added the comment:
@serhiy.storchaka: understood. Figured this would be a good errata note for
others to potentially find in the future.
--
___
Python tracker
<https://bugs.python.org/issue39
Enji Cooper added the comment:
PyInt_AS_LONG doesn't exist on python 3, however:
$ grep -r PyInt_AS_LONG /usr/include/
[/usr/include/python2.7/intobject.h:#define PyInt_AS_LONG(op) (((PyIntObject
*)(op))->ob_ival)
The code smell for the pieces that use PyInt_AS_LONG seems a bit ques
Enji Cooper added the comment:
> The reason why there was the PyInt_AS_LONG macro is that it is very simple
> and efficient. It never fails, because the value of the int object always
> fits in the C long. PyInt_AsLong is much slower. If you know that the object
> is int,
New submission from Enji Cooper :
When a body of C extensions needs to be ported from python <3.8 to 3.8, one of
the issues one might run into is improperly defined methods in a C extension,
which results in SystemErrors stating:
>>> SystemError: bad call flags
This new behavi
New submission from Enji Cooper :
Looking at Py_SAFE_DOWNCAST, it seems that the code could (in theory) leverage
_Static_assert on C11 capable compilers [1].
Looking at some other code APIs, like module initialization with METH_VARARGS,
etc, there are ways to determine whether or not the
New submission from Enji Cooper :
Some errnos for BSD/OSX are currently not supported by the errno module. It
would be helpful for these to be exposed to the end-user so they could
programmatically use them instead of reinventing the wheel in a separate
module/C extension, or hardcoding the
Enji Cooper added the comment:
Some items that I've noted so far that are missing:
- ENOATTR (BSD/OSX)
- ENOLINK (BSD; is reserved on OSX)
- ENOTSUP (NetBSD, OpenBSD, OSX)
--
___
Python tracker
<https://bugs.python.org/is
New submission from Enji Cooper :
Many users are used to --without-* flags in autoconf disabling features (and
optionally not installing them). --without-ensurepip (at face value to me)
suggests it shouldn't be built/installed.
This comment in https://bugs.python.org/issue20417 by ds
New submission from Enji Cooper :
The documentation for mmap.mmap() claims that passing a length of 0 will map in
an entire file, but unfortunately that doesn't work as shown below:
>>> mmap.mmap(-1, 0)
Traceback (most recent call last):
File "", line 1, in
OSE
Enji Cooper added the comment:
Sidenote: all versions tested were 3.8.2:
pinklady:freebsd ngie$ /usr/local/opt/python@3.8/bin/python3 -V
Python 3.8.2
--
___
Python tracker
<https://bugs.python.org/issue40
New submission from Enji Cooper :
madvise can be used when manipulating mmap'ed pages, but it can also be used
when protecting processes and other things.
Having madvise be available in mmap as a function would be helpful instead of
having to jump through a lot of hoops to run `MADV_PR
Change by Enji Cooper :
--
components: +Library (Lib)
___
Python tracker
<https://bugs.python.org/issue40786>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Enji Cooper :
The group that I work with uses the IN.py module to access constants available
in netinet/in.h on BSD when adjusting socket port ranges.
This compile-time module was never ported forward to 3.x and equivalent
functionality doesn't exist in the `s
Enji Cooper added the comment:
Is there something I can do to help move this change along? 8 years is a long
time for an issue to be open :(.
--
___
Python tracker
<https://bugs.python.org/issue13
New submission from Enji Cooper :
I tried using os.SEEK_END in a technical interview, but unfortunately, that
didn't work with python 3.x:
pinklady:cpython ngie$ python3
Python 3.7.2 (default, Feb 12 2019, 08:15:36)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help&qu
Enji Cooper added the comment:
?!
Being blunt: why should opening a file in binary vs text mode matter? POSIX
doesn't make this distinction.
Per the pydoc (https://docs.python.org/2/library/functions.html#open):
> The default is to use text mode, which may convert '\n
Change by Enji Cooper :
--
title: Negative `offset` values are no longer acceptable with implementation of
`seek` with python3; should be per POSIX -> Negative `offset` values are no
longer acceptable with implementation of `seek` with python3 when in text mode;
should be per PO
Enji Cooper added the comment:
Opening and seeking using SEEK_END worked in text mode with python 2.7. I'm not
terribly sure why 3.x should depart from this behavior:
>>> fp = open("configure", "rt"); fp.seek(-100,
Change by Enji Cooper :
--
versions: +Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue36111>
___
___
Enji Cooper added the comment:
This issue has been superseded by other work.
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/
Change by Enji Cooper :
--
pull_requests: +12067
___
Python tracker
<https://bugs.python.org/issue13497>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Enji Cooper :
--
title: Non-zero `offset`s are no longer acceptable with implementation of
`seek` in some cases with python3 when in text mode; should be per POSIX ->
Non-zero `offset`s are no longer acceptable with SEEK_END/SEEK_CUR
implementation of `seek` in pyth
Change by Enji Cooper :
--
title: Negative `offset` values are no longer acceptable with implementation of
`seek` with python3 when in text mode; should be per POSIX -> Non-zero
`offset`s are no longer acceptable with implementation of `seek` in some cases
with python3 when in t
Change by Enji Cooper :
--
versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue13501>
___
___
Enji Cooper added the comment:
I'll try to rebase Martin's changes, as they don't apply to the master branch
on GitHub today.
--
___
Python tracker
<https://bugs.pyt
43 matches
Mail list logo