sebastian added the comment:
thank you very much...
but: [...] the class and arguments are evaluated using the
logging package's namespace. [...]
does this mean, it is not possible to use user-defined handlers,
naturally residing outside python's class library (and logging pack
Sebastian added the comment:
Yes, it is. I encountered it at Solaris9 with python 2.7.1.
--
nosy: +SebaM6
___
Python tracker
<http://bugs.python.org/issue4
New submission from Sebastian :
In Python 3.6.3 I can do:
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
logger.info("this does not work")
logging.info("PARTY")
logger.info("this works")
And it outputs:
INFO:root:PARTY
INFO:root:this
New submission from Sebastian :
Hi all,
I found a bug in the exception handler. When I
start the app without any arguments I get an
output I expect:
__main__:2:DeprecationWarning: Deprecated function.
When I run the app with arguments, the arguments
are printed somehow in the exception output
Sebastian added the comment:
Could anyone please correct the title? Thx :)
--
___
Python tracker
<http://bugs.python.org/issue8787>
___
___
Python-bugs-list m
Sebastian added the comment:
Oh, damn. I really forgot the argv filename thing. Nevermind :)
But back to topic. __file__ might be not the best solution for that. What does
Python when embedded, and __file__ is not set? That can happen when the source
of your code is not a file (multiline
Sebastian added the comment:
attached a patch for this issue now.
Now it first uses the name of the script,
instead of __file__.
--
keywords: +patch
Added file: http://bugs.python.org/file17461/_warnings.c.patch
___
Python tracker
<h
Sebastian added the comment:
any news on this?
--
___
Python tracker
<http://bugs.python.org/issue8787>
___
___
Python-bugs-list mailing list
Unsubscribe:
Sebastian Berg added the comment:
Sorry, I need some time to dive back into this, so some things might be garbled
:). Yes, I do agree supporting a custom `tp_new` here seems incredibly tricky.
I have not thought about the implications of this, though.
> guess the safest option is to f
Sebastian Berg added the comment:
It is probably early, but I am starting to like the idea of a "C MetaClass
factory" helper/indicator.
It seems to me that yes, at least `tp_new` cannot be called reasonable for a
class that is created in C, it is just too confusing/awkward to t
Sebastian Berg added the comment:
Fully, agree! In the end, `PyType_FromSpec` replaces `type.__new__()` (and
init I guess) when working in C. In Python, we would call `type.__new__`
(maybe via super) from the `metatype.__new__`, but right now, in C, the
metatype cannot reliably use
Sebastian Berg added the comment:
Well, what we need is a way to say: I am calling `type.__new__` (i.e.
PyType_FromSpec) on purpose from (effectively) my own `mytype.__new__`?
That is, because right now I assume we want to protect users from calling
PyType_FromSpec thinking that it is
Sebastian Berg added the comment:
Btw. huge thanks for looking into this! Let me know if I can try to help out
(I can make due with static metatypes, but my story seems much clearer if I
could say: Well with Py 3.11 you can, and probably should, do it dynamically.).
I had lost a lot of
Change by Sebastian Rittau :
--
nosy: +srittau
___
Python tracker
<https://bugs.python.org/issue46006>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sebastian Rittau :
--
nosy: +srittau
___
Python tracker
<https://bugs.python.org/issue46414>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Sebastian Berg :
Starting here, but there could be Cython interaction or something else in
theory. But, when running the following:
* Python 3.10.1 (not 3.9.9, debug version or not)
* Setting a tracing function (not setting a trace-function will fix the issue)
* Running
Sebastian Berg added the comment:
Ahh, a further data-point. The name from the module scope that is overwritten
IS a parameter name used in the function locals. Strangly, if I modify the
tracing to print more:
stop = 0
def trace(frame, event, arg):
global stop
if stop >
Sebastian Rittau added the comment:
Sounds like a good idea. I would put it into the introduction. I hear it will
easily be missed in other sections.
Wouldn't a link to PyPI make more sense than a GitHub link?
--
___
Python tracker
&
Change by Sebastian Berg :
--
title: Possibly bad interaction with tracing and cython? -> Tracing causes
module globals to be mutated when calling functions from C
___
Python tracker
<https://bugs.python.org/issu
Sebastian Berg added the comment:
Thanks for having a look. I have confirmed this is related to Cython (no
pandas/NumPy involved) – repro at https://github.com/seberg/bpo46451. What
happens under the hood in Cython is probably:
https://github.com/cython/cython/blob/master/Cython/Utility
Change by Sebastian Berg :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue46451>
___
___
Python-bugs-list
Sebastian Berg added the comment:
Not reopening for now, but I will note again that (AFAIK) Cython uses
`PyEval_EvalCodeEx`, and the docs say that it is not used internally to CPython
anymore.
So it seems pretty plausible that the bug is in `PyEval_EvalCodeEx` and not the
generated Cython
Sebastian Berg added the comment:
While I have a repro for Python, I think the pre release of cython already
fixes it (and I just did not regenerated the C sources when trying, I guess. A
`git clean` to the rescue...).
--
___
Python tracker
New submission from Sebastian Rittau :
Currently, the Python 3.10.2 documentation at
https://docs.python.org/3/library/asyncio-task.html?highlight=coroutine#asyncio.coroutine
says:
"Note: Support for generator-based coroutines is deprecated and is scheduled
for removal in Python
Sebastian Wiesner added the comment:
Why should it? After all, you're sort of abusing ctypes by repeatedly creating
Struture types over and over again. C structures that you might want to wrap
with these types are fixed and known at the time of programming, so there is
never a ne
Sebastian Ramacher added the comment:
Since the patches are not applicable to Py 3.x and Py 2.7 is stable I'm closing
this bug.
--
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python.or
Sebastian Ramacher added the comment:
That is definitely not python's job. That is the duty of your shell and python
should never expand that.
And it would lead to platform specific behavior as one can see with the
following script:
import sys
import subprocess
if __name__ == &quo
Sebastian M added the comment:
One more thing, as I tried to rebuild whole python I've encountered on
following problem:
building '_multiprocessing' extension
gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -DHAVE_SEM_OPEN=1
-DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDW
Changes by Sebastian Wiesner :
--
nosy: +lunar
___
Python tracker
<http://bugs.python.org/issue12873>
___
___
Python-bugs-list mailing list
Unsubscribe:
Sebastian Wiesner added the comment:
More precisely, the bug is, that 2to3 refactors the "print()" invocation in
"test1.py" though it shouldn't because a "print_function" future import is
present at the beginning of "test1.py". The cross-check w
Changes by Sebastian Ramacher :
--
nosy: +sebastinas
___
Python tracker
<http://bugs.python.org/issue12844>
___
___
Python-bugs-list mailing list
Unsubscribe:
Sebastian Ramacher added the comment:
Any news on that?
--
___
Python tracker
<http://bugs.python.org/issue1699259>
___
___
Python-bugs-list mailing list
Unsub
New submission from Sebastian Hagen :
io.BytesIO().readinto() does not correctly handle the case of being called on a
BytesIO object that has been seeked past the end of its data. It consequently
ends up reading into unallocated memory, and (typically?) segfaulting if used
in this manner
New submission from Sebastian Spaeth :
imaplib's Time2Internaldate returns invalid (as localized) INTERNALDATE
strings. Appending a message with such a time string leads to a:
19 BAD Command Argument Error. 11 (for MS Exchange IMAP servers)
it returned "26-led-2011 18:23:44 +0100
Sebastian Spaeth added the comment:
P.S. To replicate this in ipython:
import locale, imaplib
locale.setlocale(locale.LC_ALL,'de_CH.utf8')
imaplib.Time2Internaldate(220254431)
Out[1]: '"24-Dez-1976 06:47:11 +0100"'
(Note the
Sebastian Spaeth added the comment:
CC'ing lavajoe as he seemed to be busy with some of imaplib's Date stuff the
last couple of days.
--
nosy: +lavajoe
___
Python tracker
<http://bugs.python.o
Sebastian Spaeth added the comment:
I think I found the issue he mentioned, however it was about the functions
taking the local time (rather than UTC), which is fine.
The problem is that Time2Internaldate is used for every .append() operation
internally, producing invalid dates which are
Sebastian Spaeth added the comment:
> Added file: imaplib_Time2Internaldate_locale_fix.patch
The patch looks very good to me and works. I agree that we should be
returning a bytearray but this is should not be part of this issue.
For all that it's worth:
Signed-off-by: Sebastia
sebastian serrano <[EMAIL PROTECTED]> added the comment:
Running with python -O the timing gets a little closer between Lock and
RLock. This code won't be easy to improve in performance.
The heaviest call is current_thread(), used at lines:
117:me = current_thread()
137:if s
New submission from Sebastian Kirsche <[EMAIL PROTECTED]>:
The attached patch makes textwrap work with strings containing dashes
and Unicode alphabetic characters. In addition, it fixes the test case
for issue 1149508, which no longer failed after temporarily undoing the
corresponding
Sebastian Ramacher <[EMAIL PROTECTED]> added the comment:
At least a response, finally.
> * Any reason why PySys_SetPath(char *) is left out?
I guess it I just missed it.
> * Same for PySys_SetArgv(int, char **)
That one is non-trivial and requires some rewriting of PySys_Se
New submission from Sebastian Wiesner <[EMAIL PROTECTED]>:
The documentation of Python 2.6 and 2.7 only mentions the class
attribute "__mro__" in ABC documentation and in Data model documentation
when explaining description invocation (see search results:
http://docs.python.org/d
New submission from Sebastian Rittau <[EMAIL PROTECTED]>:
The attached patch removes all instances of the deprecated "apply"
function from distutils and thereby fixes warnings when run with -3.
--
components: Distutils
files: distutils.diff
keywords: patch
messages: 772
Sebastian Rittau <[EMAIL PROTECTED]> added the comment:
Oops, missed a closing parenthesis.
Added file: http://bugs.python.org/file12264/distutils.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Changes by Sebastian Rittau <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file12263/distutils.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
New submission from Sebastian Rittau <[EMAIL PROTECTED]>:
The attached patch replaces all instances of "x.has_key(k)" method calls
by "k in x". It also replaces one call to parser.ast2tuple by
parser.st2tuple. This removes deprecation warnings when running in -3 mo
Sebastian Rittau <[EMAIL PROTECTED]> added the comment:
I'd like to see this fixed, just to decrease the amount of warning spam
I get when testing my own packages. It seems that one of my dependecies
that I have no control over is pulling this in. Adding a warning when
this module i
Sebastian Rittau added the comment:
A timedelta.toseconds method (or equivalent) makes no sense. The number
of seconds in a day is not fixed (due to leap seconds) and relying on
such a method would introduce subtle bugs. The only way to find out the
number of seconds in a range of dates is if
Sebastian Rittau added the comment:
This API is too "magical" to my liking and doesn't really reflect what
context manager's are supposed to do, i.e. handling resources. Also, I
don't see much advantage over:
group = OptionGroup(parser, "
Sebastian Rittau added the comment:
Leap second handling is usually configurable. Default on Debian Linux
(but similar on RHEL and SuSE):
>>> int(date(1994,1,1).strftime("%s")) - int(date(1993,1,1).strftime("%s"))
31536000
After doing "cp /usr/share/zoneinfo/
Changes by Sebastian Ramacher :
--
nosy: +sebastinas
___
Python tracker
<http://bugs.python.org/issue4949>
___
___
Python-bugs-list mailing list
Unsubscribe:
Sebastian Berg added the comment:
To add to this: it would seem to me that the side-effects of importing should
be guaranteed to only be called once?
However, IO or other operations could be part of the import side-effects and
release the GIL. So even a simple, pure-Python, package could
Sebastian Berg added the comment:
Thanks, so there should already be a lock in place (sorry, I missed that). But
somehow we seem to get around it?
Do you know what may cause the locking logic to fail in this case? Recursive
imports in NumPy itself? Or Cython using low-level C-API?
I.e
Change by Sebastian Rittau :
--
keywords: +patch
pull_requests: +30392
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/32335
___
Python tracker
<https://bugs.python.org/issu
Change by Sebastian Berg :
--
nosy: +seberg
___
Python tracker
<https://bugs.python.org/issue37980>
___
___
Python-bugs-list mailing list
Unsubscribe:
Sebastian Berg added the comment:
I applaud the stricter rules in general, as Mark noted nicely, the issue is
that `__index__` is maybe a strange way to achieve that for bools (it is not
like `123` is a clean bool)? `__nonzero__` coerces to bools, there is no
`__bool__` to convert to bool
New submission from Sebastian Ernst :
A c-function with the following signature ...
```C
int16_t __stdcall __declspec(dllimport) square_int(
int16_t a
);
```
... is being called with ctypes:
```python
def test_error_callargs_unconfigured_too_many_args():
dll
Sebastian Ernst added the comment:
Thanks a lot for the clarification, Eryk. I did not notice that it was
deprecated behavior.
For the "too many arguments" case I guess this is not an issue. However, just
for the symmetry of things, I also looked at calling a function wi
New submission from Sebastian Rittau :
In the 3.8 release notes (https://docs.python.org/3.8/whatsnew/3.8.html), the
section "IDLE and idlelib" is duplicated as "idlelib and IDLE". Also, the
section "gc" and "gzip" between them are not sorted a
New submission from Sebastian Rittau :
In Python 3.8 asyncio exceptions were consolidated into the new module
"asyncio.exceptions". Previously they were spread out over several modules.
While the documentation always mandated to import the exceptions from top-level
"asyn
New submission from Sebastian Rittau :
The "curses" module is misspelled and sorted as "ncurses" in the release notes.
--
messages: 354579
nosy: srittau
priority: normal
severity: normal
status: open
title: 3.8 Release Notes: "curse
New submission from Sebastian Rittau :
The link to SSLContext.post_handshake_auth in the "ssl" section in the release
notes is missing.
--
assignee: docs@python
components: Documentation
messages: 354582
nosy: docs@python, srittau
priority: normal
severity: normal
status:
New submission from Sebastian Rittau :
The documentation for NormalDist.quantiles()
(https://docs.python.org/3.8/library/statistics.html#statistics.NormalDist) is
missing the "n" argument from the definition.
--
assignee: docs@python
components: Documentation
messages: 3
New submission from Sebastian Rittau :
The documentation of threading.excepthook
(https://docs.python.org/3.8/library/threading.html#threading.excepthook) talks
about "object", when it only has a "thread" attribute:
"Storing object using a custom hook can resurr
New submission from Sebastian Rittau :
The arguments for typing.get_origin() and typing.get_args() are named "typ" in
the documentation
(https://docs.python.org/3.8/library/typing.html#typing.get_origin), while they
are named "tp" in the implementation. Important if used
Change by Sebastian Rittau :
--
keywords: +patch
pull_requests: +16326
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16753
___
Python tracker
<https://bugs.python.org/issu
Sebastian Rittau added the comment:
https://github.com/python/cpython/pull/16753
--
___
Python tracker
<https://bugs.python.org/issue38467>
___
___
Python-bug
New submission from Sebastian Rittau :
The documentation for HTMLParser.handle_starttag
(https://docs.python.org/3/library/html.parser.html#html.parser.HTMLParser.handle_starttag)
should mention that the value of an attribute can be `None` for argument-less
attributes. I can submit a PR if
Sebastian Rittau added the comment:
Also it seems there are various new arguments and methods in asyncio that are
not in the release notes. (Via https://github.com/python/typeshed/issues/2313).
--
___
Python tracker
<https://bugs.python.
New submission from Sebastian Linke :
pathlib.Path() could wrap shutil.copy() with something like this:
def copy(self, target):
if not self.is_file():
# No support for directories here
raise ValueError("Path must point to a regular file")
# copy() appends fil
Sebastian Linke added the comment:
Docstring could be:
Copy file content and permission bits of this path to the target path
and return a new Path instance pointing to the target path.
If target is a directory, the base filename of this path is added to
the target and a new file corresponding
New submission from Sebastian Berg :
`pybytes_concate` currently uses the following code to get the data:
va.len = -1;
vb.len = -1;
if (PyObject_GetBuffer(a, &va, PyBUF_SIMPLE) != 0 ||
PyObject_GetBuffer(b, &vb, PyBUF_SIMPLE) != 0) {
PyErr_Format(PyExc_T
New submission from Sebastian Speitel :
from dataclasses import dataclass, replace
@dataclass()
class A:
a: int
class B(A):
def __init__(self):
super().__init__(a=1)
obj1 = B()
obj2 = replace(obj1, a=2)
File "/usr/lib/python3.9/dataclasses.py", line 1284,
Sebastian Speitel added the comment:
One solution I thought of was to return not an object of the same instance, but
one of the same dataclass, which would allow the implementation to traverse the
class hierachy of the object and create an instance of the first
dataclass-class (or class
Sebastian Speitel added the comment:
Or maybe a cls argument which defaults to obj.__class__?
--
___
Python tracker
<https://bugs.python.org/issue43965>
___
___
Change by Sebastian Rittau :
--
nosy: +srittau
___
Python tracker
<https://bugs.python.org/issue38291>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sebastian Rittau :
--
keywords: +patch
pull_requests: +24757
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26113
___
Python tracker
<https://bugs.python.org/issu
Change by Sebastian Rittau :
--
pull_requests: +24758
pull_request: https://github.com/python/cpython/pull/26113
___
Python tracker
<https://bugs.python.org/issue35
Sebastian Rittau added the comment:
I opened a PR to remove their mention from the docs for now. I can look into
how to add a deprecation warning to a module if no one else beats me to it.
--
___
Python tracker
<https://bugs.python.org/issue38
New submission from Sebastian Rittau :
The documentation of socket.SocketType
(https://docs.python.org/3/library/socket.html?highlight=sockettype#socket.SocketType)
is misleading. It states:
This is a Python type object that represents the socket object type. It is
the same as type
Change by Sebastian Rittau :
--
resolution: -> not a bug
___
Python tracker
<https://bugs.python.org/issue38460>
___
___
Python-bugs-list mailing list
Un
Sebastian Rittau added the comment:
Closing per the comments by Andrew and Raymond and the fact that 3.8 has been
released for quite some while now.
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.p
Change by Sebastian Rittau :
--
pull_requests: +25307
pull_request: https://github.com/python/cpython/pull/26719
___
Python tracker
<https://bugs.python.org/issue38
Sebastian Rittau added the comment:
And I opened a second PR (for Python 3.11 only) to issue a deprecation warning
when typing.io or typing.re gets imported.
--
___
Python tracker
<https://bugs.python.org/issue38
Sebastian Rittau added the comment:
Thank you for fixing this, Ken, the PR looks good to me.
Overall it looks as if the the Azure pipeline should be fixed, though. It's not
ideal that the tests pass while running the PR, but not in other situations.
Also, the warnings suppression i
Sebastian Rittau added the comment:
Ken: We still need to remove these modules in Python 3.12+. Should we open a
separate issue, reopen this one, or just handle it after the Python 3.11 branch
has been created?
--
___
Python tracker
<ht
Sebastian Rittau added the comment:
We could easily do what Ken did in PR-26811, and add
"warnings.filterwarnings("default", category=DeprecationWarning)" to the test,
but I would like to understand what is going on first. It seems the warnin
Change by Sebastian Rittau :
--
pull_requests: +25599
pull_request: https://github.com/python/cpython/pull/27039
___
Python tracker
<https://bugs.python.org/issue38
Sebastian Rittau added the comment:
pr-27039 suppresses warnings when accessing `typing.{re,io}.__module__`, which
should fix this warning.
--
___
Python tracker
<https://bugs.python.org/issue38
Sebastian Rittau added the comment:
typing.io is not referenced in either the tests or the implementation for
pydoc. What happens is basically: typing.io is a class, so its derived from
object. When formatting the docstring for object, the formatter queries the
__module__ attribute of all
Sebastian Bank added the comment:
Thanks Tal.
AFAICT there was an undocumented change in behaviour related to this fix.
Python 3.9 quotes values with escapechar:
```
import csv
import io
kwargs = {'escapechar': '\\'}
value = 'spam\\eggs'
print(val
Change by Sebastian Rittau :
--
pull_requests: +25857
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/27312
___
Python tracker
<https://bugs.python.org/issu
New submission from Sebastian Rittau :
It seems that at some point StrEnum and a few other members were added to
Python 3.10. I think they were present in 3.10 beta 2, but it seems they were
removed by beta 4. While the Changelog at
https://docs.python.org/3.10/whatsnew/changelog.html
Sebastian Berg added the comment:
The fix broke NumPy (see also https://github.com/numpy/numpy/pull/19612)
It seems incorrect. After all, it doesn't matter much whether the float can be
converted to an integer correctly (or even if it returns an undefined value),
so long `int_
Sebastian Berg added the comment:
Hmm, sorry, I overshot/misread :(.
The thing that the NumPy test-suite trips over is that:
c_powi(inf+0j, 3)
seems to not raise, but:
_Py_c_pow(inf+0j, 3.+0j)
(or nan+0.j rather then inf+0j)
does seem to raise (returning `nan+nanj` in both cases
Sebastian Berg added the comment:
(Sorry for the spam. I think we can/should just hard-code the expected values
in the NumPy test-suite. So this is not actually an issue for NumPy and
probably just warrants a double-check that the behaviour change is desirable
Sebastian Berg added the comment:
Thanks for looking into it!
`cpow` is indeed complicated. We had some discussion in NumPy about `0**y`
branch cuts (I did yet not finish it, because thinking about the branch cuts is
tricky).
It is almost reassuring that the C standard also hedges out
New submission from Sebastian Bank :
AFAICT there was an undocumented change in behaviour related to the fix of
https://bugs.python.org/issue12178 (also reported in
https://bugs.python.org/issue12178#msg397440):
Python 3.9 quotes values with escapechar:
```
import csv
import io
kwargs
Sebastian Bank added the comment:
IIUC there is no way to work around this from client/downstream code (to get
the olf 3.6 to 3.9 behaviour), so this might break assertions on the output of
`csv.writer` for users of `escapechar` whenever the data to be written contains
the escapcechar (e.g
Sebastian Bank added the comment:
The 3.9 behaviour is write: "spam\eggs"
The 3.10 behaviour is write: spam\\eggs
I think at least the change in csv.QUOTE_MINIMAL behviour should be documented
(maybe adding hint to avoid the `escapechar` option for consist
1 - 100 of 313 matches
Mail list logo