New submission from Aviv Palivoda:
The logging LogRecord factory receives kwargs. However because _log and
makeRecord functions in the Logger class don't support kwargs we can't actually
pass additional positional arguments to LogRecord.
A use case for this is attached.
I had made a patch
Aviv Palivoda added the comment:
adding the patch :)
--
keywords: +patch
Added file: http://bugs.python.org/file41554/LogRecordFactoryKwargs.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Aviv Palivoda added the comment:
Added patch with my suggestion for sqlite3.Cursor.connection attribute
documentation
--
assignee: -> docs@python
components: +Documentation, Extension Modules -Library (Lib)
keywords: +patch
nosy: +docs@python, ghaering, palaviv
versions: +Python
New submission from Aviv Palivoda:
When socketserver.BaseServer.verify_request() return False then we do not call
shutdown_request. If we will take the TCPServer as example we will call
get_request thus calling socket.accept() and creating a new socket but we will
not call shutdown_request
Aviv Palivoda added the comment:
Had a small mistake in the previous patch (did not notice process_request) call
shutdown_request.
fixed the patch
--
Added file:
http://bugs.python.org/file41856/socketserver-shutdown-if-verify-false2.patch
Aviv Palivoda added the comment:
Thanks for the review.
1. Changed "bytes" to "data".
2. Updated Doc as in issue 26244 (will update the patch if there will be
changes there).
3. Added version changed notice but i don't think there is a need for What's
new update.
---
Aviv Palivoda added the comment:
I think that we can leave the level=-1 as the default in the documentation.
What should be added is what Z_DEFAULT_COMPRESSION means.
I tried to be as close as possible to the zlib module documentation.
--
Added file: http://bugs.python.org/file41766
Aviv Palivoda added the comment:
I did the needed changes for the pull request at pysqlite for porting to
python3. I will continue updating the patch if there will be changes in
pysqlite and vice versa.
--
keywords: +patch
Added file: http://bugs.python.org/file41798/blob.patch
Aviv Palivoda added the comment:
I opened a pull request for blob support in the pysqlite github repository:
https://github.com/ghaering/pysqlite/pull/93
I will do the needed changes for python3 and will post a patch soon.
--
___
Python tracker <
Aviv Palivoda added the comment:
Added the "suggested" test
--
Added file: http://bugs.python.org/file41797/zlib-compress-level-keyword3.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.py
Aviv Palivoda added the comment:
Updated the patch:
1. Did the changes requested in the CR.
2. Changed the example's in wsgiref.simple_server to use context manager.
3. Added What's New entry.
--
Added file: http://bugs.python.org/file42016/socketserver_context_manager3.patch
Aviv Palivoda added the comment:
I understand the problem and why this patch should be rejected.
--
resolution: -> rejected
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Aviv Palivoda added the comment:
updated the patch according to the CR comments.
--
Added file: http://bugs.python.org/file42030/socketserver_context_manager4.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Aviv Palivoda added the comment:
The examples did not close the server but I am not sure if that was a mistake.
The server is not being closed only on examples where it is expected to run
until there is a keyboard interrupt. However you can see that when you send
keyboard interrupt
Aviv Palivoda added the comment:
Only closing the server :).
1. Did the changes requested in the CR.
2. Changed the example's in xmlrpc.server, http.server to use context manager.
3. Changed the xmlrpc.server, http.server server implementation when running
python -m {xmlrpc.server, http.server
New submission from Aviv Palivoda:
I am running the following script:
--
>>> import sqlite3
>>> import os
>>> import time
>>> con1 = sqlite3.connect("/tmp/test.db")
>>> con2 = sqlite3.connect(&qu
Changes by Aviv Palivoda <pala...@gmail.com>:
--
nosy: +palaviv
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24905>
___
__
Aviv Palivoda added the comment:
I changed the test to just check that shutdown_request is called. Hope this is
more clear then the previous test.
--
Added file:
http://bugs.python.org/file41930/socketserver-shutdown-if-verify-false4.patch
New submission from Aviv Palivoda:
Currently if you call server_close you only close the socket. If we called
serve_forever and then call server_close without calling shutdown the
serve_forever loop keep running. Before using the selectors module for doing
the poll we would have had
New submission from Aviv Palivoda:
I am suggesting adding random.shuffled to the random module. This is very
similar to the shuffle function just return a new shuffled list instead of in
place shuffle. This is very similar to the sorted and list.sort.
As you can see in the patch the shuffled
Aviv Palivoda added the comment:
I see your point about the server_close purpose and I changed the patch to
simulate the behavior of closed file (raising ValueError when operating on
closed file).
I don't think that this should be an enhancement as what i try to do is return
the behavior
New submission from Aviv Palivoda:
As Martin commented on my patch at issue 26392 the socketserver.server_close is
like the file close. That made me think that we should add a context manager to
the socketserver.
--
components: Library (Lib)
files: socketserver_context_manager.patch
New submission from Aviv Palivoda:
Currently all the stdlib logging handlers (except BufferingHandler) emit method
have the following structure:
def emit(self, record):
try:
// do the emit
except Exception:
self.handleError(record)
I suggest changing
Aviv Palivoda added the comment:
I see the backwards compatibility issue. I have two suggestion's how to improve
the code without breaking backwards compatibility:
1. Add a new Handler class named SafeHandler that will implement handle in the
way suggested in the previous patch. All
Changes by Aviv Palivoda <pala...@gmail.com>:
Added file: http://bugs.python.org/file42426/logging-handleException.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Aviv Palivoda added the comment:
Included is a patch with the suggested change.
I changed the TestCase.__str__ method to:
return "%s (%s.%s)" % (self._testMethodName, strclass(self.__class__),
self._testMethodName)
instead of
return "%s (%s)" % (self._testMetho
Aviv Palivoda added the comment:
Thanks for the review.
I don't have any use cases for this change. I just saw this issue while looking
for something else and thought I will give it a try.
--
Added file: http://bugs.python.org/file42285/25951-2.patch
Aviv Palivoda added the comment:
Changed SSLSocket.sendall() to return None. Also added a check of the return
value of the SSLSocket.send(), SSLSocket.sendall() in the tests.
--
keywords: +patch
nosy: +palaviv
Added file: http://bugs.python.org/file42278/25951.patch
New submission from Aviv Palivoda:
I am suggesting to add a command line interface to the hashlib module. A simple
example of the api I suggest is:
$ python -m hashlib md5 /bin/sh
$ d985d0ea551c1253c2305140c583d11f
A patch is included.
--
components: Library (Lib)
files: hashlib
Aviv Palivoda added the comment:
I fixed the tests to work with Steven patch. Also changed the patch to open
sys.std{in,out} with closefd=False.
I changed the 'io.StringIO' that we redirect the stdout, stderr to. Now the
'StdIOBuffer' return the real stdout,stderr when '-' is passed
Aviv Palivoda added the comment:
Publishing another patch after SilentGhost and Victor CR. I also changed the
block size to 256 KB. If someone can remove the dependency on issue 14156 (I
don't think I have permissions).
--
Added file:
http://bugs.python.org/file42347/hashlib-script
Aviv Palivoda added the comment:
Sorry on the late response for some reason i don't receive email notification
from the tracker for the past few days.
1) Thanks for the review SilentGhost the patch attached include your CR
suggestions.
2) Raymond I have fixed the problem with ctrl+D. I tried
Aviv Palivoda added the comment:
I am adding a new patch with a API compatible to GNU md5sum:
$ python -m hashlib md5 /bin/sh
$ d985d0ea551c1253c2305140c583d11f /bin/sh
I will soon add the feature's requested by Victor:
1) The check option.
2) Running the hash calculation for different
Aviv Palivoda added the comment:
I am adding a new patch with changes from Martin CR (Thanks for the review) and
support in the "check" option.
I also changed to examples in the Documentation to use sha256 instead of md5 as
Christian asked. I left one example with sha1 so when so
Changes by Aviv Palivoda <pala...@gmail.com>:
Added file:
http://bugs.python.org/file42337/hashlib-script-mod-md5sum-style-2.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Aviv Palivoda added the comment:
Thanks for the review SilentGhost. I am including the patch after the changes
from your CR comments.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Aviv Palivoda added the comment:
I actually have noticed issue 13824 while working on this issue. The patch I
uploaded to Issue 14156 actually fixes the problem in issue 13824 in addition
to the problem with the stdin/stdout.
I think we should add a dependency in issue 14156 for this issue
Aviv Palivoda added the comment:
Adding new patch after CR changes.
--
Added file:
http://bugs.python.org/file42355/hashlib-script-mod-md5sum-style-5.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Aviv Palivoda added the comment:
> * hashobj.readfile(filename: str)
> * hashobj.readfileobj(file) where file is an object with a read() method
> which returns bytes strings
I changed the API to the one Victor suggested.
> For readfile() it might make more sense to implement it d
Aviv Palivoda added the comment:
While working on issue 26488 I found a real need for this feature.
I added a new method to the hash object named fromfile(). The function update
the hash object with the content of the file like object it receives.
I only added the feature to hash algorithm
Aviv Palivoda added the comment:
I am not sure about the wide use of this feature but I do think this is a nice
feature to add to os.walk. I can see how you can implement is_too_deep by
counting the number of separators in the path. However I don't think it is
trivial to do that. In addition
Aviv Palivoda added the comment:
In regard to Raymond`s points I agree with Serhiy`s comments.
As for Serhiy`s doubts:
> 3. Using namedtuple is slower and consumes more memory than using tuple. Even
> for FS-related operation like os.walk() this can matter. A lot of code is
>
Aviv Palivoda added the comment:
Thanks for the response Ethan I think that I will leave the tests as they are
in the current patch.
> No doubt, there are exceptions to the rule in the standard library which is
> less consistent than we might like: "stat_result". That s
New submission from Aviv Palivoda:
I am suggesting that os.walk and os.fwalk will yield a namedtuple instead of
the regular tuple they currently yield.
The use case for this change can be seen in the next example:
def walk_wrapper(walk_it):
for dir_entry in walk_it:
if dir_entry[0
Aviv Palivoda added the comment:
This issue will be resolved when we change the sqlite3_prepare to
sqlite3_prepare_v2. So there should be a dependency on issue 9303.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Aviv Palivoda added the comment:
IMO this issue can be closed as the URI filename interface can be used instead
of the flags. The URI interface parameters can override the flags given as
specified in:
https://www.sqlite.org/c3ref/open.html
--
nosy: +palaviv
Aviv Palivoda added the comment:
I made a new patch to fix this issue. I left a fallback to the old API as Jim
suggested. In addition to the changes in Robin`s patch I changed sqlite3_close
to sqlite3_close_v2 if available.
This solves issue 26187 as well.
--
nosy: +palaviv
Added
New submission from Aviv Palivoda:
I am suggesting to add max_depth argument to os.walk. I think this is very
useful for two cases. The trivial one is when someone wants to walk on a
directory tree up to specific depth. The second one is when you follow symlinks
and wish to avoid infinite
New submission from Aviv Palivoda:
test_walk_topdown call os.walk directly instead of using self.walk. This test
currently run 3 time's while checking the same thing. The test should use
self.walk to check fwalk and Bytes as well.
--
components: Tests
files: os-test-walk-topdown-use
Changes by Aviv Palivoda <pala...@gmail.com>:
Added file: http://bugs.python.org/file42494/os-walk-max-depth-2.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Aviv Palivoda added the comment:
Pinging as mentioned in the devguide.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24905>
___
__
Aviv Palivoda added the comment:
Uploading patch after fixes from berker CR.
The `blob_open` API can can have the following options:
1. The table, column and row must be mandatory parameters.
2. The read/write permissions can have the following options:
a. No default (mandatory parameter
Aviv Palivoda added the comment:
Thanks for the CR Serhiy. Attached is a new patch after the fixes from the CR.
What other developers should I ask? The interface is file like and is the same
as apsw.
--
Added file: http://bugs.python.org/file46531/blob3.patch
Aviv Palivoda added the comment:
Pinging again. I think this would be a great enhancement to the sqlite module.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Aviv Palivoda added the comment:
There is also a issue with the docs here. Look at issue 29121.
--
nosy: +palaviv
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Aviv Palivoda added the comment:
Removed opening a transaction on select. I will argue for that in issue 9924
after this is resolved.
--
Added file: http://bugs.python.org/file46397/sqlite-ddl-dml-3.patch
___
Python tracker <rep...@bugs.python.
Aviv Palivoda added the comment:
I would just like to note that I think that the correct solution is to do an
implicit commit before:
1. VACUUM
2. ATTACH
3. DETACH
4. BEGIN
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.p
Aviv Palivoda added the comment:
I opened a PR in github. I tagged some other developers if that will not start
a discussion on the API I will post in the python-ideas.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.p
Changes by Aviv Palivoda <pala...@gmail.com>:
--
pull_requests: +244
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24905>
___
_
Aviv Palivoda added the comment:
I am not a DB expert but from a quick search I couldn't find a similar API. I
did find a few API's in other programming languages to sqlite blob:
1. https://jgallagher.github.io/rusqlite/rusqlite/blob/index.html
2. https://godoc.org/github.com/mxk/go-sqlite
Aviv Palivoda added the comment:
Uploading a new patch with fixes from Ma Lin comments.
Two points:
1. Should we add the VACUUM with a explicit commit? Maybe there should be an
implicit commit before VACUUM?
2. Should a SELECT start a transaction? I think it should according to PEP 249
Changes by Aviv Palivoda <pala...@gmail.com>:
--
nosy: +palaviv
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9924>
___
__
Aviv Palivoda added the comment:
Thanks for the review Serhiy. Attached is the updated patch after the changes.
--
Added file: http://bugs.python.org/file44142/blob2.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Aviv Palivoda added the comment:
Hi, is there anything more I need to do on this patch? If not do you think this
can be added in 3.6?
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Aviv Palivoda added the comment:
I opened a PR. This actually is a bugfix in addition to an enhancement as it
solves issue 26187 as well.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/
Aviv Palivoda added the comment:
Just to make sure when you say "sequence protocol" you thin about the doing
blob[4:6] = "ab"?
I actually think this is a nice feature. The Blob and the mmap object has a lot
in common so I think that making the same API will be best.
Aviv Palivoda added the comment:
I actually looked at the patch and have a few comments:
1. You need to put Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS before the
sqlite3 calls (especially the sleep).
2. I think that the `pysqlite_connection_backup` function will look a lot
better if you
Changes by Aviv Palivoda <pala...@gmail.com>:
--
pull_requests: +306
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9303>
___
_
Aviv Palivoda added the comment:
from https://www.sqlite.org/changes.html:
sqlite3_open_v2 - 2007-09-04 (3.5.0) alpha
sqlite3_prepare_v2 - 2007-01-04 (3.3.9)
sqlite3_close_v2 - 2012-09-03 (3.7.14)
In issue 29355 Ma Lin says that RHEL6 comes with SQLite 3.6.x. I think that
removing
Aviv Palivoda added the comment:
Attached is a new patch with the encoding problem fixed.
--
Added file: http://bugs.python.org/file44306/16379-2.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Aviv Palivoda added the comment:
Xiang what do you think about changing the isolation_levels list to
begin_statements list:
static const char * const begin_statements[] = {"BEGIN", "BEGIN DEFERRED",
"BEGIN IMMEDIATE", "BEGIN EXCLUSIVE", NULL};
Aviv Palivoda added the comment:
> Are the changes in the other ticket needed to implement new tests?
> Or is it possible to include tests here?
It is not possible to add any tests to this issue before exposing the error
code. I will implement new tests when issue 16379 will be re
Aviv Palivoda added the comment:
The only change I see that can happen is that we return upper case isolation
level when the user used a lower case. I think that it is worth to slow down
the getter for the code simplification.
--
___
Python tracker
Aviv Palivoda added the comment:
What do you think about removing the isolation_level member from the
pysqlite_Connection. It is only there to be for the
pysqlite_connection_get_isolation_level and that could be easily calculated
from the begin_statement.
--
Added file: http
Changes by Aviv Palivoda <pala...@gmail.com>:
Added file: http://bugs.python.org/file44331/16379-3.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Aviv Palivoda added the comment:
Attached is a patch to enable the extended error codes. This patch should be
dependent on issue 16379.
Without returning the sqlite error code in the exception the extended error
code does not reveal any information not currently available. As you can see
Aviv Palivoda added the comment:
The use case that made me think about this feature was when I was working on a
Windows PC and needed to calculate an md5 of a file. I agree that in a unix
environment there are existing tools but on windows you usually don't have them
Aviv Palivoda added the comment:
Attached is a patch based on Daniel last patch with the following changes:
* There is no errorcode mapping.
* The exception object has a error_name attribute.
I think this two changes should solve the API problems raised by Ezio and
Gerhard about the error
Aviv Palivoda added the comment:
Attached is patch with a fix for this issue. This is not as comprehensive as
the solution in apsw but I think this should cover most of the cases. The
result for Ronny dump after this fix is:
BEGIN TRANSACTION;
PRAGMA writable_schema=ON;
INSERT
Aviv Palivoda added the comment:
There are already a few test's that start a transaction explicitly:
In dbapi.SqliteOnConflictTests CheckOnConflictRollbackWithExplicitTransaction,
CheckOnConflictAbortRaisesWithExplicitTransactions which set ``isolation_level
= None``.
On the other hand
Changes by Aviv Palivoda <pala...@gmail.com>:
--
nosy: +palaviv
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8145>
___
__
Aviv Palivoda added the comment:
I searched in the sqlite tickets from something related to this issue and I
couldn't find anything. I wanted to check the sqlite-users mailing list to see
if anyone had already reported it but there is a problem in gmane archives.
I tried to find a good way
Changes by Aviv Palivoda <pala...@gmail.com>:
--
nosy: +palaviv
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28729>
___
__
Aviv Palivoda added the comment:
I looked into this error and I think the problem is the sqlite3_stmt_readonly
check in _pysqlite_query_execute (cursor.c line 517):
if (self->connection->begin_statement &&
!sqlite3_stmt_readonly(self->statement->st) &&a
Aviv Palivoda added the comment:
Pinging as mentioned in the devguide.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14156>
___
__
Aviv Palivoda added the comment:
I think that adding Serhiy patch in addition to the documentation improvement
in issue #8145 would be the best way to proceed. This will insure no regression
problems.
We can add a warning when someone try to use BEGIN, ROLLBACK, SAVEPOINT, and
RELEASE without
Aviv Palivoda added the comment:
Hi paul thanks for looking into this. First are you sure this is a bug in
python 2? If so I will happily port this patch once it is reviewed.
As for use cases you may look at issue #26488. Although the patch was rejected
you can see that I first used
Aviv Palivoda added the comment:
As we talk here about stdin and stdout which we don't want to close I think
this issue is irrelevant to python2. In any case the patch in issue #13824
cover that problem.
I actually write a lot of small scripts and if I need to open the file in
binary mode I
Aviv Palivoda added the comment:
Actually had a small mistake in the patch I uploaded. Uploading a fixed one.
--
Added file: http://bugs.python.org/file46166/29021-fixed.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.p
Aviv Palivoda added the comment:
I actually was wrong and there is no problem with the type that is returned
from the text_factory as it passes directly as argument for the create_function
function.
Attached is a patch that change create_function and create_aggregate to use the
text_factory
Aviv Palivoda added the comment:
Yes. If a transaction is open you will need to explicitly commit before doing
vacuum.
I am not sure if that was intentional or not. From quick look in the sqlite
source code there are few things that cannot happen from a transaction:
1. VACUUM
2. ATTACH
3
Aviv Palivoda added the comment:
After looking more into the _pysqlite_set_result function fail in Ingo example
I think this is the expected behavior. The PyUnicode_AsUTF8 fails but this is
expected as the value is an invalid UTF-8.
--
___
Python
Changes by Aviv Palivoda <pala...@gmail.com>:
--
nosy: +palaviv
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29006>
___
__
Aviv Palivoda added the comment:
Issue #29003 seems to be related to this one. I think that they can be solved
the same way as done in Serhiy patch but I would like to suggest a different
approach.
I suggest changing the check for DDL statement with a check for DML statement.
We actually
New submission from Aviv Palivoda:
commit 284676cf2ac8 changed the sqlite3 module so it will no longer implicitly
commit an open transaction before DDL statements. The docs have been updated
but there is still an incorrect paragraph that has not been removed.
Attached is a patch that remove
Aviv Palivoda added the comment:
Adding the vacuum test can't actually happen because the change in commit
284676cf2ac8 changed the API and we don't commit before non DML statements. I
opened a issue that will clarify the docs (#29121
Aviv Palivoda added the comment:
The problem is in _pysqlite_build_py_params function at connection.c. In case
we have text we do the following code:
case SQLITE_TEXT:
val_str = (const char*)sqlite3_value_text(cur_value);
cur_py_value = PyUnicode_FromString(val_str);
/* TODO
New submission from Aviv Palivoda:
I would like to suggest that the struct.Struct class will support addition. For
example you will be able to do:
>>> s1 = Struct(">L")
>>> s2 = Struct(">B")
>>> s3 = s1 + s2
>>> s3.format
b"&
Aviv Palivoda added the comment:
I have two use cases for this feature:
1.
struct a {
int a;
#ifdef VER2
unsigned int b;
#endif
}
Now I may do:
>>> ver1 = Struct("i")
>>> ver2 = ver1 + Struct("I")
2.
struct a {
int a;
union inner {
Changes by Aviv Palivoda <pala...@gmail.com>:
--
pull_requests: +723
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29903>
___
_
1 - 100 of 127 matches
Mail list logo