New submission from Matthew Hughes :
While investigating Python's SSL I noticed there was no interface for
interacting with OpenSSL's SSL_CTX_{get,set}_security_level
(https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_security_level.html)
so I thought I'd look into
Change by Matthew Lovell :
--
nosy: +mattblovell
___
Python tracker
<https://bugs.python.org/issue40827>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Matthew Francis <4576fran...@gmail.com>:
Currently, using await inside a coroutine will block inside the coroutine.
This behavior would usually be fine, but for some usecases a way to
nonblockingly run coroutines without creating a Task could be useful, because
Matthew Davis added the comment:
Ah, yes that workaround works. Thanks!
So what's the exact status of this policy? It's called the default policy, but
it's not used by default?
If I download the latest version of python, will this be parsed correctly
without explicitly set
Matthew Davis added the comment:
36041
--
___
Python tracker
<https://bugs.python.org/issue40359>
___
___
Python-bugs-list mailing list
Unsubscribe:
Matthew Davis added the comment:
Ah woops, I mistyped the relevant ticket.
It's issue 36401
https://bugs.python.org/issue36041
--
___
Python tracker
<https://bugs.python.org/is
New submission from Matthew Davis :
# Summary
When parsing emails with long attachment file names, part.get_filename() often
returns \n or \r\n.
It should strip those characters out.
# Steps to reproduce
I have attached a minimal working example.
The relevant part of the raw email is
Matthew Barnett added the comment:
That's what searching does!
Does the pattern match here? If not, advance by one character and try again.
Repeat until a match is found or you've reached the end.
--
___
Python tracker
<https://bu
Matthew Barnett added the comment:
The documentation is talking about whether it'll match at the current position
in the string. It's not a bug.
--
resolution: -> not a bug
___
Python tracker
<https://bugs.pytho
Matthew Barnett added the comment:
Duplicate of Issue39687.
See https://docs.python.org/3/library/re.html#re.sub and
https://docs.python.org/3/whatsnew/3.7.html#changes-in-the-python-api.
--
resolution: -> duplicate
stage: -> resolved
status: open -&g
Matthew Barnett added the comment:
A smaller change to the regex would be to replace the "(?:.*,)*" with
"(?:[^,]*,)*".
I'd also suggest using a raw string instead:
rx = re.compile(r'''(?:[^,]*,)*[ \t]*([^ \t]+)[ \t]+realm=(["']?)(
Change by Matthew Barnett :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue39436>
___
___
Python-bugs-list
Matthew Barnett added the comment:
Python floats have 53 bits of precision, so ints larger than 2**53 will lose
their lower bits (assumed to be 0) when converted.
--
nosy: +mrabarnett
resolution: -> not a bug
___
Python tracker
<
Matthew Fernandez added the comment:
I'm trying to follow the history of this issue, as it does not seem fully
resolved to me. While trying to package something for Debian, one of the buildd
[0] logs for hurd-i386 points to this issue as the cause of a failure [1]. This
occurs with P
Matthew Newville added the comment:
@eryksun Sorry for the imprecision -- I was mixing what we do on Linux and
Windows. A minimum verifiable example for Linux/MacOS would be
import ctypes
class bitstruct(ctypes.Structure):
_fields_ = [('addr', cty
Matthew Newville added the comment:
So, again, I'm trying to understand what the best workaround for this change
is. I asked "can this workaround be improved" twice and got no reply, while
getting plenty of responses to questions about the development process. I take
this t
Matthew Newville added the comment:
Thanks for the reply and the fix -- I have not tried the master branch, but
will try to do that soon. If I understand correctly, we will have to stick with
our kludgy "workaround" version in order to work with Python 3.7.6 and 3.8.1.
Or is ther
New submission from Matthew Newville :
We have a library (https://github.com/pyepics/pyepics) that wraps several C
structures for a communication protocol library that involves many C->Python
callbacks. One of the simpler structures we wrap with ctypes is defined with
typedef str
Matthew Smith added the comment:
This issue also affects me, pyth. I tried it out with various combinations of
sleep, and durations of tasks, but what I noticed is that
threading_shutdown_locks continues to grow at each iteration.
for i in range(10):
for j in range(10
Matthew Barnett added the comment:
I've just tried it on Windows 10 with Python 3.8 64-bit and Python 3.8 32-bit
without issue.
--
nosy: +mrabarnett
___
Python tracker
<https://bugs.python.org/is
Matthew Barnett added the comment:
I could also add: would sorting be case-sensitive or case-insensitive? Windows
is case-insensitive, Linux is case-sensitive.
--
nosy: +mrabarnett
___
Python tracker
<https://bugs.python.org/issue38
Matthew Barnett added the comment:
It's been many years since I looked at the code, and there have been changes
since then, so some of the details might not be correct.
As to have it should behave:
re.match('(?:()|(?(1)()|z)){1,2}(?(2)a|z)', 'a')
Iteration 1.
Match
Matthew Barnett added the comment:
Suppose you had a pattern:
.*
It would advance one character on each iteration of the * until the . failed to
match. The text is finite, so it would stop matching eventually.
Now suppose you had a pattern:
(?:)*
On each iteration of the * it
Matthew Barnett added the comment:
If we did decide to remove it, but there was still a demand for octal escapes,
then I'd suggest introducing \oXXX.
--
___
Python tracker
<https://bugs.python.org/is
Matthew Barnett added the comment:
A numeric escape of 3 digits is an octal (base 8) escape; the octal escape
"\100" gives the same character as the hexadecimal escape "\x40".
In a replacement template, you can use "\g<100>" if you want group 100 becau
Matthew Barnett added the comment:
You wrote "the u had already been removed by hand". By removing the u in the
_Python 2_ code, you changed that string from a Unicode string to a bytestring.
In a bytestring, \u is not an escape; b"\u" == b"\\u".
Matthew Bruggeman added the comment:
I can take a look
--
nosy: +Matthew Bruggeman
___
Python tracker
<https://bugs.python.org/issue37823>
___
___
Python-bug
Matthew Barnett added the comment:
I've just had a look at _uniq, and the code surprises me.
The obvious way to detect duplicates is with a set, but that requires the items
to be hashable. Are they?
Well, the first line of the function uses 'set', so they are.
Why, then, i
New submission from Matthew Roeschke :
With this toy example:
import unittest
def this_fails():
a = 1 + None
class TestExample(unittest.TestCase):
def test_this(self):
try:
this_fails()
except Exception:
self.fail('Fail')
i
Matthew Barnett added the comment:
For historical reasons, if it isn't valid as a repeat then it's a literal. This
is true in other regex implementations, and is by no means unique to the re
module.
--
resolution: -> not a bug
stage: -> resolved
status
Matthew Barnett added the comment:
The problem is the "(?:[^<]+|<(?!/head>))*?".
If I simplify it a little I get "(?:[^<]+)*?", which is a repeat within a
repeat.
There are many ways in which it could match, and if what follows fails to match
(it doesn't because there's no "
Matthew Cowles added the comment:
I disagree with the decision not to fix this bug. If a RuntimeWarning is
warranted when a temporary variable is used, it's warranted when the value is
used directly, without a temporary variable.
--
nosy: +mdc
New submission from Matthew Kenigsberg :
Was trying to figure out the exact behavior of urljoin. As far as I can tell
(see https://bugs.python.org/issue22118) it should follow RFC 3986. According
to the algorithm in 5.2.2, I think this is wrong:
>>> urljoin("ftp://netloc"
Matthew Barnett added the comment:
I've just come across the same problem.
For future reference, adding the following code before using a Treeview widget
will fix the problem:
def fixed_map(option):
# Fix for setting text colour for Tkinter 8.6.9
# From: https://core.tcl.tk/tk
Matthew Gamble added the comment:
My apologies, I didn't realise you were talking about the invalid escape
sequence. Thanks for letting me know about the fact that it's deprecated, I'll
definitely be keeping that in mind going forward.
In a bash shell with the find command
Matthew Gamble added the comment:
The point is that it's not possible to use the output of shlex.shlex to try to
match the behaviour of a POSIX-compliant shell by reliably splitting up a
user's input into multiple commands. In the first case I presented (no escape
character)
New submission from Matthew Gamble :
The output of the following invocations are exactly the same:
list(shlex.shlex('a ; b', posix=True, punctuation_chars=True))
list(shlex.shlex('a \; b', posix=True, punctuation_chars=True))
They both output the following:
['a
New submission from Matthew :
The parser for passing an addr_spec to email.headerregistry.Address does not
allow non-ASCII local parts, but the rest of the email package handles them
fine, either straight (with explicit references to RFC6532 and SMTPUTF8), or
encoding as expected. Apologies
Matthew Tanous added the comment:
Your example is an attempt to use Popen to run a file you don't have execute
permissions for.
In my example, it is not `whoami` that it is failing to create/open, but
'.tmp/temp_file'. I would expect a `PermissionError: [Errno 13] Permission
Matthew Tanous added the comment:
I have some updated information. This works as expected when I set the
permissions properly using an octal number 0o777.
The issue appears to be that when the permissions don't exist as specified, the
PermissionError reports the process name, not the
New submission from Matthew Tanous :
Allowing posix_spawn file_actions to default to None works, but explicitly
setting it throws a TypeError:
Python 3.8.0a3 (v3.8.0a3:9a448855b5, Mar 25 2019, 17:05:20)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", &
New submission from Matthew Tanous :
Ran into this on macOS while trying to play around with the new posix_spawn
bindings. It appears to me that the file_actions path is not what is being used
by file_actions here. It may be that I am misunderstanding something, but I
thought I would bring
Matthew Barnett added the comment:
That should be:
def __repr__(self):
return repr(self.name)
Not a bug.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bug
Matthew Barnett added the comment:
Consider re.findall(r'.{0,2}', 'abcde').
It finds 'ab', then continues where it left off to find 'cd', then 'e'.
It can also find ''; re.match(r'.*', '') does match, aft
Matthew Barnett added the comment:
It's now consistent with Perl, PCRE and .Net (C#), as well as re.split(),
re.sub(), re.findall() and re.finditer().
--
___
Python tracker
<https://bugs.python.org/is
Matthew Barnett added the comment:
The list alternates between substrings (s, between the splits) and captures (c):
['1', '1', '2', '2', '11']
-s- -c- -s- -c- -s--
You can use slicing to extract the substrings:
>>> re.split
Matthew Barnett added the comment:
>From the docs:
"""If capturing parentheses are used in pattern, then the text of all groups in
the pattern are also returned as part of the resulting list."""
The pattern does contain a capture, so that's why
New submission from Matthew Drago :
Say for example i want to apply a regex on a list of strings.
Using list comprehension as such results in the group method not being found.
```
name_regex = compile(r'\[\"([a-zA-Z\s]*)\"{1}')
named_entities = [name_regex.match(entity.t
Matthew Barnett added the comment:
You could italicise the "protocol" part using asterisks, like this:
*protocol*_request
or this:
*protocol*\ _request
depending on the implementation of the rst software.
--
nosy: +mrabarnett
___
Pyth
Matthew Barnett added the comment:
It matches, and the span is (0, 2).
The only way that it can match like that is for the capture group to match the
'a', and the final 'b' to match the 'b'.
Therefore, re.search(r'(ab|a)*b', 'ab').groups() s
Change by Matthew Ryan :
--
nosy: +mryan1539
___
Python tracker
<https://bugs.python.org/issue28494>
___
___
Python-bugs-list mailing list
Unsubscribe:
Matthew Barnett added the comment:
It looks like a bug in re to me.
--
___
Python tracker
<https://bugs.python.org/issue35859>
___
___
Python-bugs-list mailin
Matthew Barnett added the comment:
Look at the spans of the groups:
>>> import re
>>> re.search(r'^(?:(\d*)(\D*))*$', "42AZ").span(1)
(4, 4)
>>> re.search(r'^(?:(\d*)(\D*))*$', "42AZ").span(2)
(4, 4)
They're telling you
Matthew Barnett added the comment:
@Steven: The complaint is that the BEL character ('\a') doesn't result in a
beep when printed.
@Siva: These days, you shouldn't be relying on '\a' because it's not always
supported. If you want to make a beep, do so with
Change by Matthew McCormick :
--
pull_requests: +10529
___
Python tracker
<https://bugs.python.org/issue11566>
___
___
Python-bugs-list mailing list
Unsubscribe:
Matthew McCormick added the comment:
> What current 3.x versions have this issue? This issue was opened against 2.7.
Yes, this is just for 2.7.
--
versions: -Python 3.8
__
Python tracker
<https://bugs.python.org/issu
Matthew Barnett added the comment:
A similar issue exists with centring:
>>> format(42, '^020')
'0420'
--
nosy: +mrabarnett
___
Python tracker
<ht
Matthew Barnett added the comment:
It always returns the dot.
For example:
>>> posixpath.splitext('.blah.txt')
('.blah', '.txt')
If there's no extension (no dot):
>>> posixpath.splitext('blah')
('blah',
Matthew Belisle added the comment:
That makes sense Victor, I agree. Thanks for merging those PRs.
--
___
Python tracker
<https://bugs.python.org/issue34
Change by Matthew Belisle :
--
pull_requests: +9562
___
Python tracker
<https://bugs.python.org/issue35116>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Matthew Belisle :
--
pull_requests: +9561
___
Python tracker
<https://bugs.python.org/issue35116>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Matthew Belisle :
--
keywords: +patch
pull_requests: +9560
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35116>
___
___
Py
New submission from Matthew Belisle :
vstinner pointed out that cgi.FieldStorage max_num_fields needs documentation
added to Doc/library.
https://bugs.python.org/issue34866#msg328401
--
assignee: docs@python
components: Documentation
messages: 328937
nosy: Matthew Belisle, docs
Matthew Barnett added the comment:
@Ezio: the value of stringy_thingy is irrelevant because it never gets that
far; it fails when it tries to parse the replacement, which occurs before
attempting any matching.
I can't reproduce the difference either.
--
status: pending -&
New submission from Matthew Belisle :
The cgi.FieldStorage class added in https://github.com/python/cpython/pull/9660
has an off by one error in the logic for recursively nested objects. The
problem is that sub_max_num_fields should be initialized outside of the while
loop, not inside of it
Change by Matthew Belisle :
--
keywords: +patch
pull_requests: +9317
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35028>
___
___
Py
Change by Matthew Belisle :
--
pull_requests: +9314
___
Python tracker
<https://bugs.python.org/issue34866>
___
___
Python-bugs-list mailing list
Unsubscribe:
Matthew Belisle added the comment:
Sorry, looks like I forgot to attach example.py. Attaching now.
--
Added file: https://bugs.python.org/file47861/example.py
___
Python tracker
<https://bugs.python.org/issue34
New submission from Matthew Belisle :
Copied from email to secur...@python.org:
I have been doing memory profiling on a few python web frameworks and I noticed
this issue in the cgi.FieldStorage class.
$ python example.py
Memory used: 523935744 bytes
The problem is there is no easy way to
Change by Matthew Barnett :
--
nosy: -mrabarnett
___
Python tracker
<https://bugs.python.org/issue34694>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Matthew Barnett :
--
Removed message: https://bugs.python.org/msg326012
___
Python tracker
<https://bugs.python.org/issue34763>
___
___
Python-bug
Change by Matthew Barnett :
--
Removed message: https://bugs.python.org/msg326014
___
Python tracker
<https://bugs.python.org/issue34763>
___
___
Python-bug
Change by Matthew Barnett :
--
Removed message: https://bugs.python.org/msg326013
___
Python tracker
<https://bugs.python.org/issue34763>
___
___
Python-bug
Change by Matthew Barnett :
--
Removed message: https://bugs.python.org/msg326015
___
Python tracker
<https://bugs.python.org/issue34763>
___
___
Python-bug
Matthew Barnett added the comment:
Unicode 11.0.0 has ๅ
(U+5345) as being numeric and having the value 30.
What's the difference between that and U+4E17?
I notice that they look at lot alike. Are they different variants, perhaps
traditional vs simpl
Matthew Barnett added the comment:
I don't see a problem with this. If the zip file has 'dist/file1.py' then you
know to create a directory when unzipping. If you want to indicate that there's
an empty directory 'foo', then put 'foo/' in the
Matthew Barnett added the comment:
Not all uses of the word "master" are associated with slavery, e.g. "master
craftsman", "master copy", "master file table".
I think it's best to avoid use of master/slave where practicable, but other
u
Matthew Barnett added the comment:
For clarity, the first is '\U00010308\U00010316' and the second is
'\U00010306\U00010300\U0001030B'.
The BMP is the Basic Multilingual Plane, which covers the codepoints in the
range U+ to U+. Some software has a problem dea
Matthew Barnett added the comment:
It also raises a ValueError on Windows. For other invalid paths on Windows it
returns False.
--
nosy: +mrabarnett
___
Python tracker
<https://bugs.python.org/issue33
Matthew Fisher added the comment:
> I did look at the code :-)
I also looked at the code. I had to do so to understand why the example output
was not "as expected." ;)
> I don't agree about the example in the documentation, it is a clear
> demonstration about how t
Matthew Barnett added the comment:
You don't give the value of 'newlines', but the problem is probably
catastrophic backtracking, not deadlock.
--
nosy: +mrabarnett
___
Python tracker
<https://bugs.pyt
New submission from Matthew Woodcraft :
PEP 405 says that the pyvenv.cfg file is found as follows:
ยซ a pyvenv.cfg file is found either adjacent to the Python executable or one
directory above it (if the executable is a symlink, it is not dereferenced), ยป
But in cpython if the executable is a
Matthew Rocklin added the comment:
I agree that this is a common issue. We see it both when people use batch
schedulers as well as when people use Docker containers. I don't have enough
experience with batch schedulers to verify that NCPUS is commonly set. I would
encourage people to
Matthew Barnett added the comment:
For the record, '\u200e' is '\N{LEFT-TO-RIGHT MARK}'.
--
nosy: +mrabarnett
___
Python tracker
<https://bug
Matthew Cowles added the comment:
My thanks to David for the clarification. I don't find the logic he describes
(but does not necessarily subscribe to!) persuasive in this case. In my
opinion, "Let's be incorrect for the sake of simplicity," is not the way to
document a
Matthew Cowles added the comment:
If David is right and people have previously decided not to change wording like
this, can someone explain why? As it stands, the meaning is clear and incorrect.
--
nosy: +mdcowles
___
Python tracker
<ht
Matthew Stoltenberg added the comment:
The naive change is to have the host, port tuple assignment use only the first
two values from address. I can open a PR with that change (and update the
docstring for the function) if that's the right change. For reference, the
python socke
Change by Matthew Stoltenberg :
--
title: socket.creaet_connection needs to support full IPv6 argument ->
socket.create_connection needs to support full IPv6 argument
___
Python tracker
<https://bugs.python.org/issu
New submission from Matthew Stoltenberg :
The following causes a ValueError in the create_connection convenience function
import socket
sock1 = socket.create_connection(('::1', '80'))
sock2 = socket.create_connection(sock1.getpeername())
--
components: Library (L
Matthew Barnett added the comment:
findall() and finditer() consist of multiple uses of search(), basically, as do
sub() and split(), so we want the same rule to apply to them all.
--
___
Python tracker
<https://bugs.python.org/issue25
Matthew Barnett added the comment:
The pattern:
\b|:+
will match a word boundary (zero-width) before colons, so if there's a word
followed by colons, finditer will find the boundary and then the colons. You
_can_ get a zero-width match (ZWM) joined to the start of a nonzero-width
Matthew Barnett added the comment:
@Narendra: The argument, if provided, is merely a default. Checking whether it
_could_ be used would not be straightforward, and raising an exception if it
would never be used would have little, if any, benefit.
It's not a bug, and it's not wort
Matthew Barnett added the comment:
Your verbose examples put the pattern into raw triple-quoted strings, which is
OK, but their first character is a backslash, which makes the next character (a
newline) an escaped literal whitespace character. Escaped whitespace is
significant in a verbose
Matthew Barnett added the comment:
@Victor: True, people often ignore DeprecationWarning anyway, but that's their
problem, at least you can say "well, you were warned". They might not have read
the documentation on it recently because they have not felt the need to read
Matthew Rocklin added the comment:
>From a user's perspective I would definitely appreciate forkserver being
>protected from SIGINT. This bug affects me in practice. If the forkserver
>goes down I personally have no objection to it restarting automatically,
>though I appre
Matthew Barnett added the comment:
@Tim: the regex module includes some extra checks to reduce the chance of
excessive backtracking. In the case of the OP's example, they seem to be
working. However, it's difficult to know when adding such checks will help, and
your example is one
Matthew Patton added the comment:
I've triggered it which is why I looked for the problem and offered the
defensive patch. As API writers you can NEVER assume your parameters are what
you think they should be and just blindly pr
Change by Matthew Patton :
--
pull_requests: +3950
___
Python tracker
<https://bugs.python.org/issue30767>
___
___
Python-bugs-list mailing list
Unsubscribe:
Matthew Patton added the comment:
syslog(3) is cited in the code as inspiration and has been the goto definition
for logging levels for 40 years across many, many projects. NOTICE is
incredibly useful especially to those of us who are sysadmins.
Why would Python not implement the full suite
Matthew Patton added the comment:
I believe this diff addresses the failure of formatException() to check it's
parameter's datatype. I still maintain this should be re-opened since it's
guaranteed to raise an exception when someone sets 'exc_info=TruthyValue' in
k
101 - 200 of 828 matches
Mail list logo