Albert Zeyer added the comment:
> How is CoW copy supposed to be done by using copy_file_range() exactly?
I think copy_file_range() will just always use copy-on-write and/or
server-side-copy when available. You cannot even turn that
Albert Zeyer added the comment:
I did some further research (with all details here:
https://stackoverflow.com/a/65518879/133374).
See vfs_copy_file_range in the Linux kernel. This first tries to call
remap_file_range if possible.
FICLONE calls ioctl_file_clone. ioctl_file_clone calls
Albert Zeyer added the comment:
Is FICLONE really needed? Doesn't copy_file_range already supports the same?
I posted the same question here:
https://stackoverflow.com/questions/65492932/ficlone-vs-ficlonerange-vs-copy-file-range-for-copy-on-write-support
--
nosy: +Albert.
Albert Zeyer added the comment:
According to the man page of copy_file_range
(https://man7.org/linux/man-pages/man2/copy_file_range.2.html), copy_file_range
also should support copy-on-write:
> copy_file_range() gives filesystems an opportunity to implement
> "copy a
Change by Albert Cervin :
--
keywords: +patch
pull_requests: +20981
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21854
___
Python tracker
<https://bugs.python.org/issu
New submission from Albert Cervin :
When creating a virtualenv using venv.EnvBuilder, it always uses
sys._base_executable. However, in some embedded cases (Blender being one
example), it is not set to a valid Python executable. The proposal is to add a
keyword parameter to the EnvBuilder
Albert Francis added the comment:
Got it, thanks!
On Mon, 10 Aug 2020, 19:26 Terry J. Reedy, wrote:
>
> Terry J. Reedy added the comment:
>
> Test error fixed on issue 41514.
>
> --
>
> ___
> Python tracker
> <h
Albert Francis added the comment:
Dear Sir,
I got the solution. Thanks
On Tue, 4 Aug 2020, 16:55 Terry J. Reedy, wrote:
>
> Terry J. Reedy added the comment:
>
> One should never see this message. As far as I remember, I have seen it
> only once in the last several years.
New submission from Albert Francis :
How to solve unrecoverable server exiting in IDLE
--
assignee: terry.reedy
components: IDLE
messages: 374766
nosy: albertpython, terry.reedy
priority: normal
severity: normal
status: open
title: Unrecoverable server exiting
type: behavior
versions
Albert Christianto added the comment:
Sorry for my late response.
Well, thank you very much for your fast response to help me.
Actually, I have solved the problem in 3 hours after I posted my question.
hehehe.
I found this tip about uncleaned files after executing "make clean&quo
Albert Christianto added the comment:
Hi admins,
I need help for compiling and building Python-3.7.7.
My system is Ubuntu 16.04 LTS, gcc 5.4.0 20160609
this is the configuration cmd for compling python
./configure --enable-optimizations --enable-shared
when i compiled it, i get these
Albert Zeyer added the comment:
> I think it is worth pointing out that the semantics of
>
> f = ``open(fd, closefd=True)``
>
> are broken (IMHO) because an exception can result in an unreferenced file
> object that has taken over reponsibility for closing the fd, but
Albert Zeyer added the comment:
If you anyway accept that KeyboardInterrupt can potentially leak, by just using
`except Exception`, it would also be solved here.
--
___
Python tracker
<https://bugs.python.org/issue39
Albert Zeyer added the comment:
Why is `except BaseException` better than `except Exception` here? With `except
Exception`, you will never run into the problem of possibly closing the fd
twice. This is the main important thing which we want to fix here. This is more
important than missing
Albert Zeyer added the comment:
Instead of `except:` and `except BaseException:`, I think better use `except
Exception:`.
For further discussion and reference, also see the discussion here:
https://news.ycombinator.com/item?id=22028581
--
nosy: +Albert.Zeyer
New submission from Michel Albert :
Consider the following code:
# filename: foo.py
from functools import lru_cache
@lru_cache(10)
def bar():
yield 10
yield 20
yield 30
# This loop will work as expected
for row in bar():
print(row
New submission from David Albert Torpey :
$ python3.5
Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 08:49:46)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Albert Zeyer added the comment:
Note that this indeed seems confusing. I just found this thread by search for a
null context manager. Because I found that in TensorFlow they introduced
_NullContextmanager in their code and I wondered that this is not provided by
the Python stdlib
Albert Zeyer added the comment:
I'm also affected by this, with Python 3.6. My home directory is on a
ZFS-backed NFS share.
See here for details:
https://github.com/Linuxbrew/homebrew-core/issues/4799
Basically:
Copying setuptools.egg-info to
/u/zeyer/.linuxbrew/lib/python3.6/site-pac
Albert Zeyer added the comment:
Here is some more background for a case where this occurs:
https://stackoverflow.com/questions/46849566/multi-threaded-openblas-and-spawning-subprocesses
My proposal here would fix this.
--
___
Python tracker
<ht
Albert Zeyer added the comment:
This is a related issue, although with different argumentation:
https://bugs.python.org/issue20104
--
___
Python tracker
<https://bugs.python.org/issue31
New submission from Albert Zeyer :
subprocess_fork_exec currently calls fork().
I propose to use vfork() or posix_spawn() or syscall(SYS_clone, SIGCHLD, 0)
instead if possible and if there is no preexec_fn. The difference would be that
fork() will call any atfork handlers (registered via
Albert-Jan Nijburg added the comment:
I understand the standpoint that the server is configured incorrectly, and I
see why this might not be the best solution to the problem.
But not everyone owns the ftp server they're connecting to. And the `EPSV`
command often doesn't i
Changes by Albert-Jan Nijburg :
--
pull_requests: +1990
___
Python tracker
<http://bugs.python.org/issue25324>
___
___
Python-bugs-list mailing list
Unsubscribe:
Albert-Jan Nijburg added the comment:
Aah! Oops I can fix later today.
On Thu, 1 Jun 2017 at 18:08, STINNER Victor wrote:
>
> STINNER Victor added the comment:
>
> We got a bug report from Coverity:
>
> *** CID 1411801: Incorrect expression (MISSING_COMMA)
> /Parse
Albert-Jan Nijburg added the comment:
I've updated token.rst and Misc/NEWS. Let me know if the wording is correct.
--
___
Python tracker
<http://bugs.python.org/is
Albert-Jan Nijburg added the comment:
Let me know if you want me to add/change anything about my PR :) I'm happy to
do so.
--
___
Python tracker
<http://bugs.python.org/is
Albert-Jan Nijburg added the comment:
I think this covers all the changes from PR #1608. Looks a lot nicer too,
building it every time from the make file.
You may want to add to the docs that token.py is now the source of the tokens.
--
___
Python
Albert-Jan Nijburg added the comment:
I've updated the PR and added the tokenize tokens to token.h and their names to
tokenizer.c. This way they'll show up when you run token.py. The names will
always be in tok_name and tokenizer.py will use those. Not breaking the public
api and
Albert-Jan Nijburg added the comment:
Still no CLA, I checked my username on the pdf, and it's correct, hope someone
looks at it soon :)
--
___
Python tracker
<http://bugs.python.org/is
Albert-Jan Nijburg added the comment:
I did yesterday, should be coming through today right?
--
___
Python tracker
<http://bugs.python.org/issue30377>
___
___
Albert-Jan Nijburg added the comment:
lib2to3 appears to have it's own token.py as well with NL and COMMENT withtout
ENCODING...
Lib/lib2to3/pgen2/token.py
--
___
Python tracker
<http://bugs.python.org/is
Albert-Jan Nijburg added the comment:
> I prefer to add tokenize tokens directly in Lib/token.py, and then get
> COMMENT, NL and ENCODING using tok_name.index().
That would make more sense from a breaking change perspective, but we would
step on the toes of anyone adding `COMMENT`, `N
Albert-Jan Nijburg added the comment:
Oh yes you're right! I've updated the code on github. Even cleaner this way :).
--
___
Python tracker
<http://bugs.python.o
Changes by Albert-Jan Nijburg :
--
pull_requests: +1699
___
Python tracker
<http://bugs.python.org/issue25324>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Albert-Jan Nijburg:
While porting tokenize.py to javascript I stumbled upon this. The bit of code
that checks if it's a newline or a comment, checks for comment twice. These can
be split up, this way the code is a bit more readable.
https://github.com/python/cpython
New submission from Albert Zeyer:
The doc says that StringIO.truncate should not change the current position.
Consider this code:
try:
import StringIO
except ImportError:
import io as StringIO
buf = StringIO.StringIO()
assert_equal(buf.getvalue(), "")
prin
Michel Albert added the comment:
Are there any updates on this? Not sure if it's too late again to get it
applied for the next Python (3.6) release?
--
___
Python tracker
<http://bugs.python.org/is
Michel Albert added the comment:
New patch with proposed changes.
--
Added file: http://bugs.python.org/file43537/net-in-net-r6.patch
___
Python tracker
<http://bugs.python.org/issue20
Michel Albert added the comment:
I don't quite see how the operator module could help. I don't have much
experience with it though, so I might be missing something...
I don't see how I can relate one check to the other. The example I gave in the
patch review was the follo
Michel Albert added the comment:
Updated patch, taking into account notes from the previous patch-reviews
--
Added file: http://bugs.python.org/file43535/net-in-net-r5.patch
___
Python tracker
<http://bugs.python.org/issue20
Michel Albert added the comment:
Test pass properly.
Is there anything else left to do?
Here's the fixed patch (net-in-net-r4.patch)
--
Added file: http://bugs.python.org/file43534/net-in-net-r4.patch
___
Python tracker
<http://bugs.py
Michel Albert added the comment:
I just realised that the latest patch on this no longer applies properly. I
have fixed the issue and I am currently in the process of running the
unit-tests which takes a while. Once those pass, I'll update some metadata and
res
Albert Zeyer added the comment:
Yes exactly. Sorry if I was unclear before. :)
I mentioned SIGUSR1/2 because for a segfault, the signal handler will usually
be executed in the same thread (although I'm not sure if that is guaranteed),
so that was usually not a problem. But I used SIGUSR1
Albert Zeyer added the comment:
PyGILState_GetThisThreadState might not be the same Python thread as
_PyThreadState_Current, even in the case that both are not NULL. That is
because SIGUSR1/2 will get delivered to any running thread. In the output by
faulthandler, I want that it marks the
New submission from Albert Freeman:
def f(a, L=[]):
L.append(a)
return L
Seems to behave differently to
def f(a, L=None):
L = []
L.append(a)
return L
Which behaves the same as (as far as I noticed) to the below code in the
documentation (In the tutorial under 4. More
Albert Zeyer added the comment:
Any update here?
--
nosy: +Albert.Zeyer
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue5710>
___
___
Pytho
Changes by Albert White :
--
nosy: +Albert White
___
Python tracker
<http://bugs.python.org/issue9694>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chase Albert:
`defaultdict(list).pop(1)` raises a KeyError, this is not what I expected (I
expected an empty list).
--
components: Library (Lib)
messages: 250080
nosy: rob.anyone
priority: normal
severity: normal
status: open
title: defaultdict's pop gi
Albert Zeyer added the comment:
Ah thanks, that explains why it failed for me, and why it works after my fix,
which was anyway what I intended.
I mostly posted my comment here in case someone else hits this, so he has
another thing to check/debug.
I don't think that there is a b
Albert Zeyer added the comment:
Note that there are still people who get this error in some strange cases, me
included.
E.g.:
http://stackoverflow.com/questions/27904936/python-exe-file-crashes-while-launching-on-windows-xp/32137554#32137554
This happened at a call to `os.urandom` for me
New submission from Albert Zeyer:
Code:
class C(object):
def __init__(self, a, b=2, c=3):
pass
class D(C):
def __init__(self, d, **kwargs):
super(D, self).__init__(**kwargs)
class E(D):
def __init__(self, **kwargs):
super
New submission from Albert Zeyer:
SIGUSR1/2 will get delivered to any running thread. The current thread of the
signal doesn't give any useful information. Try to get the current Python
thread which holds the GIL instead, or use NULL.
I have patched this for the external faulthandler m
New submission from Albert Zeyer:
The documentation about Py_Finalize() about freeing objects is not exactly
clear.
Esp., when I have called Py_INCREF somewhere, those objects will always have
ob_refcnt > 0 unless I call Py_DECREF somewhere, what about these objects? Will
they be freed
New submission from Albert Ho:
https://docs.python.org/3/tutorial/classes.html
>>> for char in reverse('golf'):
I found that reverse didnt work
and i check the doc
https://docs.python.org/3.4/library/functions.html#reversed
>>> reversed(seq)ΒΆ
I guess it just fo
Albert Hopkins added the comment:
You can close this one out. I don't even remember the use case anymore.
--
___
Python tracker
<http://bugs.python.org/i
Changes by Albert Looney :
Removed file: http://bugs.python.org/file34503/index.patch
___
Python tracker
<http://bugs.python.org/issue20062>
___
___
Python-bugs-list m
Michel Albert added the comment:
I made the changes mentioned by r.david.murray
I am not sure if the modifications in ``Doc/whatsnew/3.5.rst`` are correct. I
tried to follow the notes at the top of the file, but it's not clear to me if
it should have gone into ``News/Misc`` or into
Michel Albert added the comment:
Sorry for the late reply. I wanted to take some time and give a more detailed
explanation. At least to the best of my abilities :)
I attached a zip-file with my quick-and-dirty test-rig. The zip contains:
* gendata.py -- The script I used to generate test
Michel Albert added the comment:
Hi again,
The contribution agreement has been processed, and the patch still cleanly
applies to the latest revision of branch `default`.
--
___
Python tracker
<http://bugs.python.org/issue20
Michel Albert added the comment:
It seems the contributor agreement form has been processed. As I understand it,
the asterisk on my name confirms this.
I also verified that this patch cleanly applies to the most recent revision.
--
___
Python
Albert Looney added the comment:
Patch should be fixed now and remove emacs.rst file.
It seems to me that the Emacs information that is being deleted is already in
the wiki.
https://wiki.python.org/moin/EmacsEditor
--
Added file: http://bugs.python.org/file34542/devguide.patch
Albert Looney added the comment:
removing emacs from the devguide
Im am certainly new at this, so if this is incorrect please provide feedback.
--
keywords: +patch
nosy: +alooney
Added file: http://bugs.python.org/file34503/index.patch
___
Python
Michel Albert added the comment:
Did so already last weekend. I suppose it will take some time to be processed.
I can ping you via a message here once I receive the confirmation.
--
___
Python tracker
<http://bugs.python.org/issue20
Michel Albert added the comment:
Yes. I signed it last Friday if I recall correctly.
As I understood it, the way for you to tell if it's done, is that my username
will be followed by an asterisk.
But I'm not in a hurry. Once I get the confirmation, I can just ping you again
via
Michel Albert added the comment:
Here's a new patch implementing both ``subnet_of`` and ``supernet_of``.
It also contains the relevant docs and unit-tests.
--
Added file: http://bugs.python.org/file34292/net-in-net-r2.patch
___
Python tracker
Michel Albert added the comment:
I second "supernet_of" and "subnet_of". I'll implement it as soon as I get
around it.
I have been thinking about using ``in`` and ``<=`` and, while I initially liked
the idea for tests, I find both operators too ambiguous.
Wit
Michel Albert added the comment:
I strongly agree with Raymond's points! They are all valid.
I should note, that I submitted this patch to - as mentioned by Nick -
familiarise myself with the patch submission process. I decided to make
harmless changes which won't risk brakin
New submission from Michel Albert:
This alternative implementation runs over the ``addresses`` collection only
once, and "backtracks" only if necessary. Inspired by a "shift-reduce" approach.
Technically both are O(n), so the best case is always the same. But the old
impl
Michel Albert added the comment:
Hmm... after thinking about this, I kind of agree. I was about to state
something about the fact that you could consider networks like an "ordered
set". And use that to justify my addition :) But the more I think about it, the
more I am okay with
New submission from Michel Albert:
The ipaddress module always returns ``False`` when testing if a network is
contained in another network. However, I feel this should be a valid test. No?
Is there any reason why this is fixed to ``False``?
In case not, here's a patch which implements
Michel Albert added the comment:
Here's a new patch which addresses white-space issues without touching the old
tests.
--
Added file: http://bugs.python.org/file34265/test_ipaddress_pep8-r3.patch
___
Python tracker
<http://bugs.py
Michel Albert added the comment:
Thanks for the quick reply!
I did not know the pep8 tool added it's own rules :( I have read PEP8 a long
while ago and have since relied on the tool to do "the right thing". Many of
it's idiosyncrasies have probably made their way into my
New submission from Michel Albert:
While I was looking at the source of the ipaddress unit-tests, I noticed a
couple of PEP8 violations. This patch fixes these (verified using the ``pep8``
tool).
There are no behavioural changes. Only white-space.
Test-cases ran successfully before, and
New submission from Albert Zeyer:
On MacOSX, when you build an ARC-enabled Dylib with backward compatibility for
e.g. MacOSX 10.6, some unresolved functions like
`_objc_retainAutoreleaseReturnValue` might end up in your Dylib.
Some reference about the issue:
1. http://stackoverflow.com/q
Albert Zeyer added the comment:
Thanks a lot for the long and detailed response! I didn't meant to start a
header war; I thought that my request was misunderstood and thus the header
changes were by mistake. But I guess it is a good suggestion to leave that
decision to a core dev.
I
Albert Zeyer added the comment:
I don't know that I have an expression and I want it also to work if it is not
an expression. Basically I really want the 'single' behavior. (My
not-so-uncommon use case: Have an interactive shell where the output on stdout
does not make sens
Albert Zeyer added the comment:
Btw., this turns out to be at least 4 kind of separate bugs:
1. The crash from the testcase - when the interpreter shuts down.
2. Maybe the crash from my musicplayer app - if that is a different one. But
very related to the first one.
3. Many loops over the
Albert Zeyer added the comment:
> > Wouldn't it be better to expose and re-use the HEAD_LOCK and HEAD_UNLOCK
> > macros from pystate.c?
> I don't like holding locks before calling "alien" code, it's a recipe
> for deadlocks: for example, if another th
Albert Zeyer added the comment:
> Wouldn't it be better to expose and re-use the HEAD_LOCK and HEAD_UNLOCK
> macros from pystate.c?
The macro-names HEAD_LOCK/HEAD_UNLOCK irritates me a bit. Protecting only the
head would not be enough. Any tstate object could be invalidated. But ac
Albert Zeyer added the comment:
Btw., where we are at this issue - I have seen many more loops over the threads
(via PyThreadState_Next). I have a bad feeling that many of these loops have
similar issues.
In this case, I am also not sure anymore that it really was a problem. I
originally
Albert Zeyer added the comment:
The symbols are there because it is a library which exports all the symbols.
Other debugging information are not there and I don't know any place where I
can get them.
It currently cannot work on Linux in the same way because the GUI is Cocoa only
righ
New submission from Albert Zeyer:
`compile(s, "", "single")` would generate a code object which
prints the value of the evaluated string if that is an expression. This is what
you would normally want in a REPL.
Instead of printing the value, it might make more sense to ret
Albert Zeyer added the comment:
Sadly, that is quite complicated or almost impossible. It needs the MacOSX
system Python and that one lacks debugging information.
I just tried with the CPython vom hg-2.7. But it seems the official Python
doesn't have objc bindings (and I also need
Albert Zeyer added the comment:
Here is one. Others are in the issue report on GitHub.
In Thread 5, the PyObject_SetAttr is where some attribute containing a
threading.local object is set to None. This threading.local object had a
reference to a sqlite connection object (in some TLS contextes
Albert Zeyer added the comment:
Note that in my original application where I encountered this (with sqlite),
the backtrace looks slightly different. It is at shutdown, but not at
interpreter shutdown - the main thread is still running.
https://github.com/albertz/music-player/issues/23
I was
Albert Zeyer added the comment:
The backtrace:
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x7fff8a54e386 __semwait_signal + 10
1 libsystem_c.dylib 0x7fff85e30800 nanosleep + 163
2 libsystem_c.dylib
Albert Zeyer added the comment:
The latest 2.7 hg still crashes.
--
___
Python tracker
<http://bugs.python.org/issue17263>
___
___
Python-bugs-list mailin
New submission from Albert Zeyer:
If you have some Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS in some tp_dealloc
and you use such objects in thread local storage, you might get crashes,
depending on which thread at what time is trying to cleanup such object.
I haven't fully figured ou
Albert Ferras added the comment:
also, it creates confusion when this happens
--
___
Python tracker
<http://bugs.python.org/issue16385>
___
___
Python-bugs-list m
Albert Ferras added the comment:
sorry: *it only allows me
--
___
Python tracker
<http://bugs.python.org/issue16385>
___
___
Python-bugs-list mailing list
Unsub
Albert Ferras added the comment:
I would use json, but it allows me to set list/strings, etc.. not python
objects like I'd want
--
___
Python tracker
<http://bugs.python.org/is
New submission from Albert Ferras:
I normally use dictionaries for configuration purposes in python, but there's a
problem where I have a dictionary with many key<->values and one of the keys is
repeated.
For example:
lives_in = { 'lion': ['Africa', 'Ameri
Albert Zeyer added the comment:
I don't quite understand. Shouldn't __getattr__ also work in old-style classes?
And the error itself ('staticmethod' object is not callable), shouldn't that be
impossible?
--
New submission from Albert Zeyer:
Code:
```
class Wrapper:
@staticmethod
def __getattr__(item):
return repr(item) # dummy
a = Wrapper()
print(a.foo)
```
Expected output: 'foo'
Actual output with Python 2.7:
Traceback (most recent call las
New submission from Albert Zeyer :
```
class Foo1(dict):
def __getattr__(self, key): return self[key]
def __setattr__(self, key, value): self[key] = value
class Foo2(dict):
__getattr__ = dict.__getitem__
__setattr__ = dict.__setitem__
o1 = Foo1()
o1.x = 42
print(o1, o1.x)
o2
New submission from Chase Albert :
My expectation was that range(2,5) == range(2,5), and that they should hash the
same. This is not the case.
--
messages: 147838
nosy: rob.anyone
priority: normal
severity: normal
status: open
title: Ranges cannot be meaningfully compared for equality
Albert Zeyer added the comment:
You might have opened several via `openpty`.
I am doing that here: https://github.com/albertz/PyTerminal
--
___
Python tracker
<http://bugs.python.org/issue12
Albert Zeyer added the comment:
Even more problematic: The readline lib itself is absolutely not designed in a
way to be used from multi threads at once.
--
___
Python tracker
<http://bugs.python.org/issue12
New submission from Albert Zeyer :
PyOS_StdioReadline from Parser/myreadline.c is printing the prompt on stderr.
I think it should print it on the given parameter sys_stdout. Other readline
implementations (like from the readline module) also behave this way.
Even if it really is supposed to
1 - 100 of 138 matches
Mail list logo