Is it possible to use for commercial purposes code released with a license which allows it, even if it was patented afterwards?
<p>This software was released as open source 2 years ago:</p>
<p><a href="https://github.com/lululxvi/deeponet" rel="nofollow noreferrer">https://github.com/lululxvi/deeponet</a></p>
<p>The license allows commercial use:</p>
<p><a href="https://github.com/lululxvi/deeponet/blob/master/LICENSE" rel="nofollow noreferrer">https://github.com/lululxvi/deeponet/blob/master/LICENSE</a></p>
<p>However, end of last year one of the authors decided to file a patent. As a result, in October 2021 they put a warning saying that the code cannot be used for commercial purposes:</p>
<p><a href="https://github.com/lululxvi/deeponet/commit/693c23d269b0017178419c42a2a48b804e0920bb#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5" rel="nofollow noreferrer">https://github.com/lululxvi/deeponet/commit/693c23d269b0017178419c42a2a48b804e0920bb#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5</a></p>
<p>What has precedence, the code license or the patent?</p>

<h2>The software can’t be patented</h2>
<p>Since it was published before the patent application was lodged, the patent application should be rejected since it is based on prior art. You (or anyone else) can lodge an objection to the patent application on that basis to help the patent examiner find the prior art.</p>

<p>At the bottom of the webpage: <a href="https://github.com/lululxvi/deeponet" rel="nofollow noreferrer">https://github.com/lululxvi/deeponet</a></p>
<blockquote>
<p>This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International License.</p>
</blockquote>
<p>Creative Commons clarifies:   <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="nofollow noreferrer">https://creativecommons.org/licenses/by-nc-sa/4.0/</a></p>
<blockquote>
<p>NonCommercial — You may not use the material for commercial purposes.</p>
</blockquote>
<p>As to whether the code is eligible for patent, that is a different question, which I would think @GeorgeWhite has the experience to disposition.   In my experience, I did not disclose my application until I filed a non-provisional application, though I suspect that you can disclose (publish) after a provisional application is filed with the USPTO.  IANAL</p>

open-source-software patents