New submission from Sebastian Rittau :
The new PEP 604 syntax for type unions should be mentioned more prominently in
the typing docs, starting with Python 3.10. I'm preparing a PR for discussion.
--
assignee: docs@python
components: Documentation
messages: 399919
nosy: docs@p
Change by Sebastian Rittau :
--
keywords: +patch
pull_requests: +26297
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27833
___
Python tracker
<https://bugs.python.org/issu
Sebastian Berg added the comment:
I am still fighting with this (and the issues surrounding it) for NumPy. The
main point is that my new DTypes in NumPy are metaclasses that extend the
(heap)type struct.
That just feels right and matches the structure perfectly, but seems to get
awkward
Sebastian Rittau added the comment:
One thing I would strongly suggest for consistent terminology: Make "iterator"
mean an object that has both "__next()__" and "__iter()__". This is consistent
with how an iterator has been described in the glossary for a long t
Sebastian Berg added the comment:
I can make a PR from the patch (and add the `Py_tp_metaclass` slot if desired)
with a basic test here, if that is what is blocking things.
Fixing the type and size of the allocation (as the patch does) would allow me
to give people a way to create a new
Change by Sebastian Koslowski :
--
nosy: +skoslowski
___
Python tracker
<https://bugs.python.org/issue40059>
___
___
Python-bugs-list mailing list
Unsubscribe:
Sebastian Berg added the comment:
Just to note, that there are two – somewhat distinct – issues here in my
opinion:
1. `FromSpec` does not scan `bases` for the correct metaclass, which it could;
this could even be considered a bug?
2. You cannot pass in a desired metaclass, which may require
New submission from Sebastian Berg :
As noted in the issue: https://bugs.python.org/issue15870#msg402800
`PyType_FromSpec` assumes that the `name` passed is persistent for the program
lifetime. This seems wrong/unnecessary: We are creating a heap-type, a
heap-type's name is stored
Sebastian Berg added the comment:
> But if tp_name is created dynamically, it could lead to a dangling pointer.
I will guess this is probably just an oversight/bug since the main aim was to
move towards heap-types, and opened an issue: https://bugs.python.org/issue45
Sebastian Berg added the comment:
Yeah, I will try and have a look. I had posted the patch, because the test
looked like a bit of a larger chunk of work ;).
> And I'm surprised that you're surprised :)
:). I am coming from a completely different angle, probably. Just if you
New submission from Sebastian Berg :
The PyType_FromSpec fails to take care about MetaClasses.
https://bugs.python.org/issue15870
Asks to create a new API to pass in the MetaClass. This issue is only about
"inheriting" the metaclass of the bases correctly. Currently, Pytho
Sebastian Rittau added the comment:
All my projects now use werkzeug instead of the cgi module, so I can't confirm
whether this problem still exists. I'm fine with closing this as unreproducible
if no one else can reproduce it.
--
status: pendi
Sebastian Rittau added the comment:
I would ask you to reconsider this.
https://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path/67692#67692
is a highly active question on StackOverflow, and my answer basically provided
me all the karma I got there. For users
Sebastian Rittau added the comment:
Ref https://github.com/python/typeshed/pull/6317 for a discussion about this in
typeshed.
--
nosy: +srittau
___
Python tracker
<https://bugs.python.org/issue41
New submission from Sebastian Bevc :
Hello,
This is my first bug report. While doing some homework i came to realize that
the __init__ of a class was taking out of context variables.
class Foo(object):
def __init__(self, attr1):
self.out_of_context = out_of_context
# Raises NameError
New submission from Sebastian Rittau :
As a convenience it would be useful if async.open_connection() and
open_unix_connection() would return a context manager that closes the writer on
exit:
with await open_unix_connection(...) as (reader, writer):
...
This could be achieved by
New submission from Sebastian Szwarc :
Python 2.7 on Ubuntu 18.04 LTS is not in latest version.
Both version 2.7.14 and 15 RC1 bringing segmentation fault error.
Code is the same and previously there was no error.
COde is EPFImporter.py tool written by Apple to handle importing of their
Sebastian Szwarc added the comment:
PYTHONFAULTHANDLER=1 python EPFImporter_debug.py incremental/*
2019-11-21 23:34:09,787 [INFO]: Beginning import for the following directories:
incremental/itunes20191120
incremental/pricing20191120
2019-11-21 23:34:09,787 [INFO]: Importing files in
Sebastian Szwarc added the comment:
Previous python version didnt do segmentation fault.
Code is the same as before and it worked fine previously ergo code is
correct and this is python interpreter issue
On Thu, Nov 21, 2019 at 11:45 PM STINNER Victor wrote:
>
>
> STINNER Victor
Sebastian Szwarc added the comment:
I strongly disagree. Python 2.7 is 2.7 -> if some new errors appeared
after upgrading between minor version this is not expected behaviour,
and therefore it means there is error in interpreter itself.
upgrading from 2.7 to 2.7 is not the same as upgrad
Sebastian Szwarc added the comment:
If someone really want to test
The test procedure should be as follows:
Get the EPFImporter tool
https://affiliate.itunes.apple.com/resources/documentation/epfimporter/
Set up your database and put relevant login information in EPFConfig
Get the simple
New submission from Sebastian Szwarc :
As follow up to my recent bug error regarding segmentation fault.
Installed 2.7.17 on Mojave.
Because MySQLdb for reason unknown (SSL required error) is impossible to
install by PIP I used PyMysql and modified line as `import pymysql as MySQLdb`
There is
New submission from Sebastian Berg :
The keyword argument extraction/finding function seems to have a performance
bug/enhancement (unless I am missing something here). It reads:
```
for (i=0; i < nkwargs; i++) {
PyObject *kwname = PyTuple_GET_ITEM(kwnames, i);
/*
Change by Sebastian Berg :
--
keywords: +patch
pull_requests: +17049
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17576
___
Python tracker
<https://bugs.python.org/issu
Sebastian Berg added the comment:
Fair enough, we had code that does it the other way, so it seemed "too obvious"
since the current check seems mainly useful with few kwargs. However, a single
kwarg is super common in python, while many seem super rare (in any argument
clini
New submission from Sebastian Krause :
The following lines trigger a segmentation fault:
class E(BaseException):
def __new__(cls, *args, **kwargs):
return cls
def a(): yield
a().throw(E)
Source with a bit more explanation:
https://gist.github.com/coolreader18
Sebastian Berg added the comment:
Thanks for the quick responses.
@Victor Stinner, I suppose you could change `numbers.Complex.__bool__()` by
adding the no-op bool to make it: `bool(self != 0)`.
But I am not sure I feel it is necessary. NumPy is a bit a strange in that it
uses its own
New submission from Sebastian Berg :
This is mainly an information request, so sorry if its a bit besides the point
(I do not mind if you just close it). But it seemed a bit too specific to get
answers in most places...
In Python you use argument clinic, which supports `METH_FASTCALL`, that
Change by Sebastian Berg :
--
keywords: +patch
pull_requests: +17412
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18017
___
Python tracker
<https://bugs.python.org/issu
New submission from Sebastian Noack :
SQLCipher is industry-standard technology for managing an encrypting SQLite
databases. It has been implemented as a fork of SQLite3. So the sqlite3 corelib
module would build as-is against it. But rather than a fork (of this module),
I'd rathe
Sebastian Noack added the comment:
Well, the stdlib already depends on a third-party library here, i.e. SQLite3.
SQLCipher is a drop-in replacement for SQLite3 that adds support for encrypted
databases. In order to use SQLCipher, I'd have to build the sqlite3 module
against SQLC
Sebastian Noack added the comment:
Yes, I could use LD_LIBRARY_PATH (after copying /usr/lib/libsqlcipher.so.0 to
/some/folder/libsqlite3.so), or alternatively LD_PRELOAD, and the sqlite3
stdlib module will just work as-is with SQLCipher. The latter is in fact what
I'm doing at the m
New submission from Sebastian Berg :
The current documentation of ``PyBuffer_Release()`` and the PEP is a bit fuzzy
about what the function can and cannot do.
When an object exposes the buffer interface, I believe it should always return
a `view` (in NumPy speak) of its own data, i.e. the
Sebastian Berg added the comment:
Hmmm, it seems I had missed this chunk of PEP 3118 before:
> Exporters will need to define a bf_releasebuffer function if they can
> re-allocate their memory, strides, shape, suboffsets, or format variables
> which they might share through t
Sebastian Berg added the comment:
I went through Python, `array` seems to not break the logic. pickling has a
comment which specifically wants to run into the argument parsing corner case
above (I am not sure that it is really important). However,
`Modules/_testbuffer.c` (which is just test
New submission from Sebastian Rittau :
uuid.getnode() has an undocumented, keyword-only "getters" argument that gets
discarded immediately. This is confusing when using code inspection tools and
can give the wrong impression that you can somehow override the node getters
when yo
Sebastian Rittau added the comment:
Shantanu points out in https://github.com/python/typeshed/pull/3715 that the
argument was made useless due to bpo-28009.
--
___
Python tracker
<https://bugs.python.org/issue39
Sebastian Rittau added the comment:
Code using this argument is in all likelihood already subtly broken, because it
depends on non-existing functionality. I believe that a "hard" break would be
better (for Python 3.9).
--
___
Pyth
Sebastian Berg added the comment:
Ok, I will just close it. It is painfully clear that e.g. `mmap` uses it this
way to prohibit closing, and also `memoryview` has all the machinery necessary
to do counting of how many exports, etc. exists.
I admit, this still rubs me the wrong way, and I
Sebastian Voigt added the comment:
The fix has only be done for 3.8, 3.9 and 3.10. Are 3.7 and 3.6 are not
impacted?
--
nosy: +squear
___
Python tracker
<https://bugs.python.org/issue41
Sebastian Koslowski added the comment:
>>> import parent.child
first imports "parent" (successfully) but then fails, because the import code
has no knowledge of were to find ".child". This is because
a) the module "parent" is not marked as a package (
New submission from Sebastian Berg :
In https://bugs.python.org/issue40826 it was defined that
`PyOS_InterruptOccurred()` can only be called with a GIL. NumPy had a few
places with very unsafe sigint handling (not thread-safe). But generally when
we are in a situation that catching sigints
Sebastian Berg added the comment:
In NumPy ufuncs and datatype casting (iteration) we have the following setup:
user-code (releasing GIL) -> NumPy API -> 3rd-party C-function
(in the ufunc code, numpy is the one releasing the GIL, although others, such
as numba probably hook
Sebastian Rittau added the comment:
For reference, this came up in
https://github.com/python/typeshed/issues/4639#issuecomment-706596656.
`typing.io` has never been in typeshed and we decided not to include it. It
looks as if it never gained any traction, especially since the types are
New submission from Sebastian Rittau :
In typeshed (the repository for stdlib type annotations), we have defined a
bunch of types to support annotating WSGI interfaces. See
https://github.com/python/typeshed/blob/master/stdlib/2and3/_typeshed/wsgi.pyi
for the current version. Unfortunately
Sebastian Wiedenroth added the comment:
Please don't.
Even if Oracle doesn't care anymore, the open source illumos community does.
We (illumos) share the same uname "SunOS" and depend on this support.
I have offered to host an illumos buildbot in the past and that offer
Sebastian Wiedenroth added the comment:
> Which Python version do you use?
Myself currently mostly python 3.8 via pkgsrc on SmartOS (one of the illumos
distributions).
OmniOS ships 3.7:
https://github.com/omniosorg/omnios-build/tree/master/build/python37
OpenIndiana ships at least
Sebastian Wiedenroth added the comment:
This patch has also been applied to the python versions shipped by OpenIndiana
and OmniOS for a long time. I'd say it's safe to merge.
--
nosy: +wiedi
___
Python tracker
<https://bugs.python.o
New submission from Sebastian Wiedenroth :
I'm investigating some test failures related to sendfile on illumos:
testCount (test.test_socket.SendfileUsingSendfileTest) ... FAIL
testCountSmall (test.test_socket.SendfileUsingSendfileTest) ... ok
testCountWithO
Change by Sebastian Wiedenroth :
--
keywords: +patch
pull_requests: +22002
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23085
___
Python tracker
<https://bugs.python.org/issu
Sebastian Wiedenroth added the comment:
Excellent analysis, that's it! I've also tested your patch on SmartOS and it
works great.
--
___
Python tracker
<https://bugs.python.o
Change by Sebastian Berg :
--
nosy: +seberg
___
Python tracker
<https://bugs.python.org/issue40522>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Sebastian Bank :
--
nosy: +xflr6
___
Python tracker
<https://bugs.python.org/issue37549>
___
___
Python-bugs-list mailing list
Unsubscribe:
Sebastian Koslowski added the comment:
I ran into this issue on a Win10 German box running the tests for version 3.7.4
Your changes fixes the issue for me.
--
nosy: +skoslowski
versions: +Python 3.7 -Python 3.8
___
Python tracker
<ht
New submission from Sebastian Linke :
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> spam = 'spam'
>>
Sebastian Linke added the comment:
The same behavior applies to f'{spam[}' and f'{spam(}'. Also to f'{spam{}', but
that might be expected.
This message is more clear:
>>> f'{spam('
File "", line 1
SyntaxError: f-string: mismatc
New submission from Sebastian Rittau :
Document @typing.type_check_only per
https://github.com/python/typing/issues/597.
--
assignee: docs@python
components: Documentation
messages: 332508
nosy: docs@python, srittau
priority: normal
severity: normal
status: open
title: Document
Change by Sebastian Rittau :
--
keywords: +patch
pull_requests: +10559
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35581>
___
_
Change by Sebastian Rittau :
--
keywords: +patch, patch, patch
pull_requests: +10559, 10560, 10561
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Sebastian Rittau :
--
keywords: +patch, patch
pull_requests: +10559, 10560
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
New submission from Sebastian Ernst:
I am investigating a bug in Wine:
https://bugs.winehq.org/show_bug.cgi?id=42474
The Python 3.6(.1) interpreter fails to start on Wine because of an
unimplemented function in Wine:
"api-ms-win-core-path-l1-1-0.dll.PathCchCombineEx".
While t
Sebastian Ernst added the comment:
Relaying this on behalf of Gijs Vermeulen from Wine: "In my patch I tried
returning E_NOTIMPL and I got the error: Fatal Python error: buffer overflow in
getpathp.c's join()"
--
___
Python
New submission from Sebastian Noack:
If I run following code (on Python 3.5.3, Linux) the interpreter crashes with a
segfault:
def pbkdf2_bin(data, salt, iterations=1000, keylen=24, hashfunc=None):
hashfunc = hashfunc or hashlib.sha1
mac = hmac.new(data, None, hashfunc)
def
Sebastian Noack added the comment:
I just noticed that the segfault can also be reproduced with Python 2 [1]. So
please ignore what I said before that this wouldn't be the case.
While it is debatable whether using a lazy evaluated object with so many
recursions is a good idea in the
Sebastian Noack added the comment:
Thanks for your response, both of you. All you said, make sense.
Just for the record, I wouldn't necessarily expect 200k nested iterators to
work. Even if it could be made work, I guess it would use way too much memory.
But a RuntimeError would be
Sebastian Koslowski added the comment:
I ran into the same problem.
Seems like adding an empty sys.path entry through the _pth file is not
supported at the moment:
https://github.com/python/cpython/blob/53b9e1a1c1d86187ad6fbee492b697ef8be74205/PC/getpathp.c#L589
For now, I have enabled
New submission from Sebastian Bassi :
There are multiple occurences in the web page of "Mac OS X", like "Download the
latest version for Mac OS X". This OS is called macOS since some years. It may
be confusing for a new user.
--
assignee: docs@python
compo
Sebastian Koslowski added the comment:
I would like to work on this.
--
nosy: +skoslowski
___
Python tracker
<https://bugs.python.org/issue36275>
___
___
Pytho
Change by Sebastian Koslowski :
--
keywords: +patch
pull_requests: +13028
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Sebastian Koslowski added the comment:
So, I dug into this here at the PyCon19 sprints and as far as I can see there
is no actual leak.
What you are seeing in your code example is from the state, that is kept
between successive run of your import. All the cases you reported as not
leaking
Sebastian Bank added the comment:
I am not sure about the design vs. code bug distinction, but what makes me
think this should be fixed is primarily the broken round-trip (already
mentioned above):
>>> import io, csv
>>> def roundtrip(value, **fmtparams):
with
Sebastian Bank added the comment:
https://bugs.python.org/issue15927#msg309811 gives sme code examples
illustrating why I think this should be backported (and also the documentation
should be changed for both Python 2 and 3).
--
nosy: +xflr6
Sebastian Bank added the comment:
Hi, is there something we can do to get this going? As the issue breaks
round-trip, it currently requires work-arounds like this:
https://github.com/cldf/csvw/blob/1324550266c821ef32d1e79c124191e93aefbfa8/csvw/dsv.py#L67-L71
--
nosy: +xflr6
Sebastian Bank added the comment:
To be complete, the docs of Dialect.escapechar should probably also say that it
is used to escape itself.
However, note that csw.writer currently only does this with csv.QUOTE_NONE
(breaking round-trip otherwise: #12178
New submission from Sebastian Rittau :
Currently typing.Generator requires three arguments: Generator[YieldType,
SendType, ReturnType].
At least for me, passing values to a generator is a very rare case. I suggest
to allow only one argument to be passed to Generator: Generator[YieldType
New submission from Sebastian Kacprzak :
In Python 3.5 and earlier (tested 3.5.3 and 2.7.13)
b'\\\xfa'.decode('unicode-escape', errors='ignore')
did return '\\ú'
but in Python 3.6 it raises
OverflowError: decoding with 'unicode-escape' codec
Sebastian Rittau added the comment:
I take the liberty of closing this "wont fix". Changing the behaviour would
most likely do more harm than good. If one of the maintainers disagrees, please
reopen. :)
--
resolution: -> wont fix
stage: -> resolved
status
New submission from Sebastian Rittau :
HTMLParser derives from _markupbase.ParserBase, which has the following method:
class HTMLParser:
...
def error(self, message):
raise NotImplementedError(
"subclasses of ParserBase must override error()")
HTMLParse
Sebastian Rittau added the comment:
The quoted code above should have used ParserBase:
class ParserBase:
...
def error(self, message):
raise NotImplementedError(
"subclasses of ParserBase must override
Sebastian Rittau added the comment:
Sorry for not responding, but I didn't know what I could have added that I
didn't already say in the opening post. Of course, you can use workaround like
using the three-argument version or creating aliases. Using Iterator is of
course not a rea
New submission from Sebastian Rittau :
Consider the following code:
import cgi
from io import BytesIO
cgi.FieldStorage(BytesIO(b"{}"), environ={
"REQUEST_METHOD": "POST",
"CONTENT_TYPE": "application/json",
&
Change by Sebastian Rittau :
--
components: +Library (Lib)
title: cgi: TypeError -> cgi: TypeError when no argument string is found
___
Python tracker
<https://bugs.python.org/issu
Change by Sebastian Rittau :
--
nosy: +srittau
___
Python tracker
<https://bugs.python.org/issue2>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Sebastian Rittau :
See https://github.com/python/typing/issues/518 for context.
The typing documentation for 3.6.4rc1 states:
> typing.io ... defines the generic type IO[AnyStr] and aliases TextIO and
> BinaryIO for respectively IO[str] and IO[bytes].
In the c
Change by Sebastian Rittau :
--
keywords: +patch
pull_requests: +4723
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32284>
___
___
Py
New submission from Sebastian Rittau :
This exists at least in Python 3.6.5's typing module.
https://github.com/python/typing/issues/165 has background on why it was added.
--
assignee: docs@python
components: Documentation
messages: 317395
nosy: docs@python, srittau
priority: n
Sebastian Bank added the comment:
AFAIU, this change broke the following usage of subprocess on Windows
(re-using a subprocess.STARTUPINFO instance to hide the command window):
import os, subprocess
STARTUPINFO = subprocess.STARTUPINFO()
STARTUPINFO.dwFlags
New submission from Sebastian Bank :
AFAIU, the change for https://bugs.python.org/issue19764 broke the following
usage of subprocess on Windows (re-using a subprocess.STARTUPINFO instance to
hide the command window):
import os, subprocess
STARTUPINFO = subprocess.STARTUPINFO
Sebastian Bank added the comment:
Thanks Eryk. Done: https://bugs.python.org/issue34044
--
___
Python tracker
<https://bugs.python.org/issue19764>
___
___
Pytho
Sebastian Bank added the comment:
Perfect, thanks for the quick fix.
--
___
Python tracker
<https://bugs.python.org/issue34044>
___
___
Python-bugs-list mailin
Sebastian Rittau added the comment:
Good call. Maybe it's actually time to retire _markupbase and merge ParserBase
into HTMLParser.
--
___
Python tracker
<https://bugs.python.org/is
New submission from Sebastian Rittau :
The documentation at
https://docs.python.org/3/library/urllib.request.html#urllib.request.HTTPErrorProcessor
does not list the two arguments "request" and "response" that
HTTPErrorProcessor.http_response() and https_response()
Change by Sebastian Rittau :
--
keywords: +patch
pull_requests: +8267
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34418>
___
_
New submission from Sebastian Rittau :
smtplib's authobject() callback is supposed to return bytes, according to both
the documentation at https://docs.python.org/3/library/smtplib.html as well as
the docstring of SMTP.auth(). This does neither match the implementation of
auth(),
Change by Sebastian Rittau :
--
keywords: +patch
pull_requests: +8438
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34525>
___
_
Change by Sebastian Rittau :
--
nosy: +srittau
___
Python tracker
<https://bugs.python.org/issue34648>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Sebastian Bassi :
Following the trend initiated at https://bugs.python.org/issue34605, I want to
point out that the term dictator has a negative connotation in Argentina and
other countries where we suffered bloody dictatorship (3 dead and missing
persons, or
Change by Sebastian Rittau :
--
nosy: +srittau
___
Python tracker
<https://bugs.python.org/issue35001>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Sebastian Rittau :
Per the discussion in https://github.com/python/typing/issues/589 and
https://github.com/python/typeshed/issues/1652, IO, BinaryIO, TextIO, Pattern,
and Match should be imported directly from typing, not from typing.io and
typing.re. The documentation
Change by Sebastian Rittau :
--
keywords: +patch
pull_requests: +9496
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35089>
___
_
101 - 200 of 313 matches
Mail list logo