New submission from Jonas Witschel :
Consider the following minimal example:
import ssl
context = ssl.create_default_context()
context.set_npn_protocols(['http/1.1', 'spdy/2'])
In Python 3.10, it fails with the following error:
AttributeError: 'SSLContext
Change by Jonas Witschel :
--
nosy: +diabonas
___
Python tracker
<https://bugs.python.org/issue46006>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jonas Witschel added the comment:
I notice this has already been reported as bpo-46006 and bpo-46034, so closing
in favour of these.
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracke
Jonas Witschel added the comment:
Downstream bug report in Arch Linux: https://bugs.archlinux.org/task/72979
--
___
Python tracker
<https://bugs.python.org/issue46
New submission from Jonas Witschel :
Consider the following minimal example C code which is trying to import
jsonschema (https://python-jsonschema.readthedocs.io/en/stable/), compiled
using "gcc test_newinterpreter.c -I /usr/include/python3.10 -lpython3.10 -o
test_newinterpreter"
Jonas H. added the comment:
pat.match() has 110 nsec.
Feel free to close the issue and PR if you think this isn't worth changing.
--
___
Python tracker
<https://bugs.python.org/is
Jonas H. added the comment:
I agree with your statement in principle. Here are numbers for the slowdown
that's introduced:
Without the change:
./python.exe -m timeit -s 'import re'\n'[re.compile(f"fill_cache{i}") for i
in range(512)]'\n'pat
Change by Jonas H. :
--
keywords: +patch
pull_requests: +27224
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28936
___
Python tracker
<https://bugs.python.org/issu
New submission from Jonas H. :
re.match(p, ...) with a pre-compiled pattern p = re.compile(...) can be much
slower than calling p.match(...). Probably mostly in cases with "easy" patterns
and/or short strings.
The culprit is that re.match -> re._compile can spend a lot of time
Jonas Norling added the comment:
@bar.harel: I didn't find a PR, so I'd like to encourage you to submit one :-)
I stumbled onto this bug when the scheduler would cancel the wrong event for me
(Python 3.7, 3.8). Raymond's suggestion 1 sounds reasonable; it would be very
un
Jonas Norling added the comment:
sys.thread_info = sys.thread_info(name='pthread', lock='semaphore',
version='NPTL 2.31') on my system. Looking at the source I think the semaphore
implementation will be used on all modern Linux systems.
In my tests it works as
New submission from Jonas Norling :
The timeout for threading.Lock, threading.Condition, etc, is not using a
monotonic clock — it is affected if the system time (realtime clock) is set.
The attached program can be used to show the problem. It is expected to print
"Took 2.000 s"
Jonas Schäfer added the comment:
@kam193 Thanks for running the aioxmpp tests. I built the patched python
yesterday, but I didn’t manage to get a virtualenv with it up&running.
Good to hear that the fix works as expected!
--
___
Python tra
Change by Jonas Schäfer :
--
nosy: +jssfr
___
Python tracker
<https://bugs.python.org/issue41295>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jonas Drotleff added the comment:
I'm still thinking about this bug/issue/undefined behaviour. Today I wanted to
test its behaviour with async:
import inspect
class Foo:
def __init__(self, bar):
self._bar = bar
@property
async def spam(self):
print('C
New submission from Jonas Malaco :
Trying to instantiate an enum with an invalid value results in "During handling
of the above exception, another exception occurred:".
$ cat > test.py << EOF
from enum import Enum
class Color(Enum):
RED = 1
GREEN = 2
BLU
Jonas Drotleff added the comment:
> Here is a link to the discussion of this on ideas
Thank you for posting the link.
I feel like I came to a dead end with this issue. As I am fairly new to CPython
and have never contributed to this project before, I have no idea how to
address this and
sam jonas added the comment:
Hi i am also facing the same issue, please provide a good solution
--
nosy: +samjonas
___
Python tracker
<https://bugs.python.org/issue38
New submission from Jonas Aschenbrenner :
>>> import locale
>>> locale.setlocale(locale.LC_ALL, ('de_DE', 'UTF-8'))
'de_DE.UTF-8'
>>> locale.currency(1345345345352.22, international=True)
'1345345345352,22 EUR '
Expected:
Change by Jonas Aschenbrenner :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue38536>
___
___
Python-bugs-list mailing list
Unsubscrib
Jonas Drotleff added the comment:
Oh, yes I see what you mean. That's my fault, it seems like I copied the wrong
line. Sorry.
But the important piece is the 'var' attribute. Sorry for the confusion.
--
___
Python tracker
<https
Jonas Drotleff added the comment:
> The results of this example are different from mine(version 3.7.4)
I do not really see any difference. What do you mean?
--
nosy: -Sanjay
___
Python tracker
<https://bugs.python.org/issu
Jonas Schäfer added the comment:
Since I have been adversely affected by this bug ([1]), I looked at the patches.
I combined issue14364.test.patch (which adds test cases for --foo=--) and
dbldash.patch in my local working tree and that seems to resolve the issue
(tests pass if and only if I
Change by Jonas Drotleff :
--
keywords: +patch
pull_requests: +16113
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16521
___
Python tracker
<https://bugs.python.org/issu
New submission from Jonas Drotleff :
When calling inspect.getmembers on a class that has a property (@property), the
property will be called by the getattr call in getmembers.
Example:
import inspect
class Example:
def __init__(self, var):
self._var = var
print('__i
New submission from Jonas Binding :
The "Windows Store" installer for Python has a seemingly low entry barrier,
causing people to install without reading something like
https://docs.python.org/3.7/using/windows.html.
However, due to the really long path it uses for Python (e.g.
sam jonas added the comment:
Thanks for the solution...
--
nosy: +samjonas
___
Python tracker
<https://bugs.python.org/issue36790>
___
___
Python-bugs-list m
Jonas H. added the comment:
The assertion in the patched code, yes. The segfault in the unpatched code, no.
--
___
Python tracker
<https://bugs.python.org/issue34
Jonas H. added the comment:
I don't think this can be tested with Python code, unless you can make sure the
target buffer _PyUnicode_TransformDecimalAndSpaceToASCII operates on is
initialised with garbage bytes.
--
___
Python tracker
&
Jonas H. added the comment:
Here's a Docker image that reproduces the bug.
FROM ubuntu:18.04
RUN apt update && apt install -y python3.7-dbg python3.7-venv python3-venv wget
RUN python3.7 -m venv venv
RUN venv/bin/pip install django
RUN wget https://bugs.python.org/file47688/testp
Jonas H. added the comment:
Sure.
Unpack archive, create new 3.7 venv with Django (latest version is fine),
./manage.py runserver, curl localhost:8000.
--
___
Python tracker
<https://bugs.python.org/issue34
Jonas H. added the comment:
Reduced it to something that seems unicode related?
No extension modules involved. Vanilla Django project with a single url +
template.
See testproj/urls.py and tmpl/index.html
--
Added file: https://bugs.python.org/file47688/testproj.tar.gz
Jonas H. added the comment:
I can reproduce this on Ubuntu 18.04.
INADA, I have a full gdb backtrace with Python 3.7 development build. I'd like
to share it with you privately as I'm concerned it may contain sensible
information. I know that's a bit unconventional; if
Jonas H. added the comment:
Btw my segfault is from Django too, but that may just be a coincidence
--
___
Python tracker
<https://bugs.python.org/issue34
Jonas H. added the comment:
I also have a segfault that goes away with malloc debugging. Not sure if it's
the same issue.
My extension modules are
venv/lib/python3.7/site-packages//_yaml.cpython-37m-darwin.so
venv/lib/python3.7/site-packages//netifaces.cpython-37m-darwin.so
ven
Jonas Obrist added the comment:
I realized I have to call __await__ of the inner coroutine object in
NonTrueAwaitable.__await__. This is not a bug, but my mistake.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_
Jonas Obrist added the comment:
On 9c463ec88ba21764f6fff8e01d6045a932a89438 (master/3.7) both cases fail to
execute. I would argue that this code should be allowed...
--
___
Python tracker
<https://bugs.python.org/issue33
Jonas Obrist added the comment:
I've just realized the difference between the environments wasn't the operating
system, but PYTHONASYNCIODEBUG. If it is set, the code works, however if it is
unset the code does not work. See the updated (attached) code for reference.
--
New submission from Jonas Obrist :
The attached code runs fine on MacOS using 3.6.5 from homebrew. However on
Windows (I tested on 3.6.4 with the 32bit installer from the website) and Linux
(using the python:3.6.5 docker image) it errors with "TypeError: cannot 'yield
from' a c
Jonas H. added the comment:
See also
https://stackoverflow.com/questions/19309514/getting-original-line-number-for-exception-in-concurrent-futures
for other people having the same problem
--
___
Python tracker
<https://bugs.python.org/issue32
New submission from Jonas H. :
Use case: Try to get a future's result using
concurrent.futures.Future.result(), and log the full exception if there was any.
Currently, only "excinst" (sys.exc_info()[1]) is provided with the
Future.exception() method.
Proposal: Add new
Jonas H. added the comment:
https://github.com/python/cpython/pull/4589
- Add 3.7 What's New entry
- Fix regression (thanks Tim for the report)
--
___
Python tracker
<https://bugs.python.org/is
Change by Jonas H. :
--
pull_requests: +4513
___
Python tracker
<https://bugs.python.org/issue32071>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jonas H. added the comment:
Ah, the problem isn't that it's running getattr() on test methods, but that it
runs getattr() on all methods.
Former code: attrname.startswith(prefix) and \
callable(getattr(testCaseClass, attrname))
New code: testFunc = getattr(tes
Jonas H. added the comment:
Sure!
--
___
Python tracker
<https://bugs.python.org/issue32071>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Jonas added the comment:
See screenshot from character:
without: ` and with underscore: `
(underscore is not shown as text in comment. See screen shot)
--
Added file: https://bugs.python.org/file47298/Screen Shot 2017-11-25 at
19.45.50.png
New submission from Jonas :
The Idle Editor or Idle Python Shell crashes if ` character is typed in.
Character looks like an ` with underscore.
How to repeat this problem:
1. In OSX open any .py file or the Idle Shell with Idle.
2. Switch to german keyboard layout
3. Type the letter by
Jonas H. added the comment:
Interesting, Victor. I've had a look at the code you mentioned, but I'm afraid
it doesn't really make sense to re-use any of the code.
Here's a new patch, implemented in the loader as suggested by Antoine, and with
tests.
I'm happy t
Jonas H. added the comment:
> > 3) Is the approach of dynamically wrapping 'skip()' around to-be-skipped
> > test cases OK?
> I think this is the wrong approach. A test that isn't selected shouldn't be
> skipped, it should not appear in the output at al
Jonas H. added the comment:
Thanks Antoine. I will need some guidance as to what are the correct places to
make these changes. I'm not quite sure about the abstractions here (runner,
loader, suite, case, etc.)
My PoC (see GitHub link in first post) uses a TestSuite subclass. (The sub
Jonas H. added the comment:
Just to be clear, the current implementation is limited to substring matches.
It doesn't support py.test like "and/or" combinators. (Actually, py.test uses
'eval' to support arbitrary patterns.)
So say we have test case
SomeClass
te
New submission from Jonas H. :
I'd like to add test selection based on parts of the test class/method name to
unittest. Similar to py.test's "-k" option:
https://docs.pytest.org/en/latest/example/markers.html#using-k-expr-to-select-tests-based-on-their-name
Here&
Jonas H. added the comment:
This affects me too.
--
nosy: +jonash
___
Python tracker
<https://bugs.python.org/issue31526>
___
___
Python-bugs-list mailin
Changes by Jonas Jelten :
--
nosy: +jj
___
Python tracker
<http://bugs.python.org/issue26532>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
New submission from Jonas Wegelius:
When you type 8/3, the interpreter return incorrect value:
2.6665
it should be
2.6667
--
components: Interpreter Core
messages: 277931
nosy: Jonas Wegelius
priority: normal
severity: normal
status: open
title: 8/3 is
Jonas H. added the comment:
I just hit this too. I'd say remove the fileno() method from wrapper objects
like GzipFile. I'm happy to submit a patch.
--
nosy: +jonash
___
Python tracker
<http://bugs.python.o
Jonas Brunsgaard added the comment:
Okay I thoroughly read the code again. Can you describe the architectural
changes to the code regarding a patch, I will do a proposal. But I have to know
we are on the same page, so I do not waste my and your time
Jonas Brunsgaard added the comment:
You are right that get_nowait() is the correct api for my use case, using
get_nowait() nothing is pushed to the internal _getters deque. The reason for
my us of get() is that job futures are created one place in the code and then
thrown in a processing
Jonas Brunsgaard added the comment:
In my particular case, I developed an application close to beanstalkd, but with
redis as "engine". I did create a callbackback reader class for users to
subclass, the callbackreader is checking every second, on every
tube(queue.Object). If ne
New submission from Jonas Brunsgaard:
When making repeated calls to queue.get, memory is building up and is not freed
until queue.push is called.
I wrote this little program to show my findings. The program will perform a lot
of calls to queue.get and once every 60 seconds a queue.push is
New submission from Jonas Thiem:
Demonstration:
>>> import shlex
>>> shlex.quote(b"abc")
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib64/python3.4/shlex.py", line 285, in quote
if _find_unsafe(s) is None:
TypeE
Changes by Jonas Obrist :
--
resolution: -> duplicate
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue24927>
___
___
Python-bugs-
Jonas Obrist added the comment:
I've added a patch that would simply warn the user if a worker exits
prematurely.
--
keywords: +patch
Added file: http://bugs.python.org/file40257/patch.diff
___
Python tracker
<http://bugs.python.org/is
Jonas Obrist added the comment:
So the reason this is happening is very simple:
When using Pool.apply, the task (function) is sent to the task queue, which is
consumed by the worker. At this point the task is "in progress". However, the
worker dies without being able to finish the
Changes by Jonas Obrist :
Added file: http://bugs.python.org/file40248/process_segfault.py
___
Python tracker
<http://bugs.python.org/issue24927>
___
___
Python-bug
Changes by Jonas Obrist :
Removed file: http://bugs.python.org/file40246/process_segfault.py
___
Python tracker
<http://bugs.python.org/issue24927>
___
___
Python-bug
Changes by Jonas Obrist :
Added file: http://bugs.python.org/file40247/pool_segfault.py
___
Python tracker
<http://bugs.python.org/issue24927>
___
___
Python-bugs-list m
Changes by Jonas Obrist :
Removed file: http://bugs.python.org/file40243/pool_segfault.py
___
Python tracker
<http://bugs.python.org/issue24927>
___
___
Python-bugs-list m
Changes by Jonas Obrist :
Removed file: http://bugs.python.org/file40244/segfault.c
___
Python tracker
<http://bugs.python.org/issue24927>
___
___
Python-bugs-list mailin
Changes by Jonas Obrist :
Removed file: http://bugs.python.org/file40245/setup.py
___
Python tracker
<http://bugs.python.org/issue24927>
___
___
Python-bugs-list mailin
Changes by Jonas Obrist :
Added file: http://bugs.python.org/file40245/setup.py
___
Python tracker
<http://bugs.python.org/issue24927>
___
___
Python-bugs-list mailin
Changes by Jonas Obrist :
Added file: http://bugs.python.org/file40246/process_segfault.py
___
Python tracker
<http://bugs.python.org/issue24927>
___
___
Python-bug
Changes by Jonas Obrist :
Added file: http://bugs.python.org/file40244/segfault.c
___
Python tracker
<http://bugs.python.org/issue24927>
___
___
Python-bugs-list mailin
New submission from Jonas Obrist:
When using multiprocessing.Pool, if the function run in the pool segfaults, the
program will simply hang forever. However when using multiprocessing.Process
directly, it runs fine, setting the exitcode to -11 as expected.
I would expect the Pool to behave
Jonas Wagner added the comment:
I don't understand where this error comes from...
The compilation commands are exactly the same in both the "before" and "after"
logs. The order of commands is also the same.
The only difference is this message:
*** WARNING: renami
Jonas Wagner added the comment:
I've checked the `dlopen` issue. This was due to a problem with
UndefinedBehaviorSanitizer, and was solved by upgrading to Clang 3.5. It has
little to do with this patch.
Using this patch and http://bugs.python.org/issue22359 , I now get reliable
par
Jonas Wagner added the comment:
No response for a while, and problem solved... closing.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
New submission from Jonas Wagner:
The attached patch fixes issues with Python's Makefile, which manifest when
doing parallel builds. The Makefile invoked "make" recursively for some
targets. This caused some files (which were depended upon by multiple targets)
to be built by bo
Jonas Wagner added the comment:
With this patch, and on Ubuntu 14.04, occasionally modules fail to build with
the following error:
*** WARNING: renaming "_testbuffer" since importing it failed: dlopen: cannot
load any more object with static TLS
I'm not 100% sure if this is re
Jonas Wagner added the comment:
Is there a reason this has not landed? The patch works perfectly for me, except
for one issue:
@@ -268,6 +275,9 @@
if self.undef:
self.undef = self.undef.split(',')
+if sel
Changes by Jonas Wagner :
--
nosy: +Sjlver
___
Python tracker
<http://bugs.python.org/issue5309>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jonas Jelten added the comment:
it should rather be a opt-in feature. and when the redirection triggered, one
should be able do click (you know it from wikipedia) back to page where one was
redireced from.
--
___
Python tracker
<h
New submission from Jonas Jelten:
The Python version selection for the documentation should be cached.
It's very annoying having to select the preferred version each time one follows
a link, e.g. search result, irc post, etc.
I'd like to see caching the preferred version in a
Jonas Jelten added the comment:
Indeed, that should do it, thanks.
I still pledge for Python 4? always using char* internally to make this
conversion obsolete ;) (except for windows)
--
___
Python tracker
<http://bugs.python.org/issue22
Jonas Jelten added the comment:
Martin, i think the most intuitive and easiest way for working with strings in
C are just char arrays.
Starting with the main() argv being char*, probably most programmers just go
with char* and all the encoding just works.
This is because contact with encoding
Jonas Jelten added the comment:
I'd say Python should definitely change its internal string type to char*.
Exposing "handy" wchar_t->char conversion functions don't resolve the data
represenation enhancement.
--
__
New submission from Jonas Jelten:
The documentation and the code example at
https://docs.python.org/3.5/extending/embedding.html#very-high-level-embedding
#include
int
main(int argc, char *argv[])
{
Py_SetProgramName(argv[0]); /* optional but recommended */
Py_Initialize
Jonas Diemer added the comment:
2014-07-03 16:42 GMT+02:00 Vinay Sajip :
> > I "forked" logging and am catching exceptions during the string
> formatting
>
> That might work with Jython and invalidated objects, but in the case of
> e.g. CPython (where the objects
Jonas Diemer added the comment:
Thanks for the explanation. Throughput is a valid reason.
Your workaround does of course work, but it means that the string formatting is
always done, even if the message is filtered out.
Is this delayed logging behavior documented in any way (maybe I have
Jonas Diemer added the comment:
I see your point.
The decision whether to log or not is actually made synchronously to the actual
logging call, as far as I can tell (i.e. "if self.isEnabledFor..." is checked
directly in debug()). So at this place, the formatting could already happe
Jonas Diemer added the comment:
Find attached a demo script that causes the erratic behavior in regular Python
(2.7.5 on Windows).
The log file contains two lines, both show the new name of the object, although
the first debug() was called befor the name change.
I think this problem could be
New submission from Jonas Diemer:
I was having trouble with the logging module under Jython: I was getting
seemingly sporadic wierd null pointer exceptions in the logging code.
The problem seemed to be related to references that were passed to the logger,
e.g.
logger.debug("My objec
Jonas Wagner added the comment:
I confirm that this also works with my self-compiled Clang 3.4. -export_dynamic
was the missing option.
Is a good place to document this?
Otherwise, I think this issue can be closed. Thanks a lot for the help
Jonas Wagner added the comment:
Thanks Ned, this is interesting!
I don't know about Mac OS, but on Ubuntu, LTO and PGO apparently make Python
around 10% faster (see #17781). However, that data point refers to GCC's LTO,
not LLVM's.
Personally I'm interested in LTO beca
Jonas Wagner added the comment:
I am indeed using Clang 3.4 (both the one that ships with Mac OS, and a version
compiled from the sources).
However, the errors I get are rather different than #20767. In particular,
Clang finishes successfully and does produce shared object files; they just
New submission from Jonas Wagner:
CPython fails to build with LLVM's link-time optimization (LTO) in Mac OS. Very
similar commands work on Linux.
I'm currently configuring CPython as follows:
on Linux:
RANLIB="ar -s --plugin=/path/to/llvm/lib/LLVMgold.so"
CC=/path/to/llvm
New submission from Jonas Wielicki:
Assume I have this code:
class Spam:
def eggs(__some_kwarg:int=None):
print(__some_kwarg)
I can call Spam.bar with keyword arguments as expected from mangling:
>>> Spam.eggs(10)
10
>>> Spam.eggs(_Spam__some_kwarg=10)
1
New submission from Jonas H.:
>From my personal experience, listing all real files and all subdirectories in
>a directory is a very common use case.
Here's a patch that adds the `iterfiles()` and `iterdirs()` methods as a
shortcut for `[f for f in p.iterdir() if f.
New submission from Jonas Eriksson:
Only tested on marked python versions. Checked the code in hg (a5681f50bae2)
and did not see anything related to this in the current development version.
Essentially, what I see is this:
>>> os.path.dirname("asdf")
''
Jonas Borgström added the comment:
Of course. I've now signed and filed the agreement.
--
___
Python tracker
<http://bugs.python.org/issue18240>
___
___
Pytho
1 - 100 of 149 matches
Mail list logo