[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2022-04-02 Thread Marek Suscak
Marek Suscak added the comment: Alright, the PR is up. This is my first contribution to Python and I had to sign the Contributor Agreement so it may take 1 business day before you're able to accept it. In the meantime, can you please review and let me know if anything needs to change? I

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2022-04-02 Thread Marek Suscak
Change by Marek Suscak : -- pull_requests: +30325 pull_request: https://github.com/python/cpython/pull/32256 ___ Python tracker ___

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2022-04-02 Thread Łukasz Langa
Łukasz Langa added the comment: Marek, I can merge a fix for 3.9 for this. I don't think we should be removing _markupbase.ParserBase.error() in 3.9 as GH-8562 is doing. So we'd need a new patch, like GH-17643. However, that will need a test as well. Would you be interested in creating the

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2022-03-27 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2022-03-27 Thread Marek Suscak
Marek Suscak added the comment: Based on the changelog, it seems that the fix for this issue has only landed in Python 3.10 but it's still affecting versions 3.7, 3.8 and 3.9. There are a few projects such as Apache Beam that have only recently added support for Python 3.9 with no support

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-06-14 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-06-12 Thread Leonard Richardson
Leonard Richardson added the comment: I'm the maintainer of Beautiful Soup. I learned about this issue when one of my users filed a bug for it against Beautiful Soup (https://bugs.launchpad.net/beautifulsoup/+bug/1883264). BeautifulSoupHTMLParser (my subclass of html.parser.HTMLParser)

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-04-17 Thread Pikamander2
Pikamander2 added the comment: I updated to bs4 version 4.9.0 and the same issue occurs. -- ___ Python tracker ___ ___

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-04-17 Thread Pikamander2
Pikamander2 added the comment: For reference, my Python version is 3.8.2 and my bs4 version is 4.8.1 -- ___ Python tracker ___ ___

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-04-17 Thread Pikamander2

Pikamander2  added the comment:

Here's a simplified real world example that I found if it helps anyone:

import bs4

html = ''' '''

soup = 

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-01-06 Thread Ezio Melotti
Ezio Melotti added the comment: I think so. It might be worth double-checking if BeautifulSoup (and possibly other 3rd party libs) use _markupbase.py and/or ParserBase.error(). If they do, giving them a heads up and/or going through a regular deprecation process might be good, otherwise PR

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-01-05 Thread Berker Peksag
Berker Peksag added the comment: > _markupbase.py is internal, so it should be safe to remove > ParserBase.error() and the code that calls it as suggested in #31844 Should I reopen https://github.com/python/cpython/pull/8562 then? -- ___ Python

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-01-05 Thread Ezio Melotti

Ezio Melotti  added the comment:

HTMLParser is supposed to follow the HTML5 standard, and never raise an error.

For the example in the first comment (""), the steps should be:

* 

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-01-04 Thread Josh Kamdjou
Josh Kamdjou added the comment: (Author of PR https://github.com/python/cpython/pull/17643) Since the behavior of self.error() is determined by the subclass implementation, an Exception is not guaranteed. How should this be handled? It seems the options are: - continue execution, in which

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2020-01-04 Thread Josh Kamdjou
Change by Josh Kamdjou : -- keywords: +patch pull_requests: +17250 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/17643 ___ Python tracker

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2019-12-18 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

Attaching a test case for this issue since the self.error code path was not 
covered in the current test suite. A PR is open proposing match variable 
initialisation with None 

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2018-09-13 Thread Ezio Melotti
Change by Ezio Melotti : -- assignee: -> ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2018-08-23 Thread Berker Peksag
Change by Berker Peksag : -- status: -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2018-08-23 Thread Berker Peksag
Change by Berker Peksag : -- Removed message: https://bugs.python.org/msg323967 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2018-08-23 Thread Berker Peksag

Berker Peksag  added the comment:

Thanks for the report.

HTMLParser.error() was supposed to raise an exception, but the BeautifulSoup 
project just prints a warning here:

def error(self, msg):
warnings.warn(msg)



[issue34480] _markupbase.py fails with UnboundLocalError on invalid keyword in marked section

2018-08-23 Thread Conrad

New submission from Conrad :

$ pip freeze | grep beautifulsoup4
beautifulsoup4==4.6.3

$ python
Python 3.7.0 (default, Jul 23 2018, 20:24:19)
[Clang 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from