Code Monkey home page Code Monkey logo

Comments (23)

moonrail avatar moonrail commented on June 24, 2024 9

I cannot understand how there can be automatic tests and such basic issues go through undetected.
Then why the overhead of testing in the first place? To look good at first glance?
At least the import error should have been detected by automatic testing.

In my opinion at least this should be done to prevent this issue from being repeated:

  • Consolidate all package dependencies in a single place (why have a requirements.txt in the first place, if you have a package? And even if you absolutely want to use a requirements.txt, you can simply source this file in setup.py)
  • Install the package in automatic testing and let pip install all dependencies automatically - do not install them beforehand or individually (see tox.ini, where beautifulsoup4 is hardcoded)
    • This way automatic tests will fail if dependencies are not correctly declared
    • Also currently tests run e.g. with unconstrained requests while requirements.txt pins via requests>=2.8.1, which leads to incorrect test results
  • Re-check your test pipeline if it correctly runs tests, as obviously a very basic import error was not a blocker for releasing and uploading new versions and packages

from atlassian-python-api.

gonchik avatar gonchik commented on June 24, 2024 6

Hi!

I am really sorry for that mistake.
I have uploaded the 3.41.7 version with hotfix version.

I will be happy to see more pull requests.

Cheers,
GT

from atlassian-python-api.

moonrail avatar moonrail commented on June 24, 2024 5

Hey @gonchik,

this did not fix it completely.

Installs via PyPi currently lead to incomplete installations, as setup.py does not reference beautifulsoup4 as dependency:
https://github.com/atlassian-api/atlassian-python-api/blob/3.41.5/setup.py#L28

Therefore pip does not install package beautifulsoup4 and usage of this client leads to:

venv/lib/python3.11/site-packages/atlassian/confluence.py:10: in <module>
    from beautifulsoup4 import BeautifulSoup
ModuleNotFoundError: No module named 'beautifulsoup4'

Please add it as a dependency and release a hotfix.

Edit: lxml is also missing in setup.py - there seems to be a definition gap between package dependencies and thos documented in requirements.txt.

from atlassian-python-api.

FCamborda avatar FCamborda commented on June 24, 2024 4

Our pipelines are also broken.
The usage of bs4 (https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/confluence.py#L10) is not properly declared:
https://github.com/atlassian-api/atlassian-python-api/blob/master/setup.py#L28

Please add it and deploy a new release.

Improvement suggestion: Use https://github.com/tweag/FawltyDeps

from atlassian-python-api.

schroeni96 avatar schroeni96 commented on June 24, 2024 2

The same issue appears to be in 3.41.6. with python 3.10, which one of our build jobs just picked up

from atlassian-python-api.

gonchik avatar gonchik commented on June 24, 2024 1

Hello, sorry for that release, I have not known issue with bs4.
I will release ASAP with that PR #1296

from atlassian-python-api.

gonchik avatar gonchik commented on June 24, 2024 1

@FCamborda thanks for the https://github.com/tweag/FawltyDeps

from atlassian-python-api.

marc-woerner-idexx avatar marc-woerner-idexx commented on June 24, 2024 1

I am facing the same issue as @moonrail . Please provide a workaround.

from atlassian-python-api.

bagerard avatar bagerard commented on June 24, 2024 1

what's missing now is

  • adding beautifulsoup4 to the setup.py so it gets pulled automatically during installation
  • fixing its import name

from atlassian-python-api.

FCamborda avatar FCamborda commented on June 24, 2024 1

Our pipelines are not broken anymore. Thanks a lot for reacting to this @gonchik !

from atlassian-python-api.

sushilkar avatar sushilkar commented on June 24, 2024 1

Thank you @gonchik

from atlassian-python-api.

bagerard avatar bagerard commented on June 24, 2024 1

Thanks for the fix and quick resolution, that's appreciated 👍

Note that there is a side effect here (extra dependency) #1301

from atlassian-python-api.

ragchuck avatar ragchuck commented on June 24, 2024

Same for me! Our Pipelines failed this morning because of this.

from atlassian-python-api.

Lenormju avatar Lenormju commented on June 24, 2024

I added !=3.41.5 to my version constraints.
Using Poetry for my project management :

[tool.poetry.dependencies]
atlassian-python-api = "^3.39.0, !=3.41.5"  # https://github.com/atlassian-api/atlassian-python-api/issues/1295

from atlassian-python-api.

PopoviciMarian avatar PopoviciMarian commented on June 24, 2024

Same for me!

from atlassian-python-api.

tichavskym avatar tichavskym commented on June 24, 2024

The problem isn't just about installing the dependency, but also about importing it, as @gsemet already mentioned in #1296.

On my installation of Fedora 39 (corporate build), Python 3.12.1, I install BeautifulSoup as pip install beautifulsoup4, but I have to import it as from bs4 import .... Which means, I cannot use this package as of right now, because it is doing from beautifulsoup4 import ..., see output bellow

(venv) [mtichavs@t14csb middleware-cve-mapping (linking-jiras *)]$ python
Python 3.12.1 (main, Dec  8 2023, 00:00:00) [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from atlassian import Jira
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mtichavs/middleware-cve-mapping/venv/lib/python3.12/site-packages/atlassian/__init__.py", line 5, in <module>
    from .confluence import Confluence
  File "/home/mtichavs/middleware-cve-mapping/venv/lib/python3.12/site-packages/atlassian/confluence.py", line 10, in <module>
    from beautifulsoup4 import BeautifulSoup
ModuleNotFoundError: No module named 'beautifulsoup4'
>>> from beautifulsoup4 import BeautifulSoup
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'beautifulsoup4'
>>> from bs4 import BeautifulSoup
>>>

Package versions (from pip list):

  • atlassian-python-api: 3.41.6
  • beautifulsoup4: 4.12.2

from atlassian-python-api.

Lenormju avatar Lenormju commented on June 24, 2024

Yes the new version is still broken. Recommending blocking any further version until definitely fixed.

[tool.poetry.dependencies]
atlassian-python-api = "^3.39.0, <3.41.5"  # https://github.com/atlassian-api/atlassian-python-api/issues/1295

from atlassian-python-api.

MultiLi avatar MultiLi commented on June 24, 2024

image
That's what happened after updating to 3.41.6

from atlassian-python-api.

zbika73 avatar zbika73 commented on June 24, 2024

About requirements.txt file: please check this PR #1298

from atlassian-python-api.

wwakabobik avatar wwakabobik commented on June 24, 2024

Same here,

image

from atlassian-python-api.

gonchik avatar gonchik commented on June 24, 2024

Hi! I see I am going to upload to do it.

from atlassian-python-api.

vineetpandey avatar vineetpandey commented on June 24, 2024

for me the same error, failing our pipelines due to this:

from atlassian import Jira
Traceback (most recent call last):
File "", line 1, in
File "C:\Python\lib\site-packages\atlassian_init_.py", line 5, in
from .confluence import Confluence
File "C:\Python\lib\site-packages\atlassian\confluence.py", line 10, in
from beautifulsoup4 import BeautifulSoup
ModuleNotFoundError: No module named 'beautifulsoup4'

from atlassian-python-api.

gonchik avatar gonchik commented on June 24, 2024

Merged all changes, in 30 min I will release it

from atlassian-python-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.