Change by desbma :
--
nosy: -desbma
___
Python tracker
<https://bugs.python.org/issue25625>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by desbma :
--
nosy: +desbma
___
Python tracker
<https://bugs.python.org/issue5811>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by desbma :
--
nosy: +desbma
___
Python tracker
<https://bugs.python.org/issue37157>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by desbma :
--
nosy: +desbma
___
Python tracker
<https://bugs.python.org/issue31749>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by desbma :
--
nosy: +desbma
___
Python tracker
<https://bugs.python.org/issue36046>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
desbma added the comment:
If you do a benchmark by reading from a file, and then writing to /dev/null
several times, without clearing caches, you are measuring *only* the syscall
overhead:
* input data is read from the Linux page cache, not the file on your SSD itself
* no data is written
desbma added the comment:
Your first link explains why 128kB buffer size is faster in the context of cp:
it's due to fadvise and kernel read ahead.
None of the shutil functions call fadvise, so the benchmark and conclusions are
irrelevant to the Python buffer size IMO.
In general
desbma added the comment:
copy2 always raises "OSError: [Errno 95] Operation not supported" here
https://github.com/python/cpython/blob/9bb6fe52742340f6c92f0dda18599a4577a94e18/Lib/shutil.py#L258
but I can work around that by passing copy_function=shutil.copy to copytree as
I
desbma added the comment:
Note that in the examples above both copytree calls actually succeed (only
metadata copy failed).
The user can disable file metadata copy by passing 'copy_function=shutil.copy',
but there is no way to do the same for directories and the directory copy
desbma added the comment:
Traceback is not very useful in that case:
mkdir /tmp/a
touch /tmp/a/b
python
Python 3.6.6 (default, Jun 27 2018, 13:11:40)
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more informat
desbma added the comment:
> Since the `copy_function` is customizable to switch between `copy` and
> `copy2`, making copystat optional on files, perhaps the `copystat` should be
> optional on directories, as well.
Related: https://bugs.python.org/issue32073
--
nosy
Change by desbma :
--
nosy: -desbma
___
Python tracker
<https://bugs.python.org/issue33671>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
desbma added the comment:
Honestly, whatever gets this thing moving forward is good with me.
I'm a bit depressed by the number of issues here that have a good patch waiting
to be merged, or even read, and that languish for years.
I haven't read your patch in detail, but if others
desbma added the comment:
Duplicate of https://bugs.python.org/issue25156 ?
--
___
Python tracker
<https://bugs.python.org/issue33639>
___
___
Python-bugs-list m
desbma added the comment:
Ping
--
___
Python tracker
<https://bugs.python.org/issue32073>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by desbma :
--
keywords: +patch
pull_requests: +4394
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32073>
___
___
Python-
New submission from desbma :
I am sometimes using shutil.copytree to copy a directory to a destination that
does not support setting metadata (like MTP mounts of Android devices).
Using the copy_function parameter allows passing shutil.copy or a custom
function to ignore file metadata
desbma added the comment:
I just want to say that I strongly support either bumping the value of
FD_SETSIZE to something a lot higher than 512, or making it configurable from
Python code.
I am the author of a program that makes heavy use of asyncio. Some Windows
users have reported errors
desbma added the comment:
Gregory, please don't forget to backport the fix in the 3.6 branch, so that it
is released with Python 3.6.3.
Thank you
--
___
Python tracker
<http://bugs.python.org/is
Changes by desbma :
--
nosy: +desbma
___
Python tracker
<http://bugs.python.org/issue26826>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
desbma added the comment:
Thanks for the insight.
Well the most logical thing for me for the OS to do, would have been:
1. Send an ARP request
2. At the first poll call, report a timeout if no response was received
3. Repeat to 2. until the destination is considered unreachable
4. At the next
desbma added the comment:
Yes, you are right: I tried with a small C program, and compared with strace
log of the Python program.
In both cases poll sometimes returns -1 (error), or sometimes 0 (timeout).
This is a weird behavior (at least for me) of the TCP stack, but clearly Python
is not
New submission from desbma:
When trying to connect a classic TCP socket to a non reachable peer, the
exception reported is inconsistent if the socket has a timeout set.
See the attached program, on my system (Arch Linux with Linux 4.9 & Python
3.6.2) it outputs:
timeout timed out
tim
desbma added the comment:
Thank you Gregory for the insight and new patch.
Can this be merged in the 3.6 branch as well (targeting the 3.6.3 release)?
--
___
Python tracker
<http://bugs.python.org/issue29
desbma added the comment:
Ping.
I think any change, included Inada Naoki's idea above is better that the
current behavior that pollutes the logging module output.
Unfortunately I cannot rely on the 3.6 new thread_name_prefix argument for
portability reasons, and have to manually pat
Changes by desbma :
--
pull_requests: +2018
___
Python tracker
<http://bugs.python.org/issue28206>
___
___
Python-bugs-list mailing list
Unsubscribe:
desbma added the comment:
The only issue with Python itself is that the output of a subprocess call
hidden behind a high level abstraction is thrown into the user's face in an
unexpected way.
This just does not seem to be the right thing to do to me.
The deprecation warning of xdg-open
desbma added the comment:
> For example, thanks to stdout/stderr, you noticed the warning. Without
> stdout/stderr, the warning should be hidden.
That is true, but as a Python user, it don't need to see that warning, only the
xdg-utils developers do.
I would have never seen it, a
desbma added the comment:
Why do you think this isn't a good idea?
As a user, what am supposed to do with that warning:
* about a program I have no idea I was calling (the webbrowser module
abstraction is here so I don't have to think about it)
* I have no control about it's i
desbma added the comment:
Ping
--
___
Python tracker
<http://bugs.python.org/issue30219>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
desbma added the comment:
Also most other Popen calls in the webbrowser module already silence the called
program's output, so it makes sense to do the same for the BackgroundBrowser
class.
Here is a small patch for discussion.
--
keywords: +patch
Added file: http://bugs.pytho
desbma added the comment:
I'm on Arch Linux with Cinnamon, all packages up to date and xdg-utils 1.1.1
(https://www.archlinux.org/packages/extra/any/xdg-utils/).
The fix you mention has not been included in a release yet, last release of
xdg-utils is from 2015 (
Changes by desbma :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue30219>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from desbma:
Python 3.6.1 (default, Mar 27 2017, 00:27:06)
[GCC 6.3.1 20170306] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser
>>> webbrowser.open("https://www
desbma added the comment:
Ping, so that this has a chance for the 3.6.1 release.
--
___
Python tracker
<http://bugs.python.org/issue29212>
___
___
Python-bug
desbma added the comment:
I don't think using repr(self) as a fallback was intentional, that is why I
wrote regression, but I may be wrong.
I agree that the previous default 'Thread-x' gives little information, but only
the user can give a relevant name to describe what a
desbma added the comment:
Ping
--
___
Python tracker
<http://bugs.python.org/issue29212>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
desbma added the comment:
Thoughts anyone?
This is a minor bug, but for a common use case (easy to hit), and the fix is
trivial.
--
___
Python tracker
<http://bugs.python.org/issue29
Changes by desbma :
--
components: +Library (Lib)
versions: +Python 3.7
___
Python tracker
<http://bugs.python.org/issue29212>
___
___
Python-bugs-list mailin
desbma added the comment:
Here is a patch that restores the previous behavior and update test to catch
bogus naming.
--
keywords: +patch
Added file: http://bugs.python.org/file46224/issue29212_1.patch
___
Python tracker
<http://bugs.python.
desbma added the comment:
The bug seem to have been introduced by
https://hg.python.org/cpython/rev/1002a1bdc5b1
--
___
Python tracker
<http://bugs.python.org/issue29
New submission from desbma:
Logging statement using 'threadName' from concurrent.futures threads produce
the wrong output with Python 3.6.
The attached program with Python 3.5.X outputs:
MainThread From main thread
Thread-1 From worker thread
But with 3.6, it outputs:
MainThread
Changes by desbma :
--
title: Don't call sendto in socketserver.DatagramRequestHandler if there is
nothing to send -> Catch FileNotFoundError in
socketserver.DatagramRequestHandler
___
Python tracker
<http://bugs.python.org
desbma added the comment:
OK, so first part of this issue (sendto called even if no data has been
written) is indeed a duplicate of https://bugs.python.org/issue1767511 sorry
for that.
For the second part of the issue (the exception not silenced), I have attached
a new patch
Changes by desbma :
--
nosy: +desbma
___
Python tracker
<http://bugs.python.org/issue1767511>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Changes by desbma :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue26403>
___
___
Python-bugs-list mailing list
Unsubscrib
Changes by desbma :
--
title: Don't call sendto in DatagramRequestHandler if there is nothing to send
-> Don't call sendto in socketserver.DatagramRequestHandler if there is nothing
to send
___
Python tracker
<http://bugs.pytho
Changes by desbma :
--
components: +Library (Lib) -Macintosh
keywords: +patch
Added file: http://bugs.python.org/file41991/issue26403.patch
___
Python tracker
<http://bugs.python.org/issue26
New submission from desbma:
When using socketserver to create a simple server for Unix Domain sockets (see
server_dgram.py), and when sending data with a client that immediately shuts
down (without waiting for a response, on Linux I test with 'echo data | nc -Uu
-w 0 /tmp/s.socket
desbma added the comment:
If anyone is interested, I have created a package to monkey patch
shutil.copyfile to benefit from sendfile, similarly to the last patch, but it
also works on older Python versions down to 2.7.
PyPI link: https://pypi.python.org/pypi/pyfastcopy
desbma added the comment:
Can this patch be merged, or is there something I can do to improve it?
--
___
Python tracker
<http://bugs.python.org/issue25
desbma added the comment:
Thank you SilentGhost for the second review on the v4 patch.
Attached is the v5 patch which hopefully is getting even better.
--
Added file: http://bugs.python.org/file41252/issue25156_v5.patch
___
Python tracker
<h
desbma added the comment:
Here is a new patch, with changes suggested by SilentGhost and josh.rosenberg
in the review.
--
Added file: http://bugs.python.org/file41243/issue25156_v4.patch
___
Python tracker
<http://bugs.python.org/issue25
desbma added the comment:
Ping
A small patch, but a good performance improvement :)
--
___
Python tracker
<http://bugs.python.org/issue25156>
___
___
Python-bug
desbma added the comment:
I'm not a Python core developer, but a few thoughts:
* this is not thread safe
* subprocess.Popen already has a cwd parameter for similar purpose
--
nosy: +desbma
___
Python tracker
<http://bugs.python.org/is
desbma added the comment:
I guess the question is whether Enum should be considered a first class
'native' type that deserves support in argparse, or just a tool among others in
the stdlib.
The fact that Enum is implemented as a class, and lives in a module, tends to
lead to the s
desbma added the comment:
I came up with something that satisfies my needs (no boilerplate code, and
intuitive add_argument call).
I modified your factory, and defined a simple action class (this is a quick and
dirty prototype for discussion, I am in no way asking that such thing should be
desbma added the comment:
Here is an updated patch that takes into account Martin's suggestions, both
here and in the code review.
--
Added file: http://bugs.python.org/file40911/issue25156_v3.patch
___
Python tracker
<http://bugs.py
desbma added the comment:
Here is an improved patch with the following changes:
* Fallback to copyfileobj if sendfile fails with errno set to EINVAL or ENOSYS
* Add a test for > 4GB file
--
Added file: http://bugs.python.org/file40906/issue25156_v2.pa
desbma added the comment:
I played a bit with Unix domain sockets, and it appears you can not open them
like a file with open().
So they do no work with the current implementation of shutil.copyfile anyway.
--
___
Python tracker
<h
desbma added the comment:
Thanks for the comment.
> Also, the os.sendfile() doc suggests that some platforms only support writing
> to sockets, so I definitely think a backup plan is needed.
You are right, the man page clearly says:
> Applications may wish to fall back to read(2)/wr
desbma added the comment:
Thoughts anyone?
Here is a patch that implements the change.
My tests show a 30-40% performance improvement for 128KB-512MB single file copy:
128 KB file copy:
$ dd if=/dev/urandom of=/tmp/f1 bs=1K count=128
Without the patch:
$ ./python -m timeit -s 'import s
desbma added the comment:
I was actually writing a patch with a test, but since Stéphane beat me to it,
I'll let him do the job :)
--
___
Python tracker
<http://bugs.python.org/is
New submission from desbma:
telnetlib.Telnet could have a context manager to call close() automatically.
I can provide a patch if the idea is approved, although I have never
contributed to Python.
--
components: Library (Lib)
messages: 253489
nosy: desbma
priority: normal
severity
desbma added the comment:
Previous sentence is if we only mention 3.4.3 of course.
--
___
Python tracker
<http://bugs.python.org/issue25238>
___
___
Python-bug
desbma added the comment:
In my mind 3.4.3 < 3.5, so unless mentioned otherwise it is implied that the
change is in all versions of the 3.5 branch.
--
___
Python tracker
<http://bugs.python.org/issu
New submission from desbma:
Doc of 3.4 branch says the context parameter for xmlrpc.client.ServerProxy was
added at version 3.4.3:
https://docs.python.org/3.4/library/xmlrpc.client.html?highlight=xmlrpc.client#module-xmlrpc.client
Although doc of 3.5 branch says the context parameter for
desbma added the comment:
Additional advantage of calling sendfile from shutil.copyfile: other fonctions
in shutil module would automatically benefit from the use of senfile because
they call copyfile directly (copy, copy2) or indirectly (copytree).
So for example, the performance of
New submission from desbma:
This is related to issue25063 (https://bugs.python.org/issue25063).
Trying to use sendfile internally in shutil.copyfileobj was considered risky
because of special Python files that expose a file descriptor but wrap it to
add special behavior (eg: GzipFile).
I
desbma added the comment:
Thanks for sharing this code, I like the factory idea.
I'll have a look at creating a custom Action class too.
--
___
Python tracker
<http://bugs.python.org/is
desbma added the comment:
> With my type function, the string input is converted to an enum object and
> that is stored in the Namespace. You can't be any more direct than that.
Yes I know, but in that case it's missing the autogenerated help message with
the possible choice
desbma added the comment:
If I understand you correctly, a naive implementation like this:
use_chunk_copy = False
try:
fdsrc = fsrc.fileno()
fddst = fdst.fileno()
except OSError:
# fallback on current chunk based Python copy
use_chunk_copy = True
else:
# we have 2 fd, try sendfile
desbma added the comment:
I would like the enum type to be stored directly.
With your approach, the user does not know what are the possible choices, until
he/she tries a invalid value and get the exception. If I pass the enum type to
the choice parameter, the help message is not very user
New submission from desbma:
Sorry if it has already been discussed, or if this is a stupid idea.
By looking at the signature, my thought was that the only use of
shutil.copyfileobj was to wrap the use of sendfile, and use a fallback if it is
not available on the system or not usable with
Changes by desbma :
--
components: +Library (Lib)
___
Python tracker
<http://bugs.python.org/issue25061>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by desbma :
--
nosy: +desbma
___
Python tracker
<http://bugs.python.org/issue3548>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
New submission from desbma:
I often find myself using the following pattern with argparse:
import argparse
import enum
CustomEnumType = enum.Enum("CustomEnumType",
("VAL1", "VAL2", "VAL3", ...))
arg_parser = argparse.Argumen
77 matches
Mail list logo