Robert Spralja added the comment:
I understand that it's invalid synatax, but not why.
On Sat, 26 Feb 2022 at 10:07, Serhiy Storchaka
wrote:
>
> Serhiy Storchaka added the comment:
>
> It is an invalid syntax. Write foo(*((stri,) if stri else ())).
>
> --
&g
New submission from Robert Spralja :
`
>>> def foo(num=1):
... return num
...
>>> foo(*(bool,) is bool else *())
File "", line 1
foo(*(bool,) is bool else *())
^
SyntaxError: invalid syntax
>>> foo(*(bool,) if bool else
New submission from Robert-André Mauchin :
In Objects/codeobject.c, poisitions_iterator should read positions_iterator
--
components: C API
messages: 413209
nosy: eclipseo
priority: normal
pull_requests: 29479
severity: normal
status: open
title: Typo in new PositionsIterator
versions
Robert Xiao added the comment:
I noticed that the official installer seems to be built using an entirely
different process, as it produces a single-file .pkg in xar format with an
embedded Distribution file, rather than an .mpkg directory.
Is there documentation on how these packages are
Change by Robert Xiao :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue46548>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Robert Xiao :
I am building unofficial macOS packages for personal use. My main build machine
is running macOS Monterey 12.1 and Xcode 13.2.1. I recently attempted to build
Python 3.8.12 as a package using build-installer.py. This worked fine after a
bit of dependency
Robert Einhorn added the comment:
Thanks
--
resolution: not a bug ->
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue46485>
___
__
New submission from Robert Einhorn :
This is probably not an error and I may misinterpret the PEP 617, but I don't
know what the ~ PEG operator means in the next rule if there is no alternative:
assignment_expression:
| NAME ':=' ~ expression
And similarly with this rule
New submission from Robert Einhorn :
Definition of invalid_double_starred_kvpairs PEG grammar rule is not found:
https://docs.python.org/3.10/reference/grammar.html
# PEG grammar rule:
dict:
| '{' [double_starred_kvpairs] '}'
| '{'
New submission from Robert Einhorn :
https://docs.python.org/3.10/reference/grammar.html
# original grammar rule:
file: [statements] ENDMARKER
# suggested grammar rule:
file: NEWLINE* [statements] ENDMARKER
--
components: Parser
messages: 409524
nosy: RobEin, lys.nikolaou
New submission from Robert Steed :
Expected instantiation of xml.etree.ElementTree.XMLParser(target=None) to
create a parser using default TreeBuilder
--
components: XML
files: XMLParserFail.py
messages: 407458
nosy: rdsteed
priority: normal
severity: normal
status: open
title
New submission from Robert T McQuaid :
This applies to Python 3.8 under Debian-11 Bullseye.
Under curses getch should return the value of curses.KEY_B2
(350 decimal) when pressing the keypad 5. Instead it
returns 574.
The simple program following the signature block
illustrates the problem
Robert added the comment:
You see the usecase from the stack trace: PythonWin (the IDE from pywin32
package) uses pyclbr - to inspect arbitrary user code.
(Neither code is from me)
I'm not inspecting __main__ explicitely. The problem seems to arise in newer
Python versions
Change by Robert Pollak :
--
nosy: +jondo
___
Python tracker
<https://bugs.python.org/issue43547>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Robert :
When PY_SSIZE_T_CLEAN is not #defined in Py3.10, PyArg_ParseTuple() etc. sets
a SystemError but the return value says 1 (=SUCCESS)!
=> Causes terrific crashes with unfilled variables - instead of a clean Python
exception.
Background: pywin32 suffers in mas
Change by Robert :
--
keywords: +patch
pull_requests: +23407
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24623
___
Python tracker
<https://bugs.python.org/issu
Robert added the comment:
# `__main__` of the source code directory: `/tmp/rebound/rebound`.
# differentiate `__main__` of my target source code to read from the built-in
`__main__`? In other words, how do I read the module `__main__` of the
codebase: rebound?
=> when __main__.py
New submission from Robert :
When pyclbr.readmodule_ex() is traversing "import __main__" or another
module without __spec__, it dies completely
with "ValueError: __main__.__spec__ is None / is not set".
=> It should at least continue with the (big)
New submission from robert j richardson :
When using >python synth.py in the directory
google-api-java-client-services-master
python returns:
synthtool > Cloning
https://github.com/googleapis/discovery-artifact-manager.git.
synthtool > Cleaning output directory.
Traceback (most re
New submission from Robert :
Hi all.
Is it an issue or on purpose that enabling and disabling the frame in plt.pie()
results in different sized pie charts? In my opinion the code below should
provide identical sized charts. If it is on purpose, can you give me a
reference? I am using the
New submission from Robert T McQuaid :
The description of color_pair starts with
curses.color_pair(color_number)
It should be
curses.color_pair(pair_number)
--
assignee: docs@python
components: Documentation
messages: 383344
nosy: arbor, docs@python
priority: normal
severity: normal
Robert D. French added the comment:
Hello! I just want to lend my voice in favor of maintaining "Solarish" support
as well, and offer what help I may for resolving issues.
--
nosy: +robertdfrench
___
Python tracker
<https://bu
Robert O'Callahan added the comment:
I filed issue 42189, which is similar but maybe worse: copy.deepcopy() is
broken for platform.uname_result objects.
--
nosy: +rocallahan
___
Python tracker
<https://bugs.python.org/is
New submission from Robert O'Callahan :
Starting from Python 3.9, copy.deepcopy can't copy a platform.uname_result
object.
```
Python 3.9.0 (default, Oct 6 2020, 00:00:00)
[GCC 10.2.1 20200826 (Red Hat 10.2.1-3)] on linux
Type "help", "copyright", "credits
New submission from Robert Wessen :
In versions of Python from 3.4-3.10, the Python core plistlib library supports
Apple's binary plist format. When given malformed input, the implementation can
be forced to create an argument to struct.unpack() which consumes all available
CPU and m
Robert Smallshire added the comment:
Yes Raymond, I can prepare a new PR as soon as the faulty PR has been rolled
back.
--
___
Python tracker
<https://bugs.python.org/issue26
Robert Smallshire added the comment:
First, I would like to apologise for the confusion I have inadvertently caused.
I didn't see Raymond's question and Guido's clear response here about not
modifying the numeric tower, as it came _long_ after activity had moved to
GitHub, an
Robert Haschke added the comment:
Thanks, Josh, for this clarification. What is the suggested mitigation?
Obviously, I need to pass all symbols from my hierarchical dictionary in a
flattend version as a dict to globals. Or do you see another option
Robert Haschke added the comment:
Looks like the list generator is considered as a new nested scope, which
prohibits access to local variables?
This basic expression, passing local symbols only, fails as well:
eval('[abc[i]*abc[i] for i in [0, 1, 2]]', {}, dict(abc=[1, 2, 3]))
New submission from Robert Haschke :
The attached file implements a custom dict-like class (MyDict) as a minimal
example of code I am using in a larger codebase.
Before you ask, why I reimplemented a dict-like object: The real code base
employs a hierarchical dict, referencing recursively to
Robert added the comment:
Would this patch already solve? :
https://github.com/python/cpython/pull/19130
There seems to be another bug: The strange 'latin-1' default encoding of
cgi.parse(), which only has effect in non-mulitpart:
if hasattr(fp,'encoding'
Robert Reynolds added the comment:
A pure python demonstration of the problem looks like this (`__file__` stores
the path to the executed module):
```python
with open(__file__) as f:
src = f.read()
with open(__file__, 'w') as f:
f.write('\n\n\n\n\n# Whoops
Robert Reynolds added the comment:
I second [what was said by Aigars
Mahinovs](https://bugs.python.org/issue8087#msg300990) about long-running
processes giving confusing tracebacks that make debugging very difficult. I
have a Natural Language Processing pipeline extracting features from a
Robert Rouhani added the comment:
No problem! Happy to contribute where I can :)
--
___
Python tracker
<https://bugs.python.org/issue40417>
___
___
Python-bug
Change by Robert Rouhani :
--
pull_requests: +19250
pull_request: https://github.com/python/cpython/pull/19935
___
Python tracker
<https://bugs.python.org/issue40
Change by Robert Rouhani :
--
pull_requests: +19249
pull_request: https://github.com/python/cpython/pull/19934
___
Python tracker
<https://bugs.python.org/issue40
Robert Rouhani added the comment:
We have a fairly straightforward workaround of using the "warnings" module
to redirect to stdout, so we personally don't have a need.
Unreal, however, follows the VFX Reference Platform (
https://vfxplatform.com/) which is migrating from 2.
New submission from Robert Rouhani :
It appears as though PyImport_ReloadModule is importing the deprecated "imp"
module.
I integrated a newer version of Python into Unreal Engine 4, which internally
calls this function for some of it's own modules. Normally a stray warning
Robert Bressan added the comment:
After placing a standard size instead of a native one, solved.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Robert Bressan :
struct.pack() is adding an unexpected null byte.
When I've run this code:
___
import struct
d = {'c':b'a', 'b':1, 'B':1, '?':False, 'h':2, 'H'
Robert Pierce added the comment:
It appears as if the problem is the sentinel FIFO opened by (for example)
multiprocessing.popen_fork.Popen._launch(). It registers a finalization class
to close the sentinel on garbage collection. Instead, it should be closed in
poll() or wait() when the
New submission from Robert Pierce :
multiprocessing.Process opens a FIFO to the child. This FIFO is not documented
the the Process class API and it's purpose is not clear from the documentation.
It is a minor documentation bug that the class creates non-transparent resource
utilization.
Robert Xiao added the comment:
Could this be solvable if `closefd` were a writable attribute? Then we could do
file = None
try:
file = io.open(fd, ..., closefd=False)
file.closefd = True
except:
if file and not file.closefd:
os.close(fd
New submission from Robert Xiao :
tempfile.NamedTemporaryFile creates its wrapper like so:
try:
file = _io.open(fd, mode, buffering=buffering,
newline=newline, encoding=encoding, errors=errors)
return _TemporaryFileWrapper(file, name, delete
New submission from Robert :
https://docs.python.org/3/tutorial/controlflow.html
4.7.8. Function Annotations
[...] "The following example has a positional argument, a keyword argument, and
the return value annotated:"
It is not a "positional argument" but a
Change by Robert Kearns :
--
keywords: +patch
pull_requests: +16124
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16534
___
Python tracker
<https://bugs.python.org/issu
Change by Robert Kearns :
--
components: Library (Lib)
nosy: RobertKearns
priority: normal
severity: normal
status: open
title: Add end lines to pyclbr objects
type: enhancement
versions: Python 3.9
___
Python tracker
<https://bugs.python.
Robert Smallshire added the comment:
> * no forward movement for a year and half
For most of that year and a half my pull-request was sitting in Github
<https://github.com/python/cpython/pull/6121> awaiting review by two core devs,
of which you Raymond, were one. I don't
Robert Pollak added the comment:
Sorry for not providing a pull request yet.
By the way, the "DB Browser for SQLite" (https://sqlitebrowser.org/) also
interprets DATETIME fields correctly.
(Could someone please change the "Stage" of this issue to "needs patc
Robert Collins added the comment:
Oh, I didn't mean to imply that these are the only options I'd support - just
that these are the things I've thought through and that I think will all work
well... I'm sure there are mo
Change by Robert Collins :
--
versions: +Python 3.9 -Python 3.5
___
Python tracker
<https://bugs.python.org/issue19645>
___
___
Python-bugs-list mailin
Robert Collins added the comment:
Ok so design wise - there is state on the TestCase that influences assertions;
in potentially two ways.
The first way is formatting - the amount of detail shown in long list
comparisons etc.
The second way I don't think we have at the moment
Robert Collins added the comment:
Right now that attribute could be set by each test separately, or even varied
within a test.
TBH I'm not sure that the attribute really should be supported; perhaps
thinking about breaking the API is worth doing.
But - what are we solving for here. T
Robert Collins added the comment:
I think this is strictly redundant with that other ticket and I'm going to
close it. That said, they need access to self.failureException.
https://docs.python.org/3/library/unittest.html#unittest.TestCase.failureException
--
stage: ->
Robert Collins added the comment:
Sorry for the slow reply here;
There are API breaks involved in any decoupling that involves the exception
raising because of the failureException attribute. Something with signalling
that can be adapted by other test suites etc might have merit, but I
Robert added the comment:
Can anyone do a review?
--
___
Python tracker
<https://bugs.python.org/issue33591>
___
___
Python-bugs-list mailing list
Unsubscribe:
Robert Collins added the comment:
Thank you @Eryk
--
___
Python tracker
<https://bugs.python.org/issue36656>
___
___
Python-bugs-list mailing list
Unsubscribe:
Robert Collins added the comment:
I'd like to add a few notes; please do consider Windows interactions here -
Windows does not have the same model for inode replacement that Posix has.
Secondly, I note that the thread model discussed here hasn't been particular
well artic
Robert Collins added the comment:
New changeset b892d3ea468101d35e2fb081002fa693bd86eca9 by Robert Collins
(Jeroen Demeyer) in branch 'master':
bpo-36994: add test for profiling method_descriptor with **kwargs (GH-13461)
https://github.com/python/cpyt
Robert Collins added the comment:
New changeset b892d3ea468101d35e2fb081002fa693bd86eca9 by Robert Collins
(Jeroen Demeyer) in branch 'master':
bpo-36994: add test for profiling method_descriptor with **kwargs (GH-13461)
https://github.com/python/cpyt
Robert Collins added the comment:
I'm reopening this because I don't agree.
I opened the bug because we have evidence that users find the current
documentation confusing. Saying that its not confusing to us doesn't fix the
confusion.
Why should we mention the special case
Robert Boehne added the comment:
I wonder if there's anyone with AIX 7 who can attempt to reproduce this. We
have another AIX machine, but it is down for the moment. I would like to
eliminate a problem on this machine as the
Robert Boehne added the comment:
It doesn't look good:
robb@nepal:/raid/checkouts-raid/robb/nepal$ xlc_r -q64 -O0 -g
-qlanglvl=extc1x -o urandom urandom.c
robb@nepal:/raid/checkouts-raid/robb/nepal$ ./urandom
open O_RDONLY failed
open O_RDONLY | O_CLOEXEC failed
robb@nepal:/raid/chec
Robert Boehne added the comment:
Reading a few bytes from /dev/urandom via dd:
robb@nepal:/raid/checkouts-raid/robb/nepal/build-py37$ dd if=/dev/urandom
bs=256 count=1
??S?(#L???~]?B?^??8?f&?_|Vi??@??[joG>St??;?$?1?*??24???RD?"
Robert Boehne added the comment:
The call to open("/dev/urandom", flags) is returning -1, and errno is set to
22, EINVAL - Invalid argument. could the flags be set incorrectly?
--
___
Python tracker
<https://bugs.python.o
Robert Boehne added the comment:
Opening /dev/urandom seems to return -1
(dbx) print buffer
0x09001000a5f49380
(dbx) print size
24
(dbx) print raise
0
(dbx) step
stopped in dev_urandom at line 311 in file
"/raid/checkouts-raid/robb/nepal/build-py37/../../Python-3.7.3/P
Robert Boehne added the comment:
from pyconfig.h:
/* Define to 1 if the getrandom() function is available */
/* #undef HAVE_GETRANDOM */
/* Define to 1 if the Linux getrandom() syscall is available */
/* #undef HAVE_GETRANDOM_SYSCALL */
/* Define to 1 if you have the header file
Change by Robert Boehne :
Added file: https://bugs.python.org/file48317/config.log.gz
___
Python tracker
<https://bugs.python.org/issue36843>
___
___
Python-bugs-list m
Robert Boehne added the comment:
robb@nepal:/raid/checkouts-raid/robb/nepal/build-py37$ gmake
xlc_r -c -DNDEBUG -O -q64 -qlanglvl=extc99 -IObjects -IInclude -IPython
-I. -I../../Python-3.7.3/Include
-I/raid/checkouts-raid/robb/Python-2.7.15/Modules/zlib -DPy_BUILD_CORE -o
Modules
New submission from Robert Boehne :
build fails with:
./python -E ../../Python-3.7.3/setup.py build
Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to
initialize Python
--
components: Build
messages: 341821
nosy: Robert Boehne
priority: normal
severity
Robert Collins added the comment:
This is now showing up in end user tools like black:
https://github.com/ambv/black/issues/564
--
nosy: +rbcollins
versions: +Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.
Robert Marshall added the comment:
The pull request is now ready for a review.
Apologies for the delay - took me a bit longer to circle back on this than I
would have liked.
--
___
Python tracker
<https://bugs.python.org/issue13
New submission from Robert Billing :
https://docs.python.org/3.7/library/time.html contains the text "UTC is
Coordinated Universal Time (formerly known as Greenwich Mean Time, or GMT)".
This is not strictly true. Referring to
https://en.wikipedia.org/wiki/Coordinated_Universa
Robert Marshall added the comment:
I have rebased this to recent master hash 53b9e1a1c1 and submitted a pull
request.
It built in my CI environment, so seems to be OK as far as compiling.
I'll run the test suite against it later this evening when I have time to stand
up a quick
New submission from Robert Kuska :
I failed today to print help message for base64 utility without an error:
$ python3 -m base64 -help
option -h not recognized
usage:
/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/base64.py
[-d|-e|-u|-t] [file
Robert Pollak added the comment:
So my workaround is of course
```
table = pd.read_sql_query('select * from table', con)
column_type = pd.read_sql_query('PRAGMA table_info("table")', con)['type']
datetimes = table.columns[column_type == 'D
Change by Robert Pollak :
--
title: sqlite3: "select *" should optionally sniff and autoconvert TEXT
datetime fields -> sqlite3: optionally autoconvert table_info's DATETIME fields
___
Python tracker
<https://bugs.
Robert Wright added the comment:
Perhaps there's confusion over what I mean by "style guide". I'd happily take
Steven's message *as* the style guide. Or, at the very least, the clarification
that sentinels are to be thought of as constants.
It's one of th
Robert Pollak added the comment:
Here is now a reduced version of my real use case: 2017v2-reduced.db. The file
was originally created with "Oracle DBConvert". This file contains a table
without rows.
I was wrong in my last comment: There's also no sniffing needed here, see
Robert Pollak added the comment:
Paul, the sniffing would be only active for people who explicitly add a
connect() argument like detect_types=DETECT_DATETIME, which can have the
appropriate warning in the docs. You can also extend the sniffing to all
values, not just the first non-missing
Robert Pollak added the comment:
I have created the attached sqlite database file (with SQLiteStudio) for
testing. I contains a table `t` with a TEXT column `x` and a DATETIME
(according to SQLiteStudio) column `y`. The table contains a single row with
the value `2018-11-05 12:20:30` for
Robert Pollak added the comment:
Stéphane, your example does not match my use case with unknown table structure.
Does everyone agree that such a sniffing is out of scope for sqlite3?
That's not what I'd call "batteries included" :-(
--
title: sqlite3: "se
Change by Robert Pollak :
--
title: sqlite3: "select *" should autoconvert datetime fields -> sqlite3:
"select *" should optionally autoconvert TEXT datetime fields
___
Python tracker
<https://
Robert Pollak added the comment:
Thank you, Paul, for your hints on sniffing. I have now asked at SqliteStudio
for confirmation that they also do content sniffing to detect datetime text
fields: https://github.com/pawelsalawa/sqlitestudio/issues/3449 .
So in this issue I am suggesting to
New submission from Robert Henry :
File Misc/README.valgrind is out of date with respect to python3.8. There are
important sections of this file that are 15 years old!
Example: the README.valgrind refers to "Uncomment Py_USING_MEMORY_DEBUGGER in
Objects/obmalloc.c" but there
Robert Pollak added the comment:
(In fact, I am currently taking the first non-missing entry of each text column
and trying to dateutil.parser.parse it. If that works, I use pandas.to_datetime
on the column.)
--
___
Python tracker
<ht
New submission from Robert Pollak :
Currently, fields are converted to datetime as described in
https://docs.python.org/3/library/sqlite3.html#sqlite3.PARSE_COLNAMES :
'select x as "x [datetime]" from table'
In my use case I don't know the names and locations
Robert Wright added the comment:
Just the classic problems caused by inconsistency in code - confusion when
reading, and disagreements when writing.
For reading: Where should I look in a file for the sentinels? Is this value a
sentinel, or is it some other type of variable?
For writing
New submission from Robert Wright :
There should be a style guide for tests, to prevent arguments about their use
in future code.
--
messages: 328986
nosy: madman bob
priority: normal
severity: normal
status: open
title: Add style guide for unit tests
New submission from Robert Wright :
Sentinel values are used inconsistently in the Python code base.
It would be helpful to have a style guide (about eg. casing, placement, and
sentinel reuse) to prevent arguments about their use in future code.
--
messages: 328984
nosy: madman bob
Robert Xiao added the comment:
I just started a new project, thoughtlessly decided to use `shelve` to store
data, and lost it all again thanks to this bug.
To reiterate: Although `gdbm` might fix this issue, it's not installed by
default. But the issue is with `dbm`: Python is allowi
Robert Benson added the comment:
What I'm talking about is reading a single arg (of a dictionary or collection
type) that can be split across multiple lines, rather than a single line
containing multiple args
My motivation was that reading args from a file should behave in a manner
si
New submission from Robert Benson :
Using `argparse`, I wanted to create an argument that was a JSON dictionary. I
found that using this in combination with the `fromfile_prefix_args` keyword
argument, that the parser assumes that each argument provided in the file must
be on a single line
Change by Robert Benson :
--
versions: -Python 2.7
___
Python tracker
<https://bugs.python.org/issue35005>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Robert Benson :
--
components: Library (Lib)
nosy: derelbenkoenig
priority: normal
severity: normal
status: open
title: argparse should accept json and yaml argument types
type: enhancement
___
Python tracker
<https://bugs.python.
Change by Robert Benson :
--
versions: +Python 2.7
___
Python tracker
<https://bugs.python.org/issue35005>
___
___
Python-bugs-list mailing list
Unsubscribe:
Robert Wall added the comment:
I saw that article too but reading man tcp(4) [1], it says that this value is
in seconds for macOS and testing appears to confirm this.
Where the unit of time is different, however, is with the old and new Windows
keepalive options discussed in #32394. The
Robert added the comment:
Acknowledging the test failure and message pointing to #32394:
==
FAIL: test_new_tcp_flags (test.test_socket.TestMSWindowsTCPFlags
New submission from Robert :
macOS uses TCP_KEEPALIVE in place of TCP_KEEPIDLE. It would be good to have
this available in the socket library to use directly.
Pull request coming up.
--
components: Library (Lib)
messages: 327351
nosy: llawall
priority: normal
severity: normal
status
Robert Collins added the comment:
Serhiy, thats not a design flaw, its a feature.
in a class hierarchy, setup and teardown ordering is undefined: implementors
can choose whatever order they want to execute in. e.g.
class A(TestCase):
def setUp(self):
super().setUp()
acquire1()
class B
1 - 100 of 1080 matches
Mail list logo