Géry added the comment:
With Berker Peksag's patch merged in 2016, in the default non auto-commit mode,
sqlite3 implicitly issues a BEGIN statement before any non SELECT statement not
already in a transaction, EXCEPT DDL statements, for backwards compatibility
reasons:
+/* For back
New submission from Géry :
This PR will apply the following changes on the [`__main__` module
documentation](https://docs.python.org/3.7/library/__main__.html):
- correct the phrase "run as script" by "run from the file system" (as used in
the [`runpy`](https://docs.
Géry added the comment:
@Aymeric Augustin
> While you're there, it would be cool to provide "connection.autocommit =
> True" as an API to enable autocommit, because "connection.isolation_level =
> None" isn't a good API at all -- it's very obs
New submission from Géry :
In non-autocommit mode (manual commit mode), the sqlite3 database driver
implicitly issues a BEGIN statement before each DML statement (INSERT, UPDATE,
DELETE, REPLACE) not already in a database transaction, BUT NOT before DDL
statements (CREATE, DROP) nor before
Change by Géry :
--
title: Add an autocommit property to sqlite3.Connection with truly PEP 249
compliant manual commit mode and migrate -> Add an autocommit property to
sqlite3.Connection with a PEP 249 compliant manual commit mode and migr
Géry added the comment:
@R. David Murray
> Please open a new issue for this request.
Done here: https://bugs.python.org/issue39457
--
___
Python tracker
<https://bugs.python.org/issu
Géry added the comment:
> - Remove the value None of the isolation_level property, so that the old
> manual commit mode disappears.
Correction:
- Remove the value None of the isolation_level property.
--
___
Python tracker
Géry added the comment:
> - Remove the value None of the autocommit property and its deprecation
> warning.
Correction:
- Remove the value None of the autocommit property and its deprecation warning,
so that the old manual commit mode disa
New submission from Géry :
Mathematically, the [binary
relation](https://en.wikipedia.org/wiki/Binary_relation) ≤ is the
[union](https://en.wikipedia.org/wiki/Binary_relation#Union) of the binary
relations < and =, while the binary relation ≥ is the union of the binary
relations > and
Géry added the comment:
Thanks for the reference @Raymond. I could not find any mention of the union
relationships for ≤ and ≥ though. Since they are always valid for Boolean
values, in the same way that ≠ is always the complement of = for Boolean values
and default implemented as such in
Géry added the comment:
Note that other relationships are always valid _and already implemented by
default in the interpreter (through the `NotImplemented` return value
protocol)_: = is the
[converse](https://en.wikipedia.org/wiki/Binary_relation#Converse) of itself, ≠
is the converse of
Géry added the comment:
More precisely:
The following relationships are always valid and therefore implemented by
default in Python (_except for the union relationships, which seems arbitrary
and is the reason of this Python issue_):
- 2 [complementary](https://en.wikipedia.org/wiki
Géry added the comment:
> If this ever gets implemented, "autocommit" would be a terrible name for it.
> That word has a very specific meaning in SQLite, which is essentially the
> same as "not in a transaction started with BEGIN ...".
Yes if you are talking abou
Géry added the comment:
@james.oldfield
> What that answer doesn't mention is that, even with even with
> isolation_mode=None, it's perfectly possible to start a transaction, which
> takes the SQLite engine out of autocommit mode.
Exactly, so since autocommit=Tr
Géry added the comment:
Thanks for your extended review Steven.
> You state that these two phrases are from the runpy documentation:
>
> * "run from the module namespace"
> * "run from the file system"
>
> but neither of those phrases appear in t
Géry added the comment:
I agree with you Terry. Another thing that bothers me: in the current document,
the __main__ module is reduced to its environment (aka context or dictionary),
whereas a module object has other important attributes such as its code.
So how about adding the following
New submission from Géry :
Nicholas, I have noticed that `runpy.run_path` alters `sys.path` as expected
for a file_path argument which is a valid `sys.path` entry (typically a
directory or zip file). That is to say it adds the file_path argument to the
beginning of `sys.path`, like `python
Géry added the comment:
Alright @rhettinger, here is the post:
https://discuss.python.org/t/add-missing-default-implementations-of-le-and-ge/5327
--
___
Python tracker
<https://bugs.python.org/issue39
Change by Géry :
--
nosy: +cheryl.sabella -eric.araujo, ezio.melotti, willingc
title: Correct a statement about sys.exc_info() values restoration -> Correct
the description of sys.exc_info() and add a code example
type: -> enhancement
versions: +Python 3.6, Python 3.8, Pyth
Géry added the comment:
Thanks @barry for reviewing and merging PR 15190
> I haven't merged PR 10016, but I left some additional comments. Are you
> still interested in shepherding this PR?
Also thanks for helping me with @ericsnowcurrently advancing this last PR. Yes
I am still
Change by Géry :
--
pull_requests: +21866
pull_request: https://github.com/python/cpython/pull/22934
___
Python tracker
<https://bugs.python.org/issue37
Change by Géry :
--
versions: +Python 3.9 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue37203>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Géry :
--
resolution: not a bug -> fixed
___
Python tracker
<https://bugs.python.org/issue37203>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Géry :
Could we allow arbitrary expressions in the @expression syntax for applying
decorators to functions/classes? The current grammar restriction to:
decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE
is very surprising a
Géry added the comment:
@Jeroen Demeyer
> I'm sorry to say that you're wrong here. super() looks at the MRO of the type
> of the object (the second argument) (*).
Exactly! It is funny because I was about to open the same issue this weekend.
The documentation of super
Géry added the comment:
@Christian Heimes
> The reasons are explained at:
Yes I read that. But I am wondering if after 15 years Guido still has this "gut
feeling". Because my gut feeling as a Python *user* who has discovered
decorators and stumbled on this restricti
Géry added the comment:
@Steven D'Aprano
> What matters is the __mro__ attribute of the first argument. It matters
because that is how the MRO actually is searched.
By the way, if it was true (it is not), then what did you think was the purpose
of the second parameter of super(type
Géry added the comment:
@Guido van Rossum
> What you want to write is as unreadable as it ever was.
How is @g(f()()) more readable than @f()()? Yet the former is allowed.
--
resolution: wont fix ->
status: closed -> open
___
Pytho
Géry added the comment:
@Steven D'Aprano
> But neither can it *only* look at the MRO of the second class, because that
> would restart the search at the top of the hierarchy; also if type(second
> argument) was the only thing that mattered, that would make the first
> argum
New submission from Géry :
With the current Python equivalent `ClassMethod` implementation of
`classmethod` given in Raymond Hettinger's _Descriptor HowTo Guide_, the
following code snippet:
```
class A:
@ClassMethod
def f(cls, *, x): pass
print(A.f)
A.f(x=3)
```
prints:
>
Géry added the comment:
@Raymond Hettinger
> Though less accurate, the current version communicates better
I agree that types.MethodType is more accurate but may be less understandable.
But in this case I think that the Function class for emulating instance methods
should not
Géry added the comment:
@Raymond Hettinger
> The goal in the descriptor how-to is to give an understanding of how
> descriptors work.
Okay. So I don't know if that was clear in my last message but that also means
replacing the current "Function" implementation:
New submission from Géry :
In the `concurrent.futures` standard module, the number of running calls in a
`ProcessPoolExecutor` is `max_workers + 1` (unexpected) instead of
`max_workers` (expected) like in a `ThreadingPoolExecutor`.
The following code snippet which submits 8 calls to 2 workers
New submission from Géry :
The following code hangs forever instead of printing "called" 10 times:
from concurrent.futures import ProcessPoolExecutor
class A:
def f(self):
print("called")
class B(A):
def f(self):
Change by Géry :
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/issue37294>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Géry added the comment:
@Andrew Svetlov
Well this was just an example for illustrating the issue. In real code I need
this to create `ThreadPoolMixin` and `ProcessPoolMixin` classes (similar to the
`socketserver.ThreadingMixIn` and `socketserver.ForkingMixIn` classes in the
standard library
Géry added the comment:
And like the `concurrent.futures` module for
`concurrent.futures.ProcessPoolExecutor` but not for
`concurrent.futures.ThreadPoolExecutor` (see above), the `multiprocessing.pool`
module seems also affected by a similar problem for `multiprocessing.pool.Pool`
(process
Change by Géry :
--
nosy: +maggyero
___
Python tracker
<https://bugs.python.org/issue37297>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by Géry :
--
nosy: +brett.cannon, pitrou, rhettinger, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue37297>
___
___
Python-bugs-list m
Géry added the comment:
As you stated on Stackoverflow, the fact that the function `A.f` becomes the
function `B.f` after a pickling-unpickling sequence creates an infinite
recursive call of `B.f` in worker processes started with
`multiprocessing.pool.Pool().apply(super().f)` or
Géry added the comment:
George Xie found the root cause of this issue (a bug in the function
method_reduce in cpython/Objects/classobject.c):
https://stackoverflow.com/questions/56609847/why-do-concurrent-futures-processpoolexecutor-and-multiprocessing-pool-pool-fail/56614748#56614748
and he
Change by Géry :
--
nosy: +asvetlov, christian.heimes, vstinner
___
Python tracker
<https://bugs.python.org/issue37297>
___
___
Python-bugs-list mailing list
Unsub
Géry added the comment:
@George Xie
There is an issue with the Python workaround
`multiprocessing.reduction.register(types.MethodType, my_reduce)` that you
proposed. If you then instantiate a `multiprocessing.Manager()` you get this
exception:
> python
Python 3.7.3 (v3.7.3:ef4ec6ed12,
Géry added the comment:
The previous `_pickle.PicklingError` seems to only affect Windows.
--
___
Python tracker
<https://bugs.python.org/issue37297>
___
___
Géry added the comment:
I am having the same blocked signal issue on Windows when using Thread.join.
This program does not print "interrupted" after pressing Ctrl+C:
import threading
import time
def f():
while True:
print("processing")
time.sl
Géry added the comment:
@Julien, @Barry
Now that the PRs are merged, I think that we can close this issue.
--
___
Python tracker
<https://bugs.python.org/issue35
Géry added the comment:
Oops, sorry, only one of the two PRs has been merged.
--
___
Python tracker
<https://bugs.python.org/issue35181>
___
___
Python-bug
Géry added the comment:
Initial post: https://stackoverflow.com/q/56587166/2326961
--
___
Python tracker
<https://bugs.python.org/issue37276>
___
___
Python-bug
Géry added the comment:
@Ned Deily
Okay, I did not know if I had to list the potentially interested people
(according to their Github contribution on the module for instance) or let them
do it themselves. Thank you for clarifying.
@Carol Willing
The number of RUNNING futures is always
Géry added the comment:
@Pablo Galindo Salgado
Thank you for the debugging information. I would have expected 8 "Adding a new
item to the call_queue" instead of 3, since I submitted 8 calls to the process
pool.
The concurrent.futures._base module defines 5 future states:
> _
Géry added the comment:
@Andrew Svetlov
> Adding a new state for "not running and not pending but something in between"
> is useless
I have not suggested that. I have just reported that when the number of
submitted calls is strictly greater than the number of pool worker
New submission from Géry :
Analysis
In the next two sections showing the module attributes and corresponding spec
attributes of imported modules and run modules, we notice the following rule
(which is in accordance with this `PEP 451 section
<https://www.python.org/dev/peps/pep-0
Géry added the comment:
@Brett Cannon
> PEPs actually become historical documents once they are implemented
Actually the inconsistency of the values of the 3 module attributes
(``__file__``, ``__cached__`` and ``__package__``) is with respect to the other
values within the curr
Change by Géry :
--
nosy: +eric.snow -eric.smith
___
Python tracker
<https://bugs.python.org/issue37519>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Géry :
--
pull_requests: +14922
pull_request: https://github.com/python/cpython/pull/15190
___
Python tracker
<https://bugs.python.org/issue35
New submission from Géry :
The page https://docs.python.org/3/ lists these two parts:
- Library Reference
- Language Reference
So both parts are "references".
However in the cpython GitHub repository, the Doc/ directory contains these two
directories:
- library/
- reference/
Change by Géry :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue37799>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Géry :
--
assignee: docs@python
components: Documentation
nosy: docs@python, eric.snow, maggyero
priority: normal
pull_requests: 14923
severity: normal
status: open
title: Clean up the documentation on module attributes
type: enhancement
versions: Python 3.7
New submission from Géry :
I have just read PEP 7 and noticed that its line-breaking recommandation in
presence of binary operations seems to contradict its analogue in PEP 8 which
follows Knuth's rule.
PEP 7 (https://www.python.org/dev/peps/pep-0007/#code-lay-out):
> When you brea
Change by Géry :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue35181>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Géry added the comment:
@barry You gave 2 reasons for changing __spec__.origin and __file__ for
namespace packages.
Your 1st reason:
> I don't particularly like that its origin is "namespace". That's an odd
> special case that's unhelpful to test again
New submission from Géry :
How to reproduce:
Assign the __spec__.has_location attribute of any module.
Observed result:
__spec__.has_location is a writable.
Expected result:
__spec__.has_location should be read-only, as defined in PEP 451:
https://www.python.org/dev/peps/pep-0451/#attributes
Change by Géry :
--
nosy: -maggyero
___
Python tracker
<https://bugs.python.org/issue35320>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
New submission from Géry :
How to reproduce:
In Python:
> import _frozen_importlib
> print(_frozen_importlib.__spec__.origin)
Observed result:
The __spec__.origin attribute of the _frozen_importlib module is None.
Expected result:
The __spec__.origin attribute of the _frozen_importlib
Change by Géry :
--
nosy: +maggyero
___
Python tracker
<https://bugs.python.org/issue35320>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Géry added the comment:
Guido, could we add those missing __subclasshook__ for consistency?
--
nosy: +gvanrossum, maggyero
___
Python tracker
<https://bugs.python.org/issue23
Change by Géry :
--
nosy: +maggyero, mdk, xtreak
versions: +Python 3.7
___
Python tracker
<https://bugs.python.org/issue35640>
___
___
Python-bugs-list mailin
New submission from Géry :
In the logging package, the parameter disable_existing_loggers used in
logging.config.dictConfig and logging.config.fileConfig does not apply to the
root logger. More precisely, its disabled attribute remains unchanged (while it
is set to True for non-root loggers
New submission from Géry :
In the documentation of the try statement
(https://docs.python.org/3/reference/compound_stmts.html#the-try-statement), I
think that the sentence:
"sys.exc_info() values are restored to their previous values (before the call)
when returning from a function
Change by Géry :
--
keywords: +patch
pull_requests: +11386
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35790>
___
___
Python-
Change by Géry :
--
keywords: +patch, patch
pull_requests: +11386, 11387
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35790>
___
_
Change by Géry :
--
keywords: +patch, patch, patch
pull_requests: +11386, 11387, 11388
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Géry added the comment:
Yes, closed.
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35321>
___
__
New submission from Géry :
Use consistent case for HTTP header fields, according to [RFC
7231](https://tools.ietf.org/html/rfc7231).
--
components: Library (Lib)
messages: 335870
nosy: brett.cannon, eric.araujo, ezio.melotti, maggyero, mdk, ncoghlan, willingc
priority: normal
severity
Change by Géry :
--
keywords: +patch
pull_requests: +11949
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36029>
___
___
Python-
Géry added the comment:
Please see the changes and my reply in the PR.
--
title: Use consistent case for HTTP header fields -> Use title-case HTTP header
fields
___
Python tracker
<https://bugs.python.org/issu
Change by Géry :
--
keywords: +patch
pull_requests: +12334
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36318>
___
___
Python-
New submission from Géry :
In the logging Python library, one can completely disable logging (for all
levels) for a particular logger either by setting its `disabled` attribute to
`True`, or by adding to it a `lambda record: False` filter, or by adding to it
a `logging.NullHandler()` handler
Géry added the comment:
Actually people do this all the time, to deactivate the logging of some
third-party libraries (me included). For instance:
*
https://stackoverflow.com/questions/24344045/how-can-i-completely-remove-any-logging-from-requests-module-in-python
*
https
Géry added the comment:
> It would be better to set the level of those loggers to e.g. ERROR or
> CRITICAL rather than disabling them altogether - presumably if something bad
> happens in those packages, one would want to know!
What if the user doesn't care anyway? Why assuming
Géry added the comment:
> A bit late for that now
Okay, so disabled is a private attribute so it should never be used anyway. And
as it not documented anywhere in the official Python documentation, I think the
current situation is fine. Thank you for the explanation, I am closing this
is
Change by Géry :
--
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Géry :
--
pull_requests: +6829
___
Python tracker
<https://bugs.python.org/issue31639>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Géry :
Calling logging.config.dictConfig several times with a file handler in the same
Python process leaks resources.
INPUT:
$ python3 -Wall <
self.common_logger_config(root, config, incremental)
--
components: Library (Lib)
messages: 320560
nosy: maggy
Géry added the comment:
Thanks @xtreak and @vinay.sajip for the fix.
--
___
Python tracker
<https://bugs.python.org/issue33978>
___
___
Python-bugs-list mailin
Change by Géry :
--
keywords: +patch
pull_requests: +9677
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35181>
___
___
Python-
Change by Géry :
--
pull_requests: +9678
___
Python tracker
<https://bugs.python.org/issue35181>
___
___
Python-bugs-list mailing list
Unsubscribe:
Géry added the comment:
It looks like Barry Warsaw has not been fully updated the documentation after
making the __spec__.loader attribute match with the __loader__ attribute, and
the __spec__.file attribute match with the __file__ attribute for namespace
packages.
Here is a pull request to
New submission from Géry Ogam :
There seems to be an encoding bug in Python 3.6.5 on Windows with the [timezone
constant](https://docs.python.org/3/library/time.html#timezone-constants)
`time.tzname`:
>>> import time
>>> time.tzname
('Paris, Madrid',
101 - 189 of 189 matches
Mail list logo