Stian Soiland-Reyes added the comment:
I tried to make a patch for this, but I found it quite hard as the
urllib/parse.py is fairly low-level, e.g. it is constantly encoding/decoding
bytes and strings within each URI component. Basically the code assumes there
are tuples of strings, with
Robert Collins added the comment:
Yes, making customising the output easier is a good thing. One way is to use
e.g. subunit.run (which can work with all unittest versions since 2.6) and
write a custom filter. Or a custom TestResult and TextTestRunner can work too :)
--
New submission from Robert Collins:
This is just an ugly/hygiene thing. Since we've never advertised the submodules
as the API, we should be able to fix this by moving main.py to e.g. __main__.py.
--
messages: 231101
nosy: rbcollins
priority: normal
severity: normal
status: open
title:
Changes by Robert Collins robe...@robertcollins.net:
--
components: +Library (Lib)
type: - behavior
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22858
___
New submission from Robert Collins:
Before the argparse migration usageExit was invoked and could be extended via
subclasses, but it no longer is. We could delete it (and document it being no
longer accessible) or put some glue in to reinstate it. I think deleting it is
fine, as long as we
Changes by Robert Collins robe...@robertcollins.net:
--
components: +Library (Lib)
type: - behavior
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22859
___
New submission from Robert Collins:
Some users of TestProgram would like to add options (e.g. testtools.run adds
--list and --load-list) but there isn't a clean point to add them without bulk
copying the implementation around.
We likely need some extra extension points as well - one
Serhiy Storchaka added the comment:
Here is a patch which is closer to current code but solves complexity issue and
also fixes some bugs in current code.
$ ./python -c import textwrap; print(textwrap.wrap('this-is-a-useful-feature',
width=1, break_long_words=False))
['this-', 'is-a',
Georg Brandl added the comment:
LGTM.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22687
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
I don't understand:
+expect = (this-|is-a-useful-|feature-|for-|
+ reformatting-|posts-|from-|tim-|peters'ly).split('|')
+self.check_wrap(text, 1, expect, break_long_words=False)
+self.check_split(text, expect)
Why
Changes by Antoine Pitrou pit...@free.fr:
--
versions: -Python 2.7, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22687
___
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22860
___
___
Python-bugs-list mailing
Antoine Pitrou added the comment:
For another example use case:
https://github.com/numba/numba/blob/master/numba/tests/__init__.py#L22
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22860
New submission from STINNER Victor:
Hi,
I just modified the Trollius project ( http://trollius.readthedocs.org/ ) to
support Python 2.7 with the newly backported ssl module. I ran the test suite
of the Trollius and some tests are failing because of the exact exception
message.
It looks like
STINNER Victor added the comment:
I worked around this issue by expecting a different error message on Python 2
and Python 3:
https://bitbucket.org/enovance/trollius/commits/be404685d3fd8ba008e1a577438dc6f23b01c63a?at=trollius
+if compat.PY3:
+err_msg = hostname '127.0.0.1'
New submission from Florian Höch:
If 'top' is an unicode directory name, os.listdir can still return non-unicode
filenames if they can't be decoded. This case is not handled in the Python 2.x
standard library version of os.walk and will cause join(top, name) to fail on
such filenames with an
STINNER Victor added the comment:
What is your OS?
--
components: +Unicode
nosy: +ezio.melotti, haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22862
___
Florian Höch added the comment:
This problem only affects Linux as far as I know (in my case I'm using Fedora
21 Beta).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22862
___
New submission from Marc-Andre Lemburg:
The documentation shown for Python 2.7.8 currently includes 2.7.9 parts, e.g.
for the ssl modules (https://docs.python.org/2.7/library/ssl.html).
Since there were so many changes to the ssl module for 2.7.9 which are not
available in 2.7.8, I think it
Benjamin Peterson added the comment:
There's https://docs.python.org/release/2.7.8/
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22863
___
STINNER Victor added the comment:
Your problem has two solutions.
1) Upgrade to Python 3 which handles correctly your use case (thanks to the PEP
383, surrogateescape error handler)
2) Only process filenames as bytes, and encode/decode manually (so you can
decide how to handle undecodable
Serhiy Storchaka added the comment:
This is old rule. \w{2,}-(?=\w{2,} -- single letter shouldn't be separated. But
there was a bug in such simple regex, it splits a word after non-word character
(in particular apostrophe or hyphen) if it followed by word characters and
hyphen. There were
Florian Höch added the comment:
1) Is not yet possible for me unfortunately, some libraries I require are not
yet available for Python 3 (but in the long run, this would be my preferred
solution)
2) Would necessitate too many changes in a carefully crafted, unicode-only
application. I think
STINNER Victor added the comment:
1) Is not yet possible for me unfortunately, some libraries I require are not
yet available for Python 3 (but in the long run, this would be my preferred
solution)
I'm curious, which libraries?
Oh, I forgot to say that it's not possible to fix this issue
R. David Murray added the comment:
I'm afraid that just because we don't advertise it doesn't mean it isn't used.
On the other hand, the split into submodules is relatively recent, so maybe we
could get away with it without a deprecation cycle. I'd like other developers
opinions on that.
Changes by R. David Murray rdmur...@bitdance.com:
--
resolution: - wont fix
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22862
___
Florian Höch added the comment:
I'm curious, which libraries?
wxPython and wexpect (wexpect I could probably port myself, so the problem is
mainly with wx)
Oh, I forgot to say that it's not possible to fix this issue in Python 2.
Backporting the PEP 383 in Python 2 requires deep changes
Antoine Pitrou added the comment:
This is old rule. \w{2,}-(?=\w{2,} -- single letter shouldn't be separated.
I don't agree. This was an implementation detail. There was no test, and it
wasn't specified anywhere.
If you think single letter shouldn't be separated, there should be some
R. David Murray added the comment:
https://owl.english.purdue.edu/owl/resource/576/01/
Rule 8.
So, no, in the middle of the word single letters aren't a problem, only at the
beginning or the end of the word.
--
nosy: +r.david.murray
___
Python
Amaury Forgeot d'Arc added the comment:
solution.put(c) takes a *reference* to the list c.
And then the test() function continues running!
By the time the list is serialized and sent back to the main process (in
another thread), the test() function has already changed it...
As you noticed,
New submission from Mike Drob:
Being able to use a pool to easily run 'map' over an iterable is very powerful,
but it would also be nice to run 'filter' (or potentially 'ifilter' or
'filter_async', in keeping with the patterns already present).
--
components: Library (Lib)
messages:
Matthias Klose added the comment:
according to https://jenkins.qa.ubuntu.com/job/vivid-adt-python3.4/7/
test.test_pyexpat.HandlerExceptionTest now fails, but only when running in the
installed location, not when running the tests from the builddir. any idea why?
--
nosy: +doko
New submission from Geoff Shannon:
While using the pty.py module I had cause to want to be able to silently eat
characters from the input stream. I discovered that because of the check for
end of file being if not data that there was no way to do this.
Since the default function used by
Serhiy Storchaka added the comment:
Thank you David. If splitting single letter surrounded with hyphens is
desirable, here is more complicated patch which does this. It deviates from
original code more, but it doesn't look break any reasonable example.
The textwrap behaviour is
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file37190/wordsplit_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22687
___
Antoine Pitrou added the comment:
To clarify, I would be fine with the previous patch if it didn't add the tests.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22687
___
Antoine Pitrou added the comment:
Aren't ['this-', 'is-a', '-useful-', 'feature'] and
['what-d', 'you-, 'call-', 'it.'] obvious bugs?
Obvious according to which rules?
If we want to improve the behaviour of textwrap, IMHO it should be in a
separate issue. And someone would have to study the
R. David Murray added the comment:
What I usually do in cases like this is to add the tests but mark them with
comments saying that the tests test current behavior but are not testing parts
of the (currently defined) API. That way you know if a change changes behavior
and then can decide if
Serhiy Storchaka added the comment:
To clarify, I would be fine with the previous patch if it didn't add the
tests.
The absent of tests could cause introducing new non-detected bugs and
reappearing old bugs.
Obvious according to which rules?
If you think a word should be splitted before
David Wilson added the comment:
Per my comment on issue16569, the overhead of performing one seek before each
(raw file data) read is quite minimal. I have attached a new (but incomplete)
patch, on which the following microbenchmarks are based. The patch is
essentially identical to Stepan's
New submission from Marc-Andre Lemburg:
With the backport of the Python 3 ssl module, the default context options of
the ssl module were changed.
While this provides better security in many cases, it also causes breakage with
servers or clients which do not support TLSv1 and later.
The ssl
R. David Murray added the comment:
As I recall it, this was discussed extensively on the python-dev mailing list.
Ideally someone should summarize that discussion here.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
New submission from Skip Montanaro:
A discussion on comp.lang.python about prettying up the if __name__ ==
'main__' idiom led to a suggestion that a decorator could simple register the
main function using atexit.register. That looks like it will work, but leaves
open the possibility that
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22867
___
___
Python-bugs-list
Benjamin Peterson added the comment:
Per http://legacy.python.org/dev/peps/pep-0476/#opting-out the only way to do
these things is horrednously ugly because it's hardly (if ever) a good idea.
--
nosy: +alex, benjamin.peterson
___
Python tracker
Mateon1 added the comment:
Well, I found a bug with this module, on Python 2.7(.5), on Windows 7 64-bit
when you try to compile a regex with the flags V1|DEBUG, the module crashes as
if it wanted to call a builtin called ascii.
The bug happened to me several times, but this is the regexp when
Marc-Andre Lemburg added the comment:
On 13.11.2014 22:03, Benjamin Peterson wrote:
Benjamin Peterson added the comment:
Per http://legacy.python.org/dev/peps/pep-0476/#opting-out the only way to do
these things is horrednously ugly because it's hardly (if ever) a good idea.
The point
Antoine Pitrou added the comment:
Numba subclasses unittest.main in order to add custom CLI options.
I agree the current unittest scheme is horrible, just we should find a way
that's backwards-compatible.
--
nosy: +pitrou
___
Python tracker
Changes by Ned Deily n...@acm.org:
--
nosy: +sbt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22864
___
___
Python-bugs-list mailing list
koobs added the comment:
Builds failing on koobs-freebsd9 buildbot for:
3.x: since revision b2c17681404f80edae2ee4846db701104d942cc4
3.4: since revision 246c9570a75798a4757001620cf92cc8d2eba684
Attaching both initial build failure test logs.
--
nosy: +koobs
Added file:
Matthew Barnett added the comment:
@Mateon1: I hope it's fixed? Did you report it?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2636
___
___
Raymond Hettinger added the comment:
Serhiy, go ahead and apply the clinic.py patch. Can you also make a separate
mock patch and assign it to Michael Foord for review?
--
assignee: larry - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
Benjamin Peterson added the comment:
But you can reenable SSLv3 by alerting the context and monkeypatching as
described in the PEP.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22866
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19777
___
___
Python-bugs-list
Antoine Pitrou added the comment:
What I usually do in cases like this is to add the tests but mark
them with comments saying that the tests test current behavior but
are not testing parts of the (currently defined) API. That way
you know if a change changes behavior and then can decide if
Marc-Andre Lemburg added the comment:
On 14.11.2014 01:29, Benjamin Peterson wrote:
But you can reenable SSLv3 by alerting the context and monkeypatching as
described in the PEP.
Well, I can monkeypatch the ssl module of course, but that's
not really the point here. I'm not talking about
Marc-Andre Lemburg added the comment:
Hmm, since neither create_default_context() nor _create_stdlib_context() are
used by any other stdlib modules, I guess the removal of SSLv3 doesn't really
make much difference for existing Python 2.7 applications.
I was irritated by the function names
Nick Coghlan added the comment:
Belatedly agreeing with PJE on this one.
If concerns around circular imports continue to be raised in a post Python 3.5
world (with the issue 17636 change), then we can look at revisiting this again,
but in the meantime, lets just go with the sys.modules
Changes by Nick Coghlan ncogh...@gmail.com:
--
superseder: - Modify IMPORT_FROM to fallback on sys.modules
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue992389
___
koobs added the comment:
koobs-freebsd10 buildbot broken on all branches since:
2.7: e80cb046e7641fb8a71dda8254d2e619cdd64480
3.4: ba4b31ed2952b65ca447f57fbd6d540ebc4b749c
3.x: 3e4f3cc4f1f9dbee8e0ed5df47f77baae2ad310c
Full (2.7) log attached.
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22834
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22836
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21724
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22831
___
New submission from Yi Bai:
Hi, I suppose there is a minor error in the example of the filter() function in
5.1.3 part of the document.
--
filter(function, sequence) returns a sequence consisting of those items from
the sequence
Georg Brandl added the comment:
For me the text is correct. However, it depends on parsing the English
sentence in the right way, which can be confusing. The prose means not
(divisible by 2 or 3) which is equivalent to not divisible by 2 and not
divisible by 3, therefore the Python code has
66 matches
Mail list logo