New submission from Nils :
The title says it all: `TarInfo` objects are missing their `offset_data` member
in all documentation versions.
--
assignee: docs@python
components: Documentation
messages: 400248
nosy: docs@python, nilsnolde
priority: normal
severity: normal
status: open
Nils Kattenbeck added the comment:
I implemented the logic and adjusted the existing tests to have a fixed program
name. I also fixed the build error by changing how zip files are detected.
Based on you comment Nick you however even had a different idea. Currently I
check if __spec__
Nils Kattenbeck added the comment:
A good alternative would be to use pathlib.Path. The only downside would be
that one has to manually handle `-` but besides that it solves most problems.
Still the fact that file descriptors are kept open should be added as a warning
to the docs
Nils Kattenbeck added the comment:
I expanded the patch from tebeka to also work with invocations like `python3 -m
serial.tools.miniterm` where `miniterm.py` is a file and not a directory with a
`__main__.py`. This was able to handle everything I threw at it.
However due to the import of
Nils Kattenbeck added the comment:
I am not sure if the patch correctly handles calling a nested module (e.g.
`python3 -m serial.tools.miniterm`). Would it also be possible to detect if
python or python3 was used for the invocation?
--
nosy: +Nils Kattenbeck
Nils Kattenbeck added the comment:
> The way I fixed this is I added `__forward_module__` to `typing.ForwardRef`,
> so that it can resolve the forward reference with the same globals as the
> ones specified by the module in `__forward_module__`. `TypedDict`'s metaclass
> sho
Nils Kattenbeck added the comment:
> I believe it had something to do with TypedDict instances being instances of
> dict at runtime, but I can't actually reconstruct the reason.
Hm that may be true.
My limited low-level Python knowledge leads me to believe that this could also
be
Nils Kattenbeck added the comment:
What is/was the initial reason to not preserve the MRO for a TypedDict?
The only thing which came to my mind would be instantiation performance but as
annotations are not evaluated by default and on the right-hide side of
assignment most people will use
Nils Kattenbeck added the comment:
While the proposal linked by C.A.M. solves one of the use cases but it does not
address the others.
One use cases which is rather common for me it is e.g. to have scripts/programs
which allow configuring whether temporary directories should get deleted or
Nils Kattenbeck added the comment:
Has there been any resolution regarding `sortTestMethodsUsing`? See
https://bugs.python.org/msg77261
I spend a decent time and read the documentation thrice before realizing it
received an old-style compare function. Brett's proposal for a new attr
Nils Kattenbeck added the comment:
Thanks for looking into it. Yes I can confirm that `importlib_resources` has
the expected behaviour - I did not download Python 3.10 as the code seems to be
the same.
--
___
Python tracker
<ht
Nils Kattenbeck added the comment:
Yes I understand that the function handles this specially to not raise an
exception if the file is not found in the package (even though the intention
behind this is not clear to me). However if a user causes a
FileNotFoundException itself inside of the
Change by Nils Kattenbeck :
--
title: importlib.resources.path raises RuntimeError import FileNotFoundError is
raise in context manager -> importlib.resources.path raises RuntimeError when
FileNotFoundError is raise in context manager
___
Pyt
New submission from Nils Kattenbeck :
When a FileNotFoundError is raised inside while the importlib.resources.path
context manager is active a RuntimeError is raised.
Looking at the (3.8) code it seems that FileNotFound exceptions are handled
specially from all other exceptions which may lead
Nils Philippsen added the comment:
I've come across this issue lately and proposed a PR which implements this and,
analogous to os.stat(), adds a follow_symlinks parameter to Path.exists().
--
___
Python tracker
<https://bugs.py
Change by Nils Philippsen :
--
keywords: +patch
pull_requests: +20316
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21157
___
Python tracker
<https://bugs.python.org/issu
Change by Nils Philippsen :
--
nosy: +nils
___
Python tracker
<https://bugs.python.org/issue34137>
___
___
Python-bugs-list mailing list
Unsubscribe:
Nils Kattenbeck added the comment:
Okay, if I want to start a discussion about adding weakref types to PEP 585
where should do it? The mailing list or as an issue in the PEP repo?
--
___
Python tracker
<https://bugs.python.org/issue38
New submission from Nils Kattenbeck :
Instances of weakref.WeakSet are not instances of Set and therefore not of
MutableSet but they are instances of Collection.
They however implement all required methods for a MutableSet and
Weak(Key|Value)Dictionary are correctly identified.
Is this just
Nils Kattenbeck added the comment:
Okay nevermind, after looking in the PEP again and inspecting the
__annotations__ property I learned that annotations are never evaluated and
just saved as a string when using said future statement.
However this may still be relevant as
Nils Kattenbeck added the comment:
Yes thank you, using 'from __future__ import annotations' works fantastic.
I did not knew about this functionality of the annotations future import
statement, I thought it was only for postponed evaluation but I probably missed
something
Nils Kattenbeck added the comment:
A possible use case would be having multiple users and some groups said users
can belong to. When using a WeakSet a user won't be part of a groups after he
deleted his account without having to iterate over all groups.
class User: pass
class
New submission from Nils Kattenbeck :
I would like to request the addition of generic variants of some of the types
in weakref to the typing module.
This would for example include weakref.WeakKeyDictionary among others.
Doing so would allow one to add type annotations to code using such data
Nils Goroll added the comment:
In case this helps: I noticed this during the build:
*** WARNING: renaming "_ssl" since importing it failed: ld.so.1: python: fatal:
libssl.so.1.1: open failed: No such file or directory
*** WARNING: renaming "_hashlib" since importin
Change by Nils Lindemann :
--
resolution: -> duplicate
stage: -> resolved
status: -> closed
___
Python tracker
<https://bugs.python.org/issue35558>
___
___
New submission from Nils Lindemann :
Windows 7, Python 3.7.1:260ec2c36a
after doing
C:\python\python -m venv C:\myvenv
and then
C:\>myvenv\Scripts\activate.bat
it prints
parameter format not correct - 65001
However, it activates the venv - the prompt shows
(myvenv
Nils Diefenbach <23okrs20+pyt...@mykolab.com> added the comment:
Alright. Are there any other magic methods that do some post-processing on a
custom implementation of them ?
I couldn't think of one, which is why this behaviour appeared odd to me.
--
status: pend
New submission from Nils Diefenbach <23okrs20+pyt...@mykolab.com>:
When defining a custom __dir__ method in a class, calling dir() on
said class still sorts the output. This is, imo, unexpected behaviour,
especially if the order of output was specified in __dir__ and is somehow
re
Nils Lindemann added the comment:
ok
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue30580>
___
___
Python-bugs-list mailing list
Un
Nils Lindemann added the comment:
I am not sure if the py package i found on PyPi is what you meant, but if you
mean the py launcher (the py.exe in the windows dir), yes, i have that.
My system was indeed misconfigured as you correctly guessed, i had the .py
filetype pointing to a Python
Nils Lindemann added the comment:
What would that be? If i google 'py helper command' i get no good results.
--
resolution: not a bug ->
status: closed -> open
___
Python tracker
<http://bugs.py
Nils Lindemann added the comment:
I just found out that the example works in idle and if i do in a console:
python server.py
but not if i do just:
server.py
What is the secret behind this?
--
___
Python tracker
<http://bugs.python.org/issue30
Nils Lindemann added the comment:
I tried a few online python 3 interpreters.
These give the same exception:
http://www.learnpython.org/en/Hello%2C_World%21
http://rextester.com/l/python3_online_compiler
http://ideone.com/pIMilt
http://www.tutorialspoint.com/execute_python3_online.php
And
New submission from Nils Lindemann:
All examples on
https://docs.python.org/3/library/wsgiref.html
raise this exception:
Traceback (most recent call last):
File "C:\Code\test\server.py", line 110, in
with make_server('', 8000, simple_app) as httpd:
AttributeError: _
Nils Lindemann added the comment:
Two years later: To the dude who removed the rocket from the icons in 3.6: I
LOVE YOU!
--
___
Python tracker
<http://bugs.python.org/issue25
Nils Lindemann added the comment:
i see now what you mean. I have this icon too (py 3.5.0 idle icon.png).
Something is misconfigured with the icons in the python 3.5.0 windows
installer, also python files in explorer have no icons.
Thanks for your hint with the python ideas list, i will post
Nils Lindemann added the comment:
it seems i have still not explained my issue in an understandable way: the
three first icons in the file list in the screenshot, aka the icons which are
used in eg py 3.2, these icons are cool.
the icon i do not like, is the launcher icon which is used in eg
Nils Lindemann added the comment:
let me reformulate it: my main intention is to get rid of the launcher symbol,
or at least have a nicer looking symbol, i dont care for the idle symbol.
--
___
Python tracker
<http://bugs.python.org/issue25
Nils Lindemann added the comment:
The icons are not intended to be used instead of the three default icons,
please dont, these are just great.
I am just targeting the current launcher symbol:
* It contains a symbol of an instrument which can be used to kill people.
* in the 16x16 icon it is
Nils Lindemann added the comment:
Here is also a zip containing the icons.
--
Added file: http://bugs.python.org/file40818/icons.zip
___
Python tracker
<http://bugs.python.org/issue25
Nils Lindemann added the comment:
Hm actually an alternative icon for idle can be useful to separate it from
command lines in the task bar. But a special launcher symbol is not necessary
in my opinion.
--
___
Python tracker
<http://bugs.python.
New submission from Nils Lindemann:
Hi,
See attached screen for a list of alternative 16x16 icon suggestions to the
current launcher symbol, which i dont like (Dudes, rockets are used in wars!).
I copied them a few times to show how they look in groups. (while i was at it i
also created an
nils added the comment:
The workaround indeed works. At least I can work now until this gets officialy
fixed. Thanks!
export CFLAGS=$(python3.4 -c 'import sysconfig;
print(sysconfig.get_config_var("CFLAGS").replace("-Werror=declara
New submission from nils:
I got an error while rebuilding a module for 3.4. This was a ISO C90 error but
setup.py explicitely adds "-std=c99" to the gcc parameters, and indeed it is
used.
fifo.h:114:5: error: ISO C90 forbids mixed declarations and code
[-Werror=declaration-after
Nils Bruin added the comment:
One solution is to patch both WeakValueDictionary and WeakKeyDictionary with
their own clear methods where we first store the strong links (to keys, resp.
values) in a list, then clear the underlying dictionaries (this will now
trigger the deletion of the
Nils Bruin added the comment:
I think the difference in behaviour between Py3 and Py2 is coming from:
http://hg.python.org/cpython/file/a26df2d03989/Objects/dictobject.c#l1275
which first clears all values before removing any keys. For a
WeakValueDictionary that means all the weakrefs are
Nils Bruin added the comment:
Have you tried if the fix at issue7105 solves the problem? I don't see the
patch there introduce a `clear` method override for WeakValueDictionary or
WeakKeyDictionary. The one for WeakSet still calls self.data.clear(), which for
dictionaries would still r
New submission from Nils Bruin:
The following program is a little dependent on memory layout but will usually
generate lots of
Exception KeyError: (A(9996),) in ignored
messages in Python 2.7.
import weakref
class A(object):
def __init__(self,n):
self.n=n
Nils Bruin added the comment:
The most straightforward change I can think of is to change the line
if not sourcefile and file[0] + file[-1] != '<>':
to
if not sourcefile and (not file or file[0] + file[-1] != '<>'):
That solves the prob
New submission from Nils Bruin:
It would seem reasonable that an empty filename would be a legitimate way of
indicating that a code object does not have a corresponding source file.
However, if one does that then inspect.findsource raises an unexpected
IndexError rather than the documented
Nils Breunese added the comment:
I contacted the author of iotop and he told me iotop does not use mprotect (but
it does use dlopen).
Guess I'll have to do some more digging to find what is exactly doing the call
to mprotect.
--
___
P
Nils Breunese added the comment:
I haven't had any problems with other Python applications like this, Python
seems fine otherwise.
I just noticed that iotop has a dependency on python-ctypes, which sounds like
it could be iotop doing the mprotect() calls via ctypes. Does that make
Nils Breunese added the comment:
I got this error message in /var/log/messages when trying to start iotop:
Apr 13 08:49:37 hostname kernel: grsec: From xxx.xxx.xxx.xxx: denied RWX
mprotect of /lib64/ld-2.5.so by /usr/bin/iotop[iotop:9836] uid/euid:0/0
gid/egid:0/0, parent /bin/bash[bash
New submission from Nils Breunese :
When I try to run iotop [0] on CentOS 5.6 on a kernel with grsecurity [1] then
iotop won't start because grsecurity is blocking Python because of its use of
the mprotect() system call.
Please see
http://www.atomicorp.com/wiki/index.php/ASL_FAQ#
Nils Philippsen added the comment:
NB: it's not the shell, but the kernel which interprets the shebang line (and
subsequently calls the shell /bin/sh with it if it's missing, causing funny
effects when it encounters the first import line and you happen to have
ImageMagick
Changes by Nils Philippsen :
--
nosy: +nils
___
Python tracker
<http://bugs.python.org/issue6011>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Nils Philippsen :
--
nosy: +nils
___
Python tracker
<http://bugs.python.org/issue1675951>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Nils Philippsen :
--
nosy: +nils
___
Python tracker
<http://bugs.python.org/issue2504>
___
___
Python-bugs-list mailing list
Unsubscribe:
58 matches
Mail list logo