New submission from Jan :
In chapter 5.7 in the official Python tutorial (see:
https://docs.python.org/3/tutorial/datastructures.html), there is the following
paragraph:
"The comparison operators in and not in check whether a value occurs (does not
occur) in a sequence. The operators i
Jan added the comment:
I really like this solution because it mentions the buzz word "membership". But
I would change "container" to "sequence" because the term "container" doesn't
appear in chapter 5, "sequence" on the other hand mult
Jan added the comment:
Sounds reasonable.
--
resolution: works for me -> fixed
___
Python tracker
<https://bugs.python.org/issue46270>
___
___
Python-bugs-lis
Jan added the comment:
hi all,
just got bitten by this, so i took the time to reiterate the issue.
according to the docs:
http://docs.python.org/library/difflib.html
find_longest_match() should return the longest matching string:
"If isjunk was omitted or None, find_longest_match() re
New submission from Jan:
In Python 2.7.12 when reading, writing and subsequently reading again from a
file, python seems to write garbage.
For example when running this in python IDLE:
import os
testPath = r"myTestFile.txt"
## Make sure the file exists and its empty
with open(t
Changes by Jan :
--
title: File IO read, write, read causes garbage data write. -> File IO r+ read,
write, read causes garbage data write.
___
Python tracker
<http://bugs.python.org/issu
Jan added the comment:
I've reproduced the problem also in 3.7 branch.
```
import asyncio
loop = asyncio.get_event_loop()
async def consumer():
while True:
await asyncio.sleep(0)
message = yield
print('received', message)
async def amain():
Jan Kaliszewski added the comment:
Sure. But don't you think there should be ``.__get__(a, type(a))`` rather than
``.__get__(a, A)``? Then the whole statement would be true regardless of
whether A is the actual type of a, or only a superclass of the type of a.
That would also be
Jan Novak added the comment:
Thank you all for discussion and partial solution in latest Python versions and
extending documentation.
For the future development of Python the initial question remains.
How to easy detect extensions for each file with standard python library
function. Without
Jan Novak added the comment:
It is interesting that pathlib.Path works fine:
>>> pathlib.Path('jpg').suffix
'.jpg'
>>> pathlib.Path('path/jpg').suffix
'.jpg'
--
_
Jan Novak added the comment:
New examples with the structured data.
Problems are with quotes and spaces inside { or [
cookie-script.com set those cookie data:
CookieScriptConsent={"action":"accept","categories":"[\\"performance\\"]"}
Py
jan matejek added the comment:
no change to extract() ?
otherwise looks good to me. if you don't object, i am applying this to
SUSE's python 2.5
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.p
jan matejek added the comment:
if that can be considered "official stance", it's fine by me. feel free
to close the bug.
__
Tracker <[EMAIL PROTECTED]>
<http://b
New submission from jan matejek :
from Demo/scripts/newslist.py :
# Feel free to copy, distribute and modify this code for
# non-commercial use. If you make any useful modifications, let me
# know!
#
# (c) Quentin Stafford-Fraser 1994
# fra...@europarc.xerox.com qs
Jan Kratochvil added the comment:
Here is the implementation.
Python/getargs.c was modified for:
ImportError: /usr/lib64/python2.7/lib-dynload/fcntlmodule.so: undefined symbol:
_PyArg_ParseTuple_SizeT
but I guess that patch part should be different. There is no need to do #ifdef
Jan Papež added the comment:
Did you try to use this?
q = quotedata(msg.as_string())
--
nosy: +honyczek
___
Python tracker
<http://bugs.python.org/issue8
jan matejek added the comment:
please check my logic here, but the patched code seems to throw away perfectly
valid return codes:
in wait(), self._handle_exitstatus(sts) gets called unconditionally, and it
resets self.returncode also unconditionally.
now, if a _cleanup() already did
Changes by jan matejek :
--
nosy: +matejcik
___
Python tracker
<http://bugs.python.org/issue12801>
___
___
Python-bugs-list mailing list
Unsubscribe:
jan matejek added the comment:
the problem this patch was solving is "python libraries install into
"prefix/lib" regardless of what is the correct local LIBDIR" - which is
obviously broken on systems where LIBDIR is something other than "prefix/lib",
most notab
jan matejek added the comment:
this affects 2.7 as well. the problem was introduced by r78136 which skips out
of the directory containing newly built libpython2.7, so the linking command
cannot find it in -L. and fails (unless a systemwide libpython is already
present)
the tests should
Changes by jan matejek :
--
nosy: +matejcik
___
Python tracker
<http://bugs.python.org/issue6706>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Jan Kratochvil :
http://docs.python.org/py3k/c-api/object.html
PyObject_GetItem
Return element [...] or NULL on failure.
Found element => return its pointer.
Found no element => return NULL (with no exception set).
But it is unclear whether the function can also:
Jan Kratochvil added the comment:
OK, I am not used to Python, thanks.
--
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
New submission from Jan Kratochvil :
FSF GDB (and future Fedora GDBs) became 250KB smaller than before. Python
recently disabled this GDB build optimization so GDB is 250KB larger again.
-rwxr-xr-x 1 4524488 gdb-7.1-19.fc13.x86_64/usr/bin/gdb
-rwxr-xr-x 1 4266728 gdb-7.1-19dynamiclist.fc13
jan matejek added the comment:
i was able to reproduce this in clean 2.7
Sandro, this is only reproducible on systems without python - so by definition,
you can hit this only during installation
as for issue8335, yes, i think that it's a duplicate
distutils2 is irrelevant here, becaus
Jan Kaliszewski added the comment:
On python-ideas I have proposed an ABC being also a kind of a mix-in,
potentially making namedtuple subclassing (with custom methods etc.) more
convenient, e.g.:
class MyRecord(namedtuple.abc):
_fields = 'x y z'
def _my_cus
Jan Kaliszewski added the comment:
PS. Newer, shorter version: http://dpaste.org/2aiQ/
--
___
Python tracker
<http://bugs.python.org/issue7796>
___
___
Python-bug
Jan Kaliszewski added the comment:
Thank you. Raymond is against the idea so I don't know if it makes sense to
create the real patch for now (it would patch the collections module and, I
suppose, addming tests, docs etc.). Anyway, if somebody would be interested in
the idea, the n
Jan Kaliszewski added the comment:
PS. For the record: the final recipe is here:
http://code.activestate.com/recipes/577629-namedtupleabc-abstract-base-class-mix-in-for-named/
--
___
Python tracker
<http://bugs.python.org/issue7
New submission from Jan Koprowski :
Python:
---
>>> import difflib
>>> dl = difflib.unified_diff([], ['a\n', 'b\n'])
>>> print ''.join(dl),
---
+++
@@ -1,0 +1,2 @@
+a
+b
Gnu diff:
---
$diff
Jan Groenewald added the comment:
I am trying to build www.sagemath.org on ubuntu 10.04 natty beta 2 for amd64.
Bear with me.
Sage includes a patched version of python2.6.4, and it fails to build
modules nis and crypt.
Upstream python 2.6.4, 2.6.6, and 2.7.1 fail to build with the same
error
Jan Groenewald added the comment:
Oops, correction. Ubuntu 11.04 beta 2 for amd64.
--
___
Python tracker
<http://bugs.python.org/issue9762>
___
___
Python-bug
Changes by Jan Killian :
--
nosy: +iki
___
Python tracker
<http://bugs.python.org/issue10466>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
New submission from Jan Kaliszewski :
Let examples speak:
def x(a, z): pass # this is ok
def x(a, z,): pass # this is ok
def x(a, *, z): pass # this is ok in Py3k
def x(a, *, z,): pass # but this causes SyntaxError (!)
def x(a, *args): pass # this is ok
Jan Kaliszewski added the comment:
s/**{5: 6}/**{'5': 6}/g (but it's a detail)
--
___
Python tracker
<http://bugs.python.org/issue10682>
___
___
Jan Kaliszewski added the comment:
Oops, I see the problem was partly addressed @ issue9232.
But:
* the proposed patch doesn't fix calls (but defs only),
* shouldn't be the issue considered as a bug -- and fixed also in 2.7 and 3.1?
--
Changes by Jan Kaliszewski :
--
nosy: +zuo
___
Python tracker
<http://bugs.python.org/issue9232>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jan Kaliszewski added the comment:
>From 10682: The patch proposed in this (#9232) issue does not fix call syntax
>but def sytax only. I think it should fix call sytax as well (see code
>examples in #10682).
--
___
Python track
Jan Kaliszewski added the comment:
python-dev discussion continuation:
http://mail.python.org/pipermail/python-dev/2010-December/106770.html
--
___
Python tracker
<http://bugs.python.org/issue9
Jan Killian added the comment:
Hello All,
sorry for lack of communication recently, I'd alos like to see it in 3.2
instead of 3.3, but my time is not as scalable as I wish and I can't run on
clouds yet .)
I like Trent's module and especially its usefullness via the command
New submission from Jan Huelsbergen <[EMAIL PROTECTED]>:
the 'from' examples contain non-keyword args after keyword args:
pipe = os.popen(cmd, mode='r', bufsize)
should be
pipe = os.popen(cmd, 'r', bufsize)
and
pipe = os.popen(cmd, mode='w'
jan matejek <[EMAIL PROTECTED]> added the comment:
> "as it doesn't seem /dev/shm is the culprit"
Mounting /dev/shm seems to fix the problem in suse's autobuild (chroot)
environment, so for me it actually was the culprit. Perhaps you should
recheck your buildbots
Changes by jan matejek <[EMAIL PROTECTED]>:
--
nosy: +matejcik
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3879>
___
___
Python
Changes by jan matejek <[EMAIL PROTECTED]>:
--
nosy: +matejcik
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3886>
___
___
Python
Changes by jan matejek <[EMAIL PROTECTED]>:
--
nosy: +matejcik
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1424152>
___
__
New submission from jan matejek <[EMAIL PROTECTED]>:
python 2.6's compatibility socket.ssl() method does not handle 'sock'
parameter in the same way.
in 2.5, ssl() looked like this:
def ssl(sock, keyfile=None, certfile=None):
if hasattr(sock, "_sock"):
Changes by Jan Kaliszewski :
--
title: Doc for itertools recipe consume is complicated and less efficient ->
dictview
versions: -Python 2.6, Python 2.7, Python 3.2
___
Python tracker
<http://bugs.python.org/iss
Changes by Jan Kaliszewski :
--
title: dictview -> Doc for itertools recipe consume is complicated and less
efficient
___
Python tracker
<http://bugs.python.org/iss
Jan Kaliszewski added the comment:
(sorry! typed into a wrong field)
--
nosy: +zuo
versions: +Python 2.6, Python 2.7, Python 3.2
___
Python tracker
<http://bugs.python.org/issue7
New submission from Jan Kaliszewski :
Dictionary views documentation (e.g.
http://docs.python.org/3.1/library/stdtypes.html#dictionary-view-objects)
contains nothing about comparison (> >= < <= == !=) operations.
--
assignee: georg.brandl
components: Documentation
messages
New submission from Jan Kaliszewski :
del list_instance([start : stop : very_big_step]) causes segfaults...
The boundary values seem to be:
* start -- near length of the list
* stop -- near (-length) of the list
* very_big_step -- near sys.maxint
Let examples speak...
>>> from s
Jan Kaliszewski added the comment:
** Erratum **
-- was:
del list_instance([start : stop : very_big_step]) causes segfaults...
-- should be:
del list_instance[start : stop : very_big_step]
causes segfaults...
** Post scriptum **
In each example only the last statement causes segmentation fault
Jan Kaliszewski added the comment:
Interesting that in Py2.5...
>>> del range(10)[::maxint]
...this causes segfault but in Py2.6 is ok, as well as in Py3.0 (with maxsize
insetad of maxint). (That's why I didn't noticed that it concerns newer version
than 2.5, and marked
Jan Kaliszewski added the comment:
PS. Is such a data-dependant segfault considered as security problem? (if it
is, maybe Python2.5 shuld be kept in "Versions" list)
--
___
Python tracker
<http://bugs.python.
Jan Killian added the comment:
Adapted Brian Curtin's http://bugs.python.org/file15381/
shutil_which.patch and made another reference implementation as a standalone
module including the following fixes:
* uses ``PATHEXT`` on Windows
* searches current directory before ``PATH`` on Windows
Jan Killian added the comment:
Updated version of reference implementation as a standalone module
* changed interface: which_files() returns generator, which() returns first
match,
or raises IOError(errno.ENOENT)
* updated doctest
Made this to more closely resemble the '
New submission from jan matejek :
when running testsuite in a clean environment without pre-installed system
python, test_distutils fail in test_build_ext, test_get_outputs:
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld:
cannot find -lpython2.6
LinkError: command
jan matejek added the comment:
see issue 8335
--
nosy: +matejcik
___
Python tracker
<http://bugs.python.org/issue6022>
___
___
Python-bugs-list mailing list
Unsub
Changes by jan matejek <[EMAIL PROTECTED]>:
--
nosy: +matejcik
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1621>
__
___
Python-bugs-list mailing
Changes by jan matejek <[EMAIL PROTECTED]>:
--
nosy: +matejcik
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1179>
__
___
Python-bugs-list mailing
Changes by jan matejek <[EMAIL PROTECTED]>:
--
nosy: +matejcik
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3620>
___
___
Python
New submission from Jan Schreuder <[EMAIL PROTECTED]>:
I downloaded and installed Python 2.6 for Mac OSX 10.4. It installed
Build Applet, Extras, IDLE and Python Launcher in a Python 2.6 folder in
the Applications folder. However, IDLE will not launch. I have Python
2.5 installed. Tha
New submission from Jan Kaliszewski :
Py2.4 and 2.5 (and probably other 2.x releases too):
>>> try: f=open('existing_dir')
... except IOError, exc: print exc.filename
...
None
(expected result: "existing_dir")
Py3.0 (and possibly 3.1 too):
>>> try: f=open
New submission from Jan Malakhovski :
Hello.
I have dedicated mail server at home
and it holds about 1G of mail.
Most of mail is in non UTF-8 codepage, so today
I wrote little script that should recode
all letters to UTF. But I found that
email.header.decode_header parses some headers wrong
New submission from jan matejek :
since 2.6 httplib supports reading from file-like objects.
Now consider the following situation:
There are two handlers in urrlib2, first is plain http, second is basic
auth.
I want to POST a file to a service, and pass the open file object as
data parameter to
New submission from jan matejek :
documentation for PySys_SetArgv states that the function sets sys.argv,
but fails to mention that it also resolves script's path and prepends it
to sys.path. Or, in case no script was specified, it prepends empty
string (which in versions <2.6 allowed
New submission from Jan Bronicki :
The `//` path should be equivalent to `/`, and in some ways, it does behave
like that in pathlib. But in the `relative_to` method on a `Path` object, it
does not work
This is causing our CI pipeline to fail. In the documentation here you can see
`//` being
Jan Bronicki added the comment:
But shouldn't it just work with `//` as a `/`? It seems like this is the
behavior elsewhere. Sure I get that it cannot be done for 3.8. But the new
error message implies that either `//` is not a subpath of `/` which it is, or
that one is relative an
Jan Bronicki added the comment:
Hmm..., I get it, but Im not gonna lie it's pretty confusing given that in
other places `//` works as a substitute for `/`. Maybe it should be mentioned
in the documentation?
--
___
Python tracker
&
Jan Konopka added the comment:
Hi all!
While browsing StackOverflow I came across this question:
https://stackoverflow.com/q/67273533/2111778
The user created a ThreadPoolExecutor which started a Process using
multiprocessing. The Process produces an exitcode of 0 in Python 3.8 but an
New submission from jan matejek :
The fallback detection for `win_getpass` checks that `sys.stdin` is different
from `sys.__stdin__`. If yes, it assumes that it's incapable of disabling echo,
and calls `default_getpass` which reads from stdin.
If they are the same object, it assumes it
jan matejek added the comment:
...this is a problem because:
When the check incorrectly infers that it can use `msvcrt` while its stdin is a
pipe, the calls to `putwch` and `getwch` are going into the void and the
program effectively freezes waiting for input that never comes.
See also
jan matejek added the comment:
For that matter, in standard Windows Command Prompt `sys.stdin` and
`sys.__stdin__` are also identical, but `isatty()` reports True.
I suspect is that the code has drifted and `sys.stdin` is _always_ identical to
`sys.__stdin__
Change by jan matejek :
--
versions: -Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8,
Python 3.9
___
Python tracker
<https://bugs.python.org/issue44
Change by jan matejek :
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue44762>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Jan Ripke :
When executing the following statement on a Windows machine it fails.
On a linux machine it returns the expected date (-31-12 00:00:00)
The Error we get on Windows is:
OSError: [Errno 22] Invalid argument
In another manor it was reported before:
https
Jan Pieczkowski added the comment:
This issue also still affects Python versions 3.6.15 and 3.7.12
IMHO it would make sense to backport this patch to the 3.6 and 3.7 branches,
especially as it only affects one line of code and doesn't seem to affect
anything else, but solves the same
New submission from Jan Wolski :
Currently in the ZipFile class implementation, when processing the zip file
headers "extra" field, a .read() call is used without using the returned value
in any way. This call could be replaced with a .seek() to avoid actually doing
the IO.
The ch
Jan Kaliszewski added the comment:
So the current (after the aforementioned commit) form of the description is:
A dotted lookup such as ``super(A, a).x`` searches
``obj.__class__.__mro__`` for a base class ``B`` following ``A`` and then
returns ``B.__dict__['x'].__get__(a,
Jan Kaliszewski added the comment:
Sorry, a few mistakes distorted my proposal. It should be:
A dotted lookup such as ``super(A, obj).x`` (where ``obj`` is an
instance of ``A`` or of a subclass of ``A``) searches ``A.__mro__``
for a base class whose `__dict__` contains name ``&q
Jan Kaliszewski added the comment:
I am very sorry, I just noticed another mistake.
It should be:
A dotted lookup such as ``super(A, obj).x`` (where ``obj``
is an instance of ``A`` or of a subclass of ``A``) searches
``type(obj).__mro__`` for such a base class ``B`` that follows
Jan Hutař added the comment:
I think there is a same issue with "nargs='+'" - if you are aware of the,
please ignore me.
$ python3 --version
Python 3.7.5
With "choices=...", there seems to be a problem:
$ cat bbb.py
#!/usr/bin/env python3
import argparse
pa
Jan Christoph added the comment:
I would argue to reopen this. Seeing I and other people run into that issue
(e.g. https://stackoverflow.com/q/40883083/789308) quiet frequently.
Especially since it breaks the `global` keyword, e.g.:
__superprivate = "mahog"
class AClass(object
Jan Christoph added the comment:
Just because it is documented, doesn't mean it's not a bug or illogical and
unexpected.
--
___
Python tracker
<https://bugs.python.o
Jan Christoph added the comment:
In particular, this might conflict with the documentation of global, which
states:
> If the target is an identifier (name):
>
>If the name does not occur in a global statement in the current code
> block: the name is bound to the object in
Jan Wilmans added the comment:
I couldn't get this to work at all, python 3.7 compiled fine, but at the end it
reports:
'''
*** WARNING: renaming "_ssl" since importing it failed: libssl.so.1.1: cannot
open shared object file: No such file or directory
*** WARN
New submission from BenTen Jan :
I downloaded python 3.8.2 which is the latest version of python for windows.
Run as admin , changed path of installation though its getting empty Scripts
folder. though setup shows successful.
Please find attached log files from my %temp% folder.
Thanks
BenTen Jan added the comment:
First and foremost thanks for replying,
1. I don't have any virus scanner installed.
2. I have tried running "python -m ensurepip" it shows me Following error
C:\Python>Python get-pip.py
Traceback (most recent call last):
File "get-
Jan Tojnar added the comment:
One benefit of using a compile time feature over a runtime method is that the
former allows for more predictable dedenting by first dedenting and only then
interpolating variables.
For example, the following code does not dedent the test string at all
New submission from Jan Christoph :
Running
python3 -Im ensurepip --upgrade --default-pip
in a directory that contains a setup.cfg / setup.py combination, caused
ensurepip to try and use these files, leading to
distutils.errors.DistutilsOptionError: error in setup.cfg: command 'build
Jan Christoph added the comment:
Just wanted to say, I ran into this while using direnv. See the issue I opened
before knowing of this one: https://bugs.python.org/issue43038
--
nosy: +con-f-use
Added file: https://bugs.python.org/file49779/shell-session.txt
Change by Jan Steinke :
--
nosy: +jan-xyz
___
Python tracker
<https://bugs.python.org/issue42853>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jan Hudec added the comment:
Confirming the fixed version linked in previous comment by Thomas Waldmann is
correct and matches what `hostname -f` does.
--
nosy: +bulb
versions: +Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python
3.9
New submission from Jan Češpivo :
Hi,
it should be useful if assignment expression works within assertion.
For example (real use-case in tests):
assert r := re.match(r"result is (\d+)", tested_text)
assert int(r.group(1)) == expected_number
I haven't found a mention abou
Jan Češpivo added the comment:
Hi Ronald,
thank you. It works! :)
--
___
Python tracker
<https://bugs.python.org/issue41417>
___
___
Python-bugs-list mailin
New submission from Jan Novak :
If brackets [] are around cookie name,
next cookie names are not loaded.
try:
import http.cookies as Cookie
except ImportError:
import Cookie
c = Cookie.SimpleCookie()
c.load('id=12345; [object Object]=data; something=not loaded')
print(c)
Note
New submission from Jan Schatz :
I have a tar gz archive that fails to be extracted via tarfile.extractall(). By
adding some debug code I found that at some point InvalidHeaderError is raised
inside tarfile.next(). But the function just swallows the exception, because
the offset isn't 0
Jan Poctavek added the comment:
I'm speaking officially for Danube Cloud, an advanced project which is
open-source virtualization platform similar to Proxmox, XCP-NG, oVirt, Joyent
Triton, etc. Our base platform is SmartOS and we have everything written in
Python.
If you drop suppor
Jan Novak added the comment:
Possible patch, load parts one by one:
http_cookie = 'id=12345; [object Object]=data; something=not_loaded'
for cookie_key in http_cookie.split(';'):
c.load(cookie_key)
print c
Set-Cookie: id=12345
Set-Cookie:
New submission from Jan Lieskovsky :
A denial of service flaw was found in the way Simple XML-RPC Server module of
Python processed client connections, that were closed prior the complete
request body has been received. A remote attacker could use this flaw to cause
Python Simple XML-RPC
1 - 100 of 443 matches
Mail list logo